Reproduce CI jobs for debugging and development =============================================== Reproducing any given CI job that is executed upstream is critical for development. You will find a script called "reproducer-quickstart.sh" under the logs directory of any TripleO CI job that will assist you in recreating a TripleO Quickstart upstream job. Each script contains the same parameters used in the job and includes any deployment or CI related settings. Any patches that were marked as dependencies will also be included in the script and execution. This script will provision a heat stack in an OpenStack host cloud that matches the environment created by nodepool or `OVB `_ upstream. Once the environment is ready, the script prompts the user with some additional instructions that executes the same scripts and tools used upstream to bootstrap and execute the CI. Install system dependencies --------------------------- Before execute the reproduce-quickstart it's necessary to install few dependencies on the system:: * pip * virtualenv * ansible * python-openstackclient * python-heatclient How to execute the reproducer-quickstart script ----------------------------------------------- Go to the "logs" directory of the job:: wget http://logs.openstack.org/07/472607//f98d674/logs/reproducer-quickstart.sh Be sure you have download the OpenStack RC file. To have more information you can check the documentation `here `_. Source your OpenStack RC file:: source openstack_rc.sh Execute the reproducer-quickstart.sh:: bash -x reproducer-quickstart.sh The following additional options are recommended:: bash -x reproducer-quickstart.sh --workspace /var/tmp/reproduce \ --create-virtualenv true --remove-stacks-keypairs true \ --nodestack-prefix repro Please check the script's help command however the available options are:: Options: -w, --workspace directory where the virtualenv, inventory files, etc. are created. Defaults to creating a directory in /tmp -v, --create-virtualenv create a virtualenv to install Ansible and dependencies. Options to pass true/false. Defaults to true for OVB. Defaults to false for other deployment types. -r, --remove-stacks-keypairs delete all Heat stacks (both Multinode and OVB created) in the tenant before deployment. Will also delete associated keypairs if they exist. Options to pass true/false.Defaults to false. -p, --nodestack-prefix add a unique prefix for multinode and singlenode stacks Defaults to empty. -a, --autorun Run job on prepared environment automatically Default is to stop after environment is ready -h, --help print this help and exit How does this script work ------------------------- The script is generated by a `jinja2 template `_ that reads all the variables passed to the CI job and builds a custom script for each job. There are two major steps to be familiar with in this script. The first part of the script will provision the servers, networks and other infrastructure for the TripleO deployment. The second part invokes the CI tools and scripts in the `same way the original CI job was executed `_. Notes ----- If the environment was provisioned successfully you will be presented with further instructions that will prompt you to ssh to the environment and execute the upstream CI scripts. You may elect to run this automatically with the "autorun" option found in the help. Support ------- The TripleO CI team will provide community support for the reproducer-quickstart.sh script. The tool is only supported in use with an OpenStack host cloud. Your results with various OpenStack providers may vary. Please open any issues or problems in `launchpad `_ with the "quickstart" tag. The `devmode.sh `_ script is deprecated. The reproducer-quickstart.sh should be used for upstream development and debugging of TripleO CI.