system-config/launch
Jeremy Stanley 02e4eb0fa8 Finish switching to using new ansible inventory
Change I76b1099bf0cf3bfead17f96e456cdce87d0e8a49 altered the name of
the inventory script, so reflect that in the corresponding
subprocess call in launch-node.py and a comment in the
expand-groups.sh script.

Change-Id: I4c2c762716813b5d59dcc1b623f5988c8aa7d490
2018-06-18 18:27:34 +00:00
..
dns.py Add error messages to dns.py about old sdk 2018-04-03 12:49:43 -05:00
launch-node.py Finish switching to using new ansible inventory 2018-06-18 18:27:34 +00:00
README Update launch-node's dns.py to work with openstacksdk 2018-03-23 13:01:40 -05:00
sshclient.py launch-node.py: More verbose logging 2016-08-24 11:06:57 +10:00
utils.py Remove interpret_puppet_exitcodes 2016-03-10 09:31:50 -06:00

Create Server
=============

Note that these instructions assume you're working from this
directory on an updated local clone of the repository on the
puppetmaster, and that your account is a member of the admin
and puppet groups for access to their respective keys::

  sudo adduser $(whoami) admin
  sudo adduser $(whoami) puppet

(Remember to log out and back into your shell if you add yourself
to a group.)

Launching a node currently requires a different version of ansible
than what is generally used on the puppetmaster.  Set up a
virtualenv::

  virtualenv -p python2 ~/launch-env/
  . ~/launch-env/bin/activate
  pip install ansible==2.1.1.0 shade

To launch a node in the OpenStack CI account (production servers)::

  . ~/launch-env/bin/activate
  export OS_CLOUD=openstackci-rax
  export OS_REGION_NAME=DFW
  export FLAVOR="8 GB Performance"
  export FQDN=servername01.openstack.org
  cd /opt/system-config/production/launch/
  ./launch-node.py $FQDN --flavor "$FLAVOR" \
    --cloud=$OS_CLOUD --region=$OS_REGION_NAME

To launch a node in the OpenStack Jenkins account (slave nodes)::

  . ~/launch-env/bin/activate
  export OS_CLOUD=openstackjenkins-rax
  export OS_REGION_NAME=DFW
  export FQDN=slavename01.slave.openstack.org
  openstack image list
  export IMAGE='Ubuntu 12.04 LTS (Precise Pangolin) (PVHVM)'
  openstack flavor list
  export FLAVOR="8 GB Performance"
  ./launch-node.py $FQDN --image "$IMAGE" --flavor "$FLAVOR" \
     --cloud=$OS_CLOUD --region=$OS_REGION_NAME

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.

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.

Add DNS Records
===============

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