Commit Graph

22 Commits

Author SHA1 Message Date
Gabriele Cerami 9206748e9d Render playbooks minimal, move everything to roles
In zuul, roles can be easily included cross repos, while playbooks need
to be replicated and copied.
This change creates three roles roles, and move tasks to be included in
the new roles, so the playbooks are just minimal, and replicating them
is not a problem since the logic is in roles that are included
The common variables are loaded in the role common, the node preparation
i moved to the prepare-node role, and it's now called in the pre,yaml
playbook in pre-run.
run-test role contains the rendering of bash scripts and effective test
run

Taiga-id: https://tree.taiga.io/project/tripleo-ci-board/task/112
Change-Id: Ie51fcfbee79727d04fca47d26a5ed8ad44ed3bf6
2019-01-04 11:42:47 +05:30
Alex Schultz 8d117bb228 Run log collection with debug
Up the debug on log collection to help troubleshoot 1810054

Change-Id: I0c51d0fd07283b8aa1a21e05611398a0911cef91
Related-Bug: #1810054
2019-01-02 13:17:52 -07:00
Sorin Sbarnea ed27a979d5 Adopt use of pre-commit linting
Follows the same configuration that was used on
tripleo-quickstart-extras and documented use on tripleo-docs.

Change-Id: Iba8a2db92137f9f6ad28f498627eb1b87039d99f
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
2018-12-14 15:50:06 +00:00
yatin 3a03f382c3 Fix overcloud node log collection in ovb jobs
[1] moved the log collection to post which resulted
in log collection failure for overcloud nodes in ovb
jobs because overcloud nodes are destroyed before post.
This patch fixes log collection issue for overcloud nodes
in ovb jobs.

[1] https://review.openstack.org/#/c/589068

Depends-On: https://review.openstack.org/#/c/619359/
Depends-On: https://review.openstack.org/#/c/618205/
Change-Id: Idf755c8f2021f82032ab28e17efd7e938a64e476
2018-12-06 13:16:27 +00:00
Sofer Athlan-Guyot e7c0dced93 New workflow for standalone upgrade.
Implement the standalone upgrade in CI.

This deploy a N-1 standalone deployment, upgrade the repository, the
packages, and run tripleo upgrade.

The upgrade coverage is limited to:
 - upgrade_tasks.
 - non-HA services.

This means that no upgrade orchestration is tested and that HA is not
covered.

Change-Id: Id4877152ca6c233e193593995dd13890e17a535b
Depends-On: I2a4ffd8ae26e0965028422c649243a65fef79e65
2018-11-15 17:43:18 +00:00
Ronelle Landy aa1786884a Make zuul vars accessible from collect logs.
Change-Id: Id9709e046d217d0256d3a84fa8782a97e4dabb9b
2018-11-01 11:09:48 -04:00
Sorin Sbarnea c25a428409 Corrected release config location for log collection
Fixes problem where log collection was using config files from
old location after we already switched deployment to use new location.

This was not observed because the file content was the same but
once we attempted to remove the old files we discovered the issue.

Prepares for removal of config files from their old location.

Change-Id: I70aeb3724d6d162aa6d8b00024f3ce1a74dbf79f
Story: https://tree.taiga.io/project/tripleo-ci-board/task/7
2018-10-19 15:19:13 +00:00
Wes Hayutin 58bb094700 Add support for distro and major release delineation
We'll need unique release files for
CentOS-7, CentOS-8, Fedora-28 and RHEL

Change-Id: I5613d1acb2925a1066623665f0598a060c97acee
Partial-Bug: #1740928
Story: https://tree.taiga.io/project/tripleo-ci-board/us/1
2018-10-09 08:51:56 +01:00
Quique Llorente c889115e1a Remove timeout logic
The new workflow relies on zuul timeout for run playbook.
Critical tasks as collect-logs should be in post-run
which may include a dedicated post-timeout.

Implements sprint17 card [1]
[1] https://trello.com/c/AerVRkBH/887-replace-bash-environment-variables-in-tociquickstartsh-with-ansible-variables-from-zuul-inventory-or-zuul-job-config-s17

