2013-01-31 18:26:38 +00:00
|
|
|
Create Server
|
|
|
|
=============
|
|
|
|
|
2013-01-28 21:50:37 +00:00
|
|
|
Note that these instructions assume you're working from this
|
2013-09-13 18:52:59 +00:00
|
|
|
directory on an updated local clone of the repository on the
|
2014-05-28 10:33:33 -07:00
|
|
|
puppetmaster, and that your account is a member of the admin
|
|
|
|
and puppet groups for access to their respective keys::
|
2012-11-13 22:35:45 +00:00
|
|
|
|
2013-09-13 18:52:59 +00:00
|
|
|
sudo adduser $(whoami) admin
|
2013-08-29 23:18:53 +12:00
|
|
|
sudo adduser $(whoami) puppet
|
2013-01-28 21:50:37 +00:00
|
|
|
|
|
|
|
(Remember to log out and back into your shell if you add yourself
|
|
|
|
to a group.)
|
2012-11-13 22:35:45 +00:00
|
|
|
|
2016-09-15 14:21:26 -07:00
|
|
|
Launching a node currently requires a different version of ansible
|
|
|
|
than what is generally used on the puppetmaster. Set up a
|
|
|
|
virtualenv::
|
|
|
|
|
2018-08-27 11:38:46 -07:00
|
|
|
python3 /usr/lib/python3/dist-packages/virtualenv.py --python=python3 ~/launch-env
|
2016-09-15 14:21:26 -07:00
|
|
|
. ~/launch-env/bin/activate
|
2018-08-27 11:38:46 -07:00
|
|
|
pip install ansible shade
|
2016-09-15 14:21:26 -07:00
|
|
|
|
2012-10-09 20:28:07 +00:00
|
|
|
To launch a node in the OpenStack CI account (production servers)::
|
|
|
|
|
2016-09-15 14:21:26 -07:00
|
|
|
. ~/launch-env/bin/activate
|
2016-03-09 11:04:02 -06:00
|
|
|
export OS_CLOUD=openstackci-rax
|
2016-09-15 16:24:08 -05:00
|
|
|
export OS_REGION_NAME=DFW
|
2013-12-18 10:56:05 -08:00
|
|
|
export FLAVOR="8 GB Performance"
|
2016-05-23 19:42:18 +00:00
|
|
|
export FQDN=servername01.openstack.org
|
2018-08-16 18:56:30 -05:00
|
|
|
cd /opt/system-config/launch/
|
2016-03-09 11:04:02 -06:00
|
|
|
./launch-node.py $FQDN --flavor "$FLAVOR" \
|
2016-09-15 16:24:08 -05:00
|
|
|
--cloud=$OS_CLOUD --region=$OS_REGION_NAME
|
2012-10-09 20:28:07 +00:00
|
|
|
|
|
|
|
To launch a node in the OpenStack Jenkins account (slave nodes)::
|
|
|
|
|
2016-09-15 14:21:26 -07:00
|
|
|
. ~/launch-env/bin/activate
|
2016-03-09 11:04:02 -06:00
|
|
|
export OS_CLOUD=openstackjenkins-rax
|
2016-09-15 16:24:08 -05:00
|
|
|
export OS_REGION_NAME=DFW
|
2016-05-23 19:42:18 +00:00
|
|
|
export FQDN=slavename01.slave.openstack.org
|
2016-03-09 11:04:02 -06:00
|
|
|
openstack image list
|
2018-08-16 19:03:25 -05:00
|
|
|
export IMAGE='Ubuntu 18.04 LTS (Bionic Beaver) (PVHVM)'
|
2016-03-09 11:04:02 -06:00
|
|
|
openstack flavor list
|
2013-12-18 10:56:05 -08:00
|
|
|
export FLAVOR="8 GB Performance"
|
2016-03-09 11:04:02 -06:00
|
|
|
./launch-node.py $FQDN --image "$IMAGE" --flavor "$FLAVOR" \
|
2016-09-15 16:24:08 -05:00
|
|
|
--cloud=$OS_CLOUD --region=$OS_REGION_NAME
|
2012-10-09 20:28:07 +00:00
|
|
|
|
|
|
|
Manually add the hostname to DNS (the launch script does not do so
|
2013-01-28 21:50:37 +00:00
|
|
|
automatically). Note that this example assumes you've already
|
|
|
|
exported a relevant FQDN and sourced the appropriate API credentials
|
|
|
|
above.
|
2012-10-09 20:28:07 +00:00
|
|
|
|
2015-04-24 12:36:17 -07:00
|
|
|
In order for Ansible to be able to send out the Puppet updates,
|
|
|
|
you also need the puppetmaster to accept the root SSH key for the
|
|
|
|
new server. So as root on the puppetmaster:
|
|
|
|
|
|
|
|
ssh root@$FQDN
|
|
|
|
|
|
|
|
Verify the fingerprint of the new server and type "yes" to accept.
|
|
|
|
Then you can log out.
|
|
|
|
|
2013-01-31 18:26:38 +00:00
|
|
|
Add DNS Records
|
|
|
|
===============
|
2012-10-09 20:28:07 +00:00
|
|
|
|
2013-01-16 19:11:44 +00:00
|
|
|
There are no scripts to automatically handle DNS at the moment due to
|
|
|
|
a lack of library support for the new Rackspace Cloud DNS (with IPv6).
|
|
|
|
However, the launch-node script will print the commands needed to be
|
|
|
|
run to configure DNS for a newly launched server. To see the commands
|
|
|
|
for an existing server, run:
|
|
|
|
|
|
|
|
./dns.py $FQDN
|