c7d29a37d4
* launch/README: Demonstrate use of the nova client's image-list and flavor-list features, to assist in selecting/confirming image and RAM choices for passing to launch-node.py. Also improve the section headers and add a section about activating the Puppet agent on non-Jenkins-slave servers. * launch/launch-node.py: Upon successful completion, display parameters useful for subsequent DNS assignments. Change-Id: I0defc62434ab2f60b23afe2048e8093614ca49ca Reviewed-on: https://review.openstack.org/20923 Reviewed-by: Khai Do <do.khai@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
87 lines
3.3 KiB
Plaintext
87 lines
3.3 KiB
Plaintext
Create Server
|
|
=============
|
|
|
|
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::
|
|
|
|
sudo adduser YOURUSER puppet
|
|
|
|
(Remember to log out and back into your shell if you add yourself
|
|
to a group.)
|
|
|
|
To launch a node in the OpenStack CI account (production servers)::
|
|
|
|
. ~root/ci-launch/openstackci-rs-nova.sh
|
|
export FQDN=servername.openstack.org
|
|
sudo puppet cert generate $FQDN
|
|
./launch-node.py $FQDN
|
|
|
|
To launch a node in the OpenStack Jenkins account (slave nodes)::
|
|
|
|
. ~root/ci-launch/openstackjenkins-rs-nova.sh
|
|
export FQDN=slavename.slave.openstack.org
|
|
export CERT=slavetype.slave.openstack.org
|
|
nova image-list
|
|
export IMAGE='Ubuntu 12.10 (Quantal Quetzal)'
|
|
nova flavor-list
|
|
export RAM=2048
|
|
sudo puppet cert generate $CERT
|
|
./launch-node.py $FQDN --cert $CERT.pem --image "$IMAGE" --ram $RAM
|
|
|
|
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).
|
|
|
|
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.
|
|
|
|
Manually add the hostname to DNS (the launch script does not do so
|
|
automatically). Note that this example assumes you've already
|
|
exported a relevant FQDN and sourced the appropriate API credentials
|
|
above.
|
|
|
|
Add DNS Records
|
|
===============
|
|
|
|
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
|
|
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"
|
|
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::
|
|
|
|
. ~root/rackdns-venv/bin/activate
|
|
|
|
UUID=01234567-89ab-cdef-fedc-ba9876543210
|
|
IPV4=123.45.67.89
|
|
IPV6=fedc:ba98:7654:3210:dead:beef:cafe:feed
|
|
|
|
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
|
|
|
|
. ~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
|
|
|
|
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.
|