Change-Id: Ia98111e8c444460762a903914762ec0bc05a6009
2018-09-26 09:38:59 -03:00
Zuul 5bdbc2c960 Merge "Dump zuul variables to file" 2018-09-25 16:45:58 +00:00
Wes Hayutin 156c2b1f9a ensure tripleo-validations are turned off upstream
Let's be explicit about ensuring these tasks are off

Closes-Bug: #1794034
Change-Id: I8b6f59f848cd0462eae8e1db8d4ad93a698815dc
2018-09-24 21:21:28 -06:00
Gabriele Cerami f33bc702b5 Dump zuul variables to file
we need to pass some zuul variables to the inner ansible calls. We dump
the zuul variables subtree to a file, then we add it as extra-vars to
the ansible calls.

Change-Id: I8d7c877b64cf22c00b1ad538f25ad4ff87574a8a
2018-09-18 11:39:55 +01:00
Quique Llorente debdb4b961 Move toci BASH variables to ansible
This review contains the following changes and references work from [1]:

DRY_RUN, STATS_* and COLLECT_CONF vars:

	The dryrun ansible var will not be defined by default,
	only manually defined at reproducer and similar.

        - PLAYBOOK_DRY_RUN -> <job config>:dryrun

	The STATS_ vars will be re-implemented after TOCI refactoring

featureset related:

	It does the following move to ansible:
	- FEATURESET_FILE -> common.yaml:job_featureset_file
	- FEATURESET_CONF -> common.yaml:featureset_conf (job_featureset_file +
                                         featureset-multinode-common.yml)
                          -> ovb.yaml:featureset_conf (job_featureset_file)
                                      overrides common.yaml

	Also add additional ansible variables:
	- multinode_featureset_file: to point to tq featureset-multinode-common.yaml
	- tripleo_quickstart_dir: to point to tq dir at tripleo_root
	- common_featureset_conf to have the --extra-vars for the featurset_file

Replace toci ENV_VARS by ansible env_vars:

	This move the ENV_VARS to the different
	environment_type yaml config files.

	It also implements there the check if it's running in RDO,
	to add the extra config for it.

	Also note that RHCLOUD env variable has being removed,
	and harcoded the use with "rdocloud".

Move nodes_file and nodes_args to common.yaml:

	As part of [1] task, we do the following move
	from toci bash environment variables:
	- NODES_FILE -> common.yaml:nodes_file
	- NODES_ARGS -> common.yaml:nodes_args

        NODES_FILE exported for the reproducer (will be addressed in a
        separate change)

[1] https://trello.com/c/AerVRkBH/887-replace-bash-environment-variables-in-tociquickstartsh-with-ansible-variables-from-zuul-inventory-or-zuul-job-config-s17

Change-Id: I786ef968953e2bff34939c15c16a01f10130d2aa
2018-09-17 14:25:25 +00:00
Wes Hayutin 28fdf96b82 re-enable build-test-packages
build-test-packages had to be turned off in
order to land a patch that moved scen007 to nv

Depends-On: Ib28f20db0aa1db9f2c5b3cbbdae1c85c97bbeba1
Change-Id: I95f59ed067df55f64c62c0343f93488ad8696884
2018-08-15 23:27:03 +00:00
Wes Hayutin 2d2c7ee2c9 move scenario007 containers to nv
Move scenario007 to nv until the issue is resolved.
Scenario007 is preventing other patches from landing.

This patch skips the build-test-repo role.

Related-Bug: #1787268
Related-Bug: #1787244
Change-Id: I0b76c432440f78cab8199eb30c0295d53f137659
2018-08-15 19:19:29 -04:00
Rafael Folco b6aaf19b8c Replace TAGS with ansible var
No longer using the bash function is_featureset() to match a
particular tag to a featureset config. Now upgrade_tags are set
in the job definition and tags are specified for each environment.

Upgrade/update related tags are calculated with the legacy logic.

Implementing card [1]

[1] https://trello.com/c/DdSHkgnE/884-replace-tocijobtype-variable-s17-undercloud-playbooks-environment-tags

Change-Id: If9ea1f7362e0b11b4d26f0d083b47de1f7642416
2018-08-07 14:27:36 +02:00
Rafael Folco f9d4704403 Cleanup variables and toci_jobtype leftovers
Implementing "Replace TOCI_JOBTYPE variable (s17)"
             " - $UNDERCLOUD $PLAYBOOKS $ENVIRONMENT $TAGS"

- featureset is (should be) always set (never undefined)
- environment_type is (should be) always set (no default)
- Clear PLAYBOOKS, ENVIRONMENT and UNDERCLOUD vars
- Remove old deprecated graphite line

It also execise the same CI as the 'master' noop change [2].
basically, run the same amount of CI as tripleo-quickstart but
for changes at tripleo-ci playbook only.

Implements card [1]

[1] https://trello.com/c/DdSHkgnE/884-replace-tocijobtype-variable-s17-undercloud-playbooks-environment-tags
[2] https://review.openstack.org/#/c/560445

Change-Id: If16186ba2de37d2f47fdfbab3b83407eeb0020fc
2018-08-07 14:27:36 +02:00
Gabriele Cerami f42363f623 Collect logs: split and move the script creation
Since we create the collect logs script only at the end of the playbooks
run, when a job times out, there is no collect_logs.sh script created,
and the post-run playbook doesn't actually run anything.
This change split the function in two parts, the first part creates the
script, and its call is moved to before the playbooks run. The second
part is moved to toci_quickstart directly and runs after the playbooks.
The second part should not be needed anymore with zuulv3 in rdo
provider.

Closes-Bug: #1784417
Change-Id: Iee897f780c93bdf847e188fc033e8be112e12a4f
2018-07-31 11:06:22 +01:00
Emilien Macchi 9c7e375473 Fix TAG and playbooks logic for all upgrade type jobs
Some work in:
https://review.openstack.org/#/q/topic:toci_jobtype+(status:open+OR+status:merged)

Broke the containerized undercloud upgrade jobs and probably other
upgrade jobs, the TAG variable was overriden by featureset tags while we
need the upgrade tags as well.
This patch moves the logic after the 'case' that already managed a bunch
of tag. So as a result, we should have tags from the case and the tags
needed for the upgrade jobs.

Some other work in

https://review.openstack.org/582466

Broke our ability to stop at the first playbook failure, so if a
playbook fails, we continue to test the next in the list, and if that
passes, we are reporting a false positive

tripleo-common: Fix overwriting downloaded config files
Depends-On: Ib1d3c68ec3c4048ffc7277daf84834288ea50e48

Change-Id: I8330687ec64f1ebb7e3b100410d5bdc3e67ae7f0
Closes-Bug: #1783399
Closes-Bug: #1783857
2018-07-27 12:23:57 +02:00
Quique Llorente bae01d77e7 Move toci_quickstart variables to yaml
This are the variable replaced
- $UNDERCLOUD -> {{ undercloud }}
- $ENVIRONMENT ->  {{ environment_infra }}
- $PLAYBOOKS -> {{ playbooks }}

NOTE: 'environment' variable name is already taken
      that's why we use 'environment_infra'

They are stored at vars/{{ environment_type }}.yaml

Change-Id: I79d2b8b3a4bd1fbb46d80d82b9a946974c1cde8f
2018-07-26 07:39:26 +00:00
Quique Llorente 5d9a84fcf3 Set common vars at vars/common.yaml
For vars that are common to all the jobs, we can have a
vars/common.yaml file with it and add the appropiate
ansible task to read it

Included vars:
- tripleo_root
- workspace
- vxlan_vars
- extra_vars
- periodic

Also some bash input has being replaced by ansible counterpart:
- The variable 'ansible_user_id' is used instead of 'USER' bash env.

Change-Id: I3f741a78db854b7c0aa9c4751677d9a08b99228d
2018-07-19 11:47:20 +02:00
Quique Llorente 90d80f6570 Use toci scripts as templates for zuulv3
Change-Id: Ibd131a3da0906fb474178a1359de5f0788c59f54
2018-07-13 08:11:05 +00:00