WARNING - WIP - NOT FOR GENERAL USE - How to reproduce a job result using the Zuul-based reproducer playbooks and script

Check the top-level logs directory for a tar file reproducer-zuul-based-quickstart.tar. This tar archive contains three files:

Running these playbooks will set up Zuul, Gerrit, and related services in containers on the local system, and will then create a reproducer job which can be run on a cloud personal tenant or via libvirt on the local system. If no reproducer-zuul-based-quickstart.tar file is found, that usually means an infra failure before Quickstart could start or a problem in collecting logs. Check on IRC Freenode channel #tripleo to see if there's an ongoing infra issue.

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 acalled reproducer-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: You only need to do these things once on your pet and then rerun reproducer or update as needed.

wget or curl the reproducer-quickstart/reproducer-zuul-based-quickstart.tar file.


    curl -Lo reproducer-zuul-based-quickstart.tar http://logs.openstack.org/79/657779/2/check/tripleo-ci-centos-7-standalone-upgrade/92fd476/logs/reproducer-quickstart/reproducer-zuul-based-quickstart.tar
    tar -xvf reproducer-zuul-based-quickstart.tar
One of the extracted files is the script called ./reproducer-zuul-based-quickstart.sh and you can run it with --help to see available options.

Note: If the local $USERNAME does not match the gerrit user IDs for opendev.org or rdoproject.org) then you will need to supply the -ug (upstream gerrit) and -rg (rdo gerrit) parameters:

    mkdir WORKSPACE
    ./reproducer-zuul-based-quickstart.sh --workspace WORKSPACE -ug slim_shady -rg slim_shadier

Monitor the output and follow any instructions - for example the script will exit and require re-run once the user is added to the docker group.

The Bash script is not required although it is the supported path. The playbooks can be run directly using ansible-playbook. The Bash script contains some package installation and Docker user/group setup that you will need to cover prior to running the playbooks directly. Please see the Bash scripts for details, especially if you are running the reproducer for the first time on the local environment. The playbooks can be run as follows:

The launcher-playbook.yaml includes comments on how to run the playbook with the same options listed in the Bash script section above.

The reproducer can be launched such that if there is an error the environment will remain up and running available to the developer to debug.

  • cd ~/tripleo-ci-reproducer
  • docker-compose exec scheduler zuul autohold --tenant tripleo-ci-reproducer --job tripleo-ci-centos-7-standalone --reason debug --project test1
  • The launcher-playbook.yaml will create and push a job to a test1 testproject repo in a temp directory. This job will start and the related Zuul infrastructure logs can be viewed in:

    cd ~/tripleo-ci-reproducer
    docker-compose logs --tail=10 -f
    # Just view the scheduler and executor logs:
    docker-compose logs --tail=10 -f scheduler executor
    

    To see the job progress, you can access the web consoles of: If you are accessing a remote machine, replace localhost with the ip address.