To setup and run the reproducer you must first decide where it will run - on a pet (your laptop) or on cattle (rdo-cloud vm or other temporary environment)? For each case see notes below for required setup.
If this is the first time you are running the reproducer you must ensure you have an externally routable network in your RDO-cloud tenant called 'private'. That is you will need a router attached to the external network that is also attached to your network called 'private' (which you may need to create). Assuming you have a clouds.yaml that let's you talk to RDO cloud you can use the following commands to create the required setup:
openstack --os-cloud rdo-cloud network create private
openstack --os-cloud rdo-cloud subnet create private --network private --gateway 192.168.0.1 --subnet-range 192.168.0.0/24
openstack --os-cloud rdo-cloud router create privaterouter
openstack --os-cloud rdo-cloud router set --external-gateway 38.145.32.0/22 privaterouter
openstack --os-cloud rdo-cloud router add subnet privaterouter private
Alternatively log in to RDO cloud horizon and create the network and router
that way.
Cattle
If you're using a temporary environment like RDO-cloud vm to run the reproducer you can use the script inside the reproducer-quickstart/ directory from the logs of the job you are reproducing. The script is acalledreproducer-fresh-box-setup.sh
:
curl -o reproducer-fresh-box-setup.sh http://logs.openstack.org/79/657779/2/check/tripleo-ci-centos-7-containers-multinode/67d8eb6/logs/reproducer-quickstart/reproducer-fresh-box-setup.sh
chmod 775 reproducer-fresh-box-setup.sh
./reproducer-fresh-box-setup.sh -u marios -p password -c reprozuul
note: If you're using an RDO-cloud vm be sure to use at least m1.large2 flavour as we've hit hard disk limits with m1.large
There are two required parameters -u USER
and -p PASS
which correspond to the RDO cloud username and password. These are written to
the generated $HOME/.config/openstack/clouds.yaml
file expected by the
reproducer.
This script creates the default user 'reprozuul' with passwordless sudo privileges, creates $HOME/.config/openstack/clouds.yaml with the -u USER and -p PASS parameters and creates the required ssh keypair. It must run as root, or as a user with passwordless sudo.
The script finally switches to the newly created user and outputs the newly created public key. You must upload this key to gerrit (both opendev.org as well as rdoproject.org).
Pet
If you are running the reproducer on a non-transient machine, that is your laptop or any other box which isn't temporary (a pet), then you need:- Ensure user running reproducer has passwordless sudo
- That user has $HOME/.config/openstack/clouds.yaml with "rdo-cloud" entry
- A ssh keypair generated with
-m PEM -t rsa
and uploaded to gerrit (both opendev.org as well as rdoproject.org). - A externally routable network in your RDO-cloud tenant named 'private'. See example commands above if you need to create this or log in to RDO cloud horizon and verify your setup or create as needed.
- Example clouds.yaml:
CLOUDS_YAML_PATH=$HOME/.config/openstack/
mkdir -p $CLOUDS_YAML_PATH
/bin/bash -c "cat <>$CLOUDS_YAML_PATH/clouds.yaml
clouds:
rdo-cloud:
identity_api_version: 3
region_name: regionOne
auth:
auth_url: https://phx2.cloud.rdoproject.org:13000/v3
password: $RDO_PASS
project_name: $RDO_USER
username: $RDO_USER
user_domain_name: Default
project_domain_name: Default
regions:
- name: regionOne
values:
networks:
- name: 38.145.32.0/22
routes_externally: true
- name: private
EOF"
- Create an ssh key pair without a pass phrase:
- The ssh key pair is configurable - see variables
ssh_path
user_pri_key
. The default key is:~/.ssh/id_rsa[.pub]
- Note: Use the following to create keys:
ssh-keygen -m PEM -t rsa
See FAQ below for more information about ssh keys requirements.