Zuul CI Roles

apache-logs-conf

Prepare apache configs and logs for staging

Make sure apache config files and log files are available in a linux flavor independent location. Note that this relies on hard links, to the staging directory must be in the same partition where the logs and configs are.

Role Variables

stage_dir
Default: {{ ansible_user_dir }}

The base stage directory.

capture-system-logs

Stage a number of system type logs

Stage a number of different logs / reports: - snapshot of iptables - disk space available - pip[2|3] freeze - installed packages (dpkg/rpm) - ceph, openswitch, gluster - coredumps - dns resolver - listen53 - unbound.log - deprecation messages

Role Variables

stage_dir
Default: {{ ansible_user_dir }}

The base stage directory.

devstack-ipv6-only-deployments-verification

Verify the IPv6-only deployments

This role needs to be invoked from a playbook that run tests. This role verifies the IPv6 setting on devstack side and devstack deploy services on IPv6. This role is invoked before tests are run so that if any missing IPv6 setting or deployments can fail the job early.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

devstack-project-conf

Prepare OpenStack project configurations for staging

Prepare all relevant config files for staging. This is helpful to avoid staging the entire /etc.

Role Variables

stage_dir
Default: {{ ansible_user_dir }}

The base stage directory.

export-devstack-journal

Export journal files from devstack services

This performs a number of logging collection services

  • Export the systemd journal in native format

  • For every devstack service, export logs to text in a file named screen-* to maintain legacy compatability when devstack services used to run in a screen session and were logged separately.

  • Export a syslog-style file with kernel and sudo messages for legacy compatability.

Writes the output to the logs/ subdirectory of stage_dir.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory. This is used to obtain the log-start-timestamp.txt, used to filter the systemd journal.

stage_dir
Default: {{ ansible_user_dir }}

The base stage directory.

fetch-devstack-log-dir

Fetch content from the devstack log directory

Copy logs from every host back to the zuul executor.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

orchestrate-devstack

Orchestrate a devstack

Runs devstack in a multinode scenario, with one controller node and a group of subnodes.

The reason for this role is so that jobs in other repository may run devstack in their plays with no need for re-implementing the orchestration logic.

The “run-devstack” role is available to run devstack with no orchestration.

This role sets up the controller and CA first, it then pushes CA data to sub-nodes and run devstack there. The only requirement for this role is for the controller inventory_hostname to be “controller” and for all sub-nodes to be defined in a group called “subnode”.

This role needs to be invoked from a playbook that uses a “linear” strategy.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

process-stackviz

Generate stackviz report.

Generate stackviz report using subunit and dstat data, using the stackviz archive embedded in test images.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

stage_dir
Default: "{{ ansible_user_dir }}"

The stage directory where the input data can be found and the output will be produced.

zuul_work_dir
Default: {{ devstack_base_dir }}/tempest

Directory to work in. It has to be a fully qualified path.

run-devstack

Run devstack

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

setup-devstack-cache

Set up the devstack cache directory

If the node has a cache of devstack image files, copy it into place.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

devstack_cache_dir
Default: /opt/cache

The directory with the cached files.

setup-devstack-log-dir

Set up the devstack log directory

Create a log directory on the ephemeral disk partition to save space on the root device.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

setup-devstack-source-dirs

Set up the devstack source directories

Ensure that the base directory exists, and then move the source repos into it.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

devstack_sources_branch
Default: None

The target branch to be setup (where available).

setup-stack-user

Set up the stack user

Create the stack user, set up its home directory, and allow it to sudo.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

devstack_stack_home_dir
Default: {{ devstack_base_dir }}

The home directory for the stack user.

setup-tempest-user

Set up the tempest user

Create the tempest user and allow it to sudo.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

start-fresh-logging

Restart logging on all hosts

Restart syslog so that the system logs only include output from the job.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

sync-devstack-data

Sync devstack data for multinode configurations

Sync any data files which include certificates to be used if TLS is enabled. This role must be executed on the controller and it pushes data to all subnodes.

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

devstack_data_base_dir
Default: {{ devstack_base_dir }}

The devstack base directory for data/. Useful for example when multiple executions of devstack (i.e. grenade) share the same data directory.

write-devstack-local-conf

Write the local.conf file for use by devstack

Role Variables

devstack_base_dir
Default: /opt/stack

The devstack base directory.

devstack_local_conf_path
Default: {{ devstack_base_dir }}/devstack/local.conf

The path of the local.conf file.

devstack_localrc
Type: dict

A dictionary of variables that should be written to the localrc section of local.conf. The values (which are strings) may contain bash shell variables, and will be ordered so that variables used by later entries appear first.

As a special case, the variable LIBS_FROM_GIT will be constructed automatically from the projects which appear in the required-projects list defined by the job plus the project of the change under test. To instruct devstack to install a library from source rather than pypi, simply add that library to the job’s required-projects list. To override the automatically-generated value, set LIBS_FROM_GIT in devstack_localrc to the desired value.

devstack_local_conf
Type: dict

A complex argument consisting of nested dictionaries which combine to form the meta-sections of the local_conf file. The top level is a dictionary of phases, followed by dictionaries of filenames, then sections, which finally contain key-value pairs for the INI file entries in those sections.

The keys in this dictionary are the devstack phases.

devstack_local_conf{}.[phase]
Type: dict

The keys in this dictionary are the filenames for this phase.

devstack_local_conf{}.[phase]{}.[filename]
Type: dict

The keys in this dictionary are the INI sections in this file.

devstack_local_conf{}.[phase]{}.[filename]{}.[section]
Type: dict

This is a dictionary of key-value pairs which comprise this section of the INI file.

devstack_base_services
Default: {{ base_services | default(omit) }}
Type: list

A list of base services which are enabled. Services can be added or removed from this list via the devstack_services variable. This is ignored if base is set to False in devstack_services.

devstack_services
Type: dict

A dictionary mapping service names to boolean values. If the boolean value is false, a disable_service line will be emitted for the service name. If it is true, then enable_service will be emitted. All other values are ignored.

The special key base can be used to enable or disable the base set of services enabled by default. If base is found, it will processed before all other keys. If its value is False a disable_all_services will be emitted; if its value is True services from devstack_base_services will be emitted via ENABLED_SERVICES.

devstack_plugins
Type: dict

A dictionary mapping a plugin name to a git repo location. If the location is a non-empty string, then an enable_plugin line will be emmitted for the plugin name.

If a plugin declares a dependency on another plugin (via plugin_requires in the plugin’s settings file), this role will automatically emit enable_plugin lines in the correct order.

tempest_plugins
Type: list

A list of tempest plugins which are installed alongside tempest.

The list of values will be combined with the base devstack directory and used to populate the TEMPEST_PLUGINS variable. If the variable already exists, its value is not changed.