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
|
|
|
|
directory on an updated local clone of the repository, and that
|
|
|
|
your account is a member of the puppet group for access to the
|
|
|
|
puppet keys::
|
2012-11-13 22:35:45 +00:00
|
|
|
|
2013-01-28 21:50:37 +00:00
|
|
|
sudo adduser YOURUSER puppet
|
|
|
|
|
|
|
|
(Remember to log out and back into your shell if you add yourself
|
|
|
|
to a group.)
|
2012-11-13 22:35:45 +00:00
|
|
|
|
2012-10-09 20:28:07 +00:00
|
|
|
To launch a node in the OpenStack CI account (production servers)::
|
|
|
|
|
2013-01-04 19:36:37 +00:00
|
|
|
. ~root/ci-launch/openstackci-rs-nova.sh
|
2013-01-31 18:26:38 +00:00
|
|
|
export FQDN=servername.openstack.org
|
2013-01-28 21:50:37 +00:00
|
|
|
sudo puppet cert generate $FQDN
|
|
|
|
./launch-node.py $FQDN
|
2012-10-09 20:28:07 +00:00
|
|
|
|
|
|
|
To launch a node in the OpenStack Jenkins account (slave nodes)::
|
|
|
|
|
2013-01-31 18:26:38 +00:00
|
|
|
. ~root/ci-launch/openstackjenkins-rs-nova.sh
|
2013-01-28 21:50:37 +00:00
|
|
|
export FQDN=slavename.slave.openstack.org
|
|
|
|
export CERT=slavetype.slave.openstack.org
|
2013-01-31 18:26:38 +00:00
|
|
|
nova image-list
|
2013-01-28 21:50:37 +00:00
|
|
|
export IMAGE='Ubuntu 12.10 (Quantal Quetzal)'
|
2013-01-31 18:26:38 +00:00
|
|
|
nova flavor-list
|
2013-01-28 21:50:37 +00:00
|
|
|
export RAM=2048
|
|
|
|
sudo puppet cert generate $CERT
|
|
|
|
./launch-node.py $FQDN --cert $CERT.pem --image "$IMAGE" --ram $RAM
|
2012-10-09 20:28:07 +00:00
|
|
|
|
|
|
|
If you are launching a replacement server, you may skip the generate
|
|
|
|
step and specify the name of an existing puppet cert (as long as the
|
|
|
|
private key is on this host).
|
|
|
|
|
2013-01-28 21:50:37 +00:00
|
|
|
The server name and cert names may be different (as in the Jenkins
|
|
|
|
slave example), but launch-node.py will assume they are the same
|
|
|
|
unless specified.
|
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
|
|
|
|
2013-01-31 18:26:38 +00:00
|
|
|
Add DNS Records
|
|
|
|
===============
|
2012-10-09 20:28:07 +00:00
|
|
|
|
|
|
|
There are no scripts to handle DNS at the moment due to a lack of
|
|
|
|
library support for the new Rackspace Cloud DNS (with IPv6). To
|
|
|
|
manually update DNS, you will need the hostname, v4 and v6 addresses
|
2012-11-13 22:35:45 +00:00
|
|
|
of the host, as well as the UUID (these can all be found by running
|
|
|
|
the ''nova list'' command). The environment variables used in the
|
|
|
|
URL should be satisfied by sourcing the "openstackci-rs-nova.sh"
|
2013-01-31 18:26:38 +00:00
|
|
|
script (or jenkins, as appropriate). Also the above launch script
|
|
|
|
should output some environment variable assignments for UUID, IPV4
|
|
|
|
and IPV6 you can cut and paste as needed, or you can fill them in
|
|
|
|
yourself::
|
2012-10-09 20:28:07 +00:00
|
|
|
|
2013-01-04 19:36:37 +00:00
|
|
|
. ~root/rackdns-venv/bin/activate
|
2012-10-09 20:28:07 +00:00
|
|
|
|
2013-01-31 18:26:38 +00:00
|
|
|
UUID=01234567-89ab-cdef-fedc-ba9876543210
|
|
|
|
IPV4=123.45.67.89
|
|
|
|
IPV6=fedc:ba98:7654:3210:dead:beef:cafe:feed
|
2012-11-13 22:35:45 +00:00
|
|
|
|
2013-01-28 21:50:37 +00:00
|
|
|
rackdns rdns-create --name $FQDN --data "$IPV6" --server-href https://$os_region_name.servers.api.rackspacecloud.com/v2/$OS_TENANT_NAME/servers/"$UUID" --ttl 300
|
|
|
|
rackdns rdns-create --name $FQDN --data "$IPV4" --server-href https://$os_region_name.servers.api.rackspacecloud.com/v2/$OS_TENANT_NAME/servers/"$UUID" --ttl 300
|
2012-10-09 20:28:07 +00:00
|
|
|
|
2013-01-28 21:50:37 +00:00
|
|
|
. ~root/ci-launch/openstack-rs-nova.sh
|
|
|
|
rackdns record-create --name $FQDN --type AAAA --data "$IPV6" --ttl 300 openstack.org
|
|
|
|
rackdns record-create --name $FQDN --type A --data "$IPV4" --ttl 300 openstack.org
|
2013-01-31 18:26:38 +00:00
|
|
|
|
|
|
|
Activate Puppet Agent
|
|
|
|
=====================
|
|
|
|
|
|
|
|
If this is a Jenkins slave, Puppet configuration is applied through
|
|
|
|
an already installed cron job, so you can ignore this section. If
|
|
|
|
this is ''not'' a Jenkins slave, you'll want to log into it via SSH
|
|
|
|
and turn on the Puppet agent so it will start checking into the
|
|
|
|
master on its own::
|
|
|
|
|
|
|
|
sudo sed -i 's/^START=.*/START=yes/' /etc/default/puppet
|
|
|
|
sudo invoke-rc.d puppet start
|
|
|
|
|
|
|
|
You should be able to tell from the Puppet Dashboard when it begins
|
|
|
|
to check in, which normally happens at 10-minute intervals.
|