system-config/launch
Jeremy Stanley a31bd1a8fd Improve launch-node deps and fix script bugs
The version of python-cinderclient needs to be constrained to before
the point at which it dropped volume API v2 support (which happened
in 8.0.0). If this is pinned back, latest openstackclient can be
installed and used for Rackspace volume operations without issue.
Make sure we install new enough OpenStackSDK so it doesn't try to
pass unsupported networking options in server create calls to
Rackspace too.

The script itself had a couple of issues once rehomed, the first
being it was looking for Ansible playbooks relative to its former
path in the repository rather than its installed location in the
venv, so make that path configurable but have it default to the
absolute path to those on the bridge now. Also, the script really
wanted to clear the ansible cache, but when that path doesn't exist
(as is currently the case on the bridge), it aborts rather than
continuing, so wrap that call in a try/except.

While we're here, update our default server image from focal to
jammy.

Change-Id: I103c7799ebe319d2d8b3fb626d7804387d3e8a60
2022-11-30 01:53:14 +00:00
..
src/opendev_launch Improve launch-node deps and fix script bugs 2022-11-30 01:53:14 +00:00
README.rst launch-node : make into a small package 2022-11-21 16:29:22 +11:00
pyproject.toml Improve launch-node deps and fix script bugs 2022-11-30 01:53:14 +00:00

README.rst

Create Server

The commands in this section should be run as root on the bastion host.

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

export OS_CLOUD=openstackci-rax
export OS_REGION_NAME=DFW
export FLAVOR="8 GB Performance"
export FQDN=servername01.opendev.org

/usr/launcher-venv/bin/launch-node $FQDN --flavor "$FLAVOR" \
  --cloud=$OS_CLOUD --region=$OS_REGION_NAME

Manually add the hostname to DNS (the launch script does not do so automatically, but it prints the commands to run). Note that for *.opendev.org hosts you'll only be able to add the reverse dns records via the printed commands. Forward A and AAAA records should be added to opendev/zone-opendev.org/zones/opendev.org/zone.db.

We need to add the host to our static inventory file so that the ansible runs see the new host. The launch script prints out the appropriate lines to add to opendev/system-config:inventory/openstack.yaml.

In order for Ansible to work, you also need to accept the root SSH key for the new server. Once the new DNS entries have propagated, as root on the bastion server:

ssh root@$FQDN

Verify the fingerprint of the new server and type "yes" to accept. Then you can log out.

Add DNS Records

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:

/usr/launcher-venv/bin/show-dns $FQDN