Skip to content

Commit

Permalink
Merge branch 'main' into test_operator
Browse files Browse the repository at this point in the history
  • Loading branch information
raukadah authored Apr 5, 2024
2 parents 5e6bd0a + 59b550e commit 5836919
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
1 change: 1 addition & 0 deletions playbooks/ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@
cifmw_ceph_client_fetch_dir: /tmp
cifmw_ceph_client_k8s_secret_name: ceph-conf-files
cifmw_ceph_client_k8s_namespace: openstack
cifmw_ceph_client_cluster: "{{ cifmw_cephadm_cluster | default('ceph') }}"
pre_tasks:
# end_play will end this current playbook and go the the next
# imported play.
Expand Down
4 changes: 2 additions & 2 deletions roles/cifmw_ceph_client/templates/k8s_ceph_secret.yml.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v1
data:
ceph.client.openstack.keyring: {{ cifmw_ceph_client_key_file_b64.content }}
ceph.conf: {{ cifmw_ceph_client_conf_file_b64.content }}
{{ cifmw_ceph_client_cluster | default('ceph') }}.client.openstack.keyring: {{ cifmw_ceph_client_key_file_b64.content }}
{{ cifmw_ceph_client_cluster | default('ceph') }}.conf: {{ cifmw_ceph_client_conf_file_b64.content }}
kind: Secret
metadata:
name: {{ cifmw_ceph_client_k8s_secret_name }}
Expand Down
1 change: 1 addition & 0 deletions roles/reproducer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ None
## Parameters
* `cifmw_reproducer_basedir`: (String) Base directory. Defaults to `cifmw_basedir`, which defaults to `~/ci-framework-data`.
* `cifmw_reproducer_compute_repos`: (List[mapping]) List of yum repository that must be deployed on the compute nodes during their creation. Defaults to `[]`.
* `cifmw_reproducer_play_extravars`: (List[string]) List of extra-vars you want to pass down to the EDPM deployment playbooks. Defaults to `[]`.
* `cifmw_reproducer_kubecfg`: (String) Path to the CRC kubeconfig file. Defaults to the image_local_dir defined in the cifmw_libvirt_manager_configuration dict.
* `cifmw_reproducer_repositories`: (List[mapping]) List of repositories you want to synchronize from your local machine to the ansible controller.
* `cifmw_reproducer_run_job`: (Bool) Run actual CI job. Defaults to `true`.
Expand Down
1 change: 1 addition & 0 deletions roles/reproducer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ cifmw_reproducer_hp_rhos_release: false
cifmw_reproducer_dnf_tweaks: []
cifmw_reproducer_compute_repos: []
cifmw_reproducer_repositories_path: "src"
cifmw_reproducer_play_extravars: []
22 changes: 11 additions & 11 deletions roles/reproducer/tasks/configure_architecture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
delegate_to: controller-0
block:
- name: Push script
ansible.builtin.copy:
vars:
run_directory: "src/github.com/openstack-k8s-operators/ci-framework"
exports:
ANSIBLE_LOG_PATH: "~/ansible-deploy-architecture.log"
default_extravars:
- "@~/reproducer-variables.yml"
- "@~/openshift-environment.yml"
extravars: "{{ cifmw_reproducer_play_extravars }}"
playbook: "deploy-edpm.yml"
ansible.builtin.template:
dest: "/home/zuul/deploy-architecture.sh"
src: "script.sh.j2"
mode: "0755"
owner: "zuul"
group: "zuul"
content: |-
#!/bin/bash
set -e
pushd src/github.com/openstack-k8s-operators/ci-framework
export ANSIBLE_LOG_PATH="~/ansible-deploy-architecture.log"
ansible-playbook -i ~/ci-framework-data/artifacts/zuul_inventory.yml \
-e @~/reproducer-variables.yml \
-e @~/openshift-environment.yml \
deploy-edpm.yml --flush-cache $@
popd

- name: Rotate some logs
tags:
Expand Down
24 changes: 12 additions & 12 deletions roles/reproducer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,19 @@

- name: Prepare ci-like EDPM deploy
delegate_to: controller-0
ansible.builtin.copy:
vars:
run_directory: "src/github.com/openstack-k8s-operators/ci-framework"
exports:
ANSIBLE_LOG_PATH: "~/ansible-deploy-edpm.log"
default_extravars:
- "@scenarios/centos-9/base.yml"
- "@scenarios/centos-9/edpm_ci.yml"
- "cifmw_openshift_password='{{ cifmw_openshift_password }}'"
extravars: "{{ cifmw_reproducer_play_extravars }}"
playbook: "deploy-edpm.yml"
ansible.builtin.template:
dest: "/home/zuul/deploy-edpm.sh"
src: "script.sh.j2"
mode: "0755"
owner: "zuul"
group: "zuul"
content: |-
#!/bin/bash
set -e
pushd src/github.com/openstack-k8s-operators/ci-framework
export ANSIBLE_LOG_PATH="~/ansible-deploy-edpm.log"
ansible-playbook deploy-edpm.yml \
-e @scenarios/centos-9/base.yml \
-e @scenarios/centos-9/edpm_ci.yml \
-e cifmw_openshift_password="{{ cifmw_openshift_password }}" \
--flush-cache $@
popd
16 changes: 16 additions & 0 deletions roles/reproducer/templates/script.sh.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -e
pushd {{ run_directory}}
{% for export in exports | dict2items %}
export {{ export.key }}="{{ export.value }}"
{% endfor %}

ansible-playbook -i ~/ci-framework-data/artifacts/zuul_inventory.yml \
{% for extravar in default_extravars %}
-e {{ extravar }} \
{% endfor %}
{% for extravar in extravars %}
-e {{ extravar }} \
{% endfor %}
{{ playbook }} --flush-cache $@
popd

0 comments on commit 5836919

Please sign in to comment.