Minor launch documentation improvements.
* 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
This commit is contained in:
parent
ba9ea03ade
commit
c7d29a37d4
@ -1,3 +1,6 @@
|
||||
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
|
||||
@ -10,18 +13,20 @@ to a group.)
|
||||
|
||||
To launch a node in the OpenStack CI account (production servers)::
|
||||
|
||||
export FQDN=servername.openstack.org
|
||||
. ~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
|
||||
. ~root/ci-launch/openstackjenkins-rs-nova.sh
|
||||
sudo puppet cert generate $CERT
|
||||
./launch-node.py $FQDN --cert $CERT.pem --image "$IMAGE" --ram $RAM
|
||||
|
||||
@ -38,8 +43,8 @@ automatically). Note that this example assumes you've already
|
||||
exported a relevant FQDN and sourced the appropriate API credentials
|
||||
above.
|
||||
|
||||
DNS
|
||||
===
|
||||
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
|
||||
@ -47,15 +52,16 @@ 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).
|
||||
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
|
||||
|
||||
TEMPFILE=$(tempfile)
|
||||
nova list | grep "| $FQDN " | sed 's/^| \([0-9a-f-]\+\) .* public=\([0-9a-f:]\+\), \([0-9\.]\+\);.*/export UUID="\1"\nexport IPV6="\2"\nexport IPV4="\3"/' > $TEMPFILE
|
||||
cat $TEMPFILE
|
||||
. $TEMPFILE
|
||||
rm $TEMPFILE
|
||||
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
|
||||
@ -63,3 +69,18 @@ script (or jenkins, as appropriate).
|
||||
. ~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.
|
||||
|
@ -128,6 +128,9 @@ def build_server(client, name, image, flavor, cert, environment):
|
||||
admin_pass = server.adminPass
|
||||
server = utils.wait_for_resource(server)
|
||||
bootstrap_server(server, admin_pass, key, cert, environment)
|
||||
print('UUID=%s\nIPV4=%s\nIPV6=%s\n' % (server.id,
|
||||
server.accessIPv4,
|
||||
server.accessIPv6))
|
||||
if key:
|
||||
kp.delete()
|
||||
except Exception, real_error:
|
||||
|
Loading…
Reference in New Issue
Block a user