-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Prepare crc job for architecture repo
- Loading branch information
Showing
6 changed files
with
145 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
--- | ||
# Usage and expected parameters | ||
# $ ansible-playbook run-architecture.yml \ | ||
# -e cifmw_architecture_repo=$HOME/architecture \ | ||
# -e cifmw_architecture_scenario=hci \ | ||
# -e cifmw_networking_mapper_networking_env_def_path=$HOME/net-env.yml | ||
# [any other parameter/files your VA/DT might need] | ||
# | ||
# cifmw_architecture_repo: location of the architecture repository. | ||
# cifmw_architecture_scenario: the scenario you want to test. | ||
# cifmw_networking_mapper_networking_env_def_path: path to the | ||
# networking-mapper environment definition file. | ||
# | ||
# Special parameters set in the playbook (you can override them) | ||
# cifmw_basedir: defaults to ~/ci-framework-data | ||
# cifmw_zuul_target_host: target host. Defaults to localhost | ||
|
||
- name: Test architecture automations | ||
hosts: "{{ cifmw_zuul_target_host | default('controller') }}" | ||
gather_facts: true | ||
vars: | ||
_homedir: "{{ ansible_user_dir | default(lookup('env', 'HOME')) }}" | ||
cifmw_basedir: >- | ||
{{ | ||
(_homedir, | ||
'ci-framework-data') | | ||
path_join | ||
}} | ||
cifmw_path: >- | ||
{{ | ||
['~/bin', | ||
ansible_env.PATH] | join(':') | ||
}} | ||
pre_tasks: | ||
# This allows to create a custom scenario file that would | ||
# just override some parts of an existing one. | ||
# For example, you create a DT based on the va-hci.yml. | ||
# You will then just add | ||
# `cifmw_parent_scenario: scenarios/reproducers/va-hci.yml` | ||
# in the file, and override/extend the scenario to match your | ||
# needs. | ||
# The parameter also supports a list of files if needed. | ||
# | ||
# File path are relative to the root of the ci-framework repository. | ||
- name: Inherit from parent parameter file if instructed | ||
vars: | ||
_file_list: >- | ||
{% if cifmw_parent_scenario is defined and | ||
cifmw_parent_scenario is string -%} | ||
{{ [cifmw_parent_scenario] }} | ||
{% elif cifmw_parent_scenario is defined and | ||
cifmw_parent_scenario is not string and | ||
cifmw_parent_scenario is iterable -%} | ||
{{ cifmw_parent_scenario }} | ||
{% else %} | ||
{{ [] }} | ||
{% endif %} | ||
when: | ||
- item is exists | ||
ansible.builtin.include_vars: | ||
file: "{{ item }}" | ||
loop: "{{ _file_list }}" | ||
|
||
- name: Assert we have the bare minimum to run | ||
ansible.builtin.assert: | ||
quiet: true | ||
that: | ||
- cifmw_architecture_repo is defined | ||
- cifmw_architecture_scenario is defined | ||
- cifmw_networking_mapper_networking_env_def_path is defined | ||
|
||
- name: Deploy basic dependencies | ||
ansible.builtin.import_role: | ||
name: 'ci_setup' | ||
|
||
- name: Create needed directories | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
mode: "0755" | ||
loop: | ||
- "{{ cifmw_basedir }}/logs" | ||
- "{{ cifmw_basedir }}/artifacts" | ||
tasks: | ||
- name: Load networking mapper environment | ||
ansible.builtin.import_role: | ||
name: "networking_mapper" | ||
tasks_from: "load_env_definition.yml" | ||
|
||
- name: Deploy VA with crc | ||
ansible.builtin.import_role: | ||
name: 'reproducer' | ||
tags: | ||
- "deploy_architecture" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
cifmw_architecture_scenario: hci | ||
|
||
# Automation section. Most of those parameters will be passed to the | ||
# controller-0 as-is and be consumed by the `deploy-va.sh` script. | ||
# Please note, all paths are on the controller-0, meaning managed by the | ||
# Framework. Please do not edit them! | ||
_arch_repo: "/home/zuul/src/github.com/openstack-k8s-operators/architecture" | ||
cifmw_ceph_client_vars: /tmp/ceph_client.yml | ||
cifmw_ceph_client_values_post_ceph_path_src: >- | ||
{{ _arch_repo }}/examples/va/hci/values.yaml | ||
cifmw_ceph_client_values_post_ceph_path_dst: >- | ||
{{ cifmw_ceph_client_values_post_ceph_path_src }} | ||
cifmw_ceph_client_service_values_post_ceph_path_src: >- | ||
{{ _arch_repo }}/examples/va/hci/service-values.yaml | ||
cifmw_ceph_client_service_values_post_ceph_path_dst: >- | ||
{{ cifmw_ceph_client_service_values_post_ceph_path_src }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
cifmw_parent_scenario: "scenarios/reproducers/va-hci-base.yml" | ||
|
||
# Test Ceph file and object storage (block is enabled by default) | ||
cifmw_ceph_daemons_layout: | ||
rgw_enabled: true | ||
dashboard_enabled: false | ||
cephfs_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters