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
son-vyas authored Apr 4, 2024
2 parents daa1bcf + 358194e commit 092a395
Show file tree
Hide file tree
Showing 9 changed files with 199 additions and 149 deletions.
15 changes: 15 additions & 0 deletions docs/dictionary/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ ansibleuser
ansiblevars
apiversion
apivips
appcreds
applicationcredential
aqc
args
arx
Expand All @@ -24,6 +26,7 @@ basedomain
baseimg
baseurl
bashrc
bd
blockquote
bmaas
bmc
Expand Down Expand Up @@ -99,6 +102,7 @@ dataplanenodeset
dataplanenodesets
dd'd
ddr
ddthh
deepscrub
delorean
deployer
Expand All @@ -108,6 +112,7 @@ dev
devscripts
devsetup
dfb
dfce
dfg
dhcp
dib
Expand All @@ -125,6 +130,7 @@ dnsmasq
dockerfile
dryrun
ecdsa
edecb
edploy
edpm
ee
Expand Down Expand Up @@ -169,6 +175,7 @@ gzwu
haproxy
hbmfnzwqkcltnbg
hci
hfu
hostkey
hostname
hostnames
Expand Down Expand Up @@ -207,6 +214,7 @@ jira
jmespath
jq
json
jxe
jzxbol
kcgpby
keepalived
Expand All @@ -230,6 +238,7 @@ kustomized
kuttl
kvm
lacp
lajly
ldp
libguestfs
libvirt
Expand All @@ -243,6 +252,7 @@ lkid
lmxpynzpcnrdcmfkbwluihnvy
localhost
localnet
logfile
logserver
loopback
losetup
Expand Down Expand Up @@ -306,6 +316,7 @@ ntp
num
nvme
nwy
nzgdh
oauth
oc
ocp
Expand All @@ -328,6 +339,7 @@ openstackdataplane
openstackdataplanenodeset
openstackdataplanenodesets
openstackprovisioner
openstacksdk
operatorgroup
opn
orchestrator
Expand Down Expand Up @@ -409,8 +421,10 @@ rsa
rsync
runtime
scp
sdk
selinux
sha
sig
skbg
skiplist
specificities
Expand Down Expand Up @@ -514,6 +528,7 @@ yml
ytm
yxivcnvul
yyoje
yyyy
zlcbwcm
zm
zpbgugcmjkihbvb
Expand Down
2 changes: 1 addition & 1 deletion docs/source/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cd ${DOCS_DIR}/source
SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])')
# install the cifmw collection from source without dependencies (removes the
# need for any symlink)
ansible-galaxy collection install -U -n ../.. -p "${SITE_PACKAGES}"
ansible-galaxy collection install -U ../.. -p "${SITE_PACKAGES}"

make clean
make html
Expand Down
2 changes: 2 additions & 0 deletions docs/source/usage/01_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ are shared among multiple roles:
- `cifmw_arch_automation_file`: (String) Name of the workflow automation file
in the architecture repository. Defaults to `default.yaml`
- `cifmw_architecture_scenario`: (String) The selected VA scenario to deploy.
- `cifmw_architecture_wait_condition`: (Dict) Structure defining custom wait_conditions for the automation.
- `cifmw_architecture_user_kustomize`: (Dict) Structure defining user provided kustomization for automation.
- `cifmw_ceph_target`: (String) The Ansible inventory group where ceph is deployed. Defaults to `computes`.
- `cifmw_run_tests`: (Bool) Specifies whether tests should be executed.
Defaults to false.
Expand Down
6 changes: 4 additions & 2 deletions playbooks/nfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
- not cifmw_edpm_deploy_nfs | default('false') | bool
ansible.builtin.meta: end_play
tasks:
- name: Install nfs-utils package
- name: Install required packages
ansible.builtin.package:
name: "nfs-utils"
name:
- nfs-utils
- iptables

- name: Configure nfs to use v4 only
community.general.ini_file:
Expand Down
111 changes: 0 additions & 111 deletions plugins/doc_fragments/openstack.py

This file was deleted.

28 changes: 21 additions & 7 deletions roles/kustomize_deploy/tasks/execute_step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,32 @@
ansible.builtin.command:
cmd: "oc apply -f {{ _cr }}"

- name: "Run Wait Conditions for {{ stage.path }}"
- name: "Build Wait Conditions for {{ stage.path }}"
when:
- not cifmw_kustomize_deploy_generate_crs_only | bool
vars:
_stage_name: "stage_{{ stage_id }}"
_custom_conditions: >-
{{
cifmw_architecture_wait_condition[_stage_name] |
default([])
}}
## TODO: remove "validations" once architecture is up-to-date
_commands: >-
{{
(stage['wait_conditions'] |
default(stage['validations'])) + _custom_conditions
}}
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
ansible.builtin.command:
cmd: "{{ wait_condition }}"
## TODO: remove "validations" once architecture is up-to-date
loop: "{{ stage['wait_conditions'] | default(stage['validations']) }}"
loop_control:
loop_var: wait_condition
block:
- name: "Run Wait Conditions for {{ stage.path }}"
ansible.builtin.command:
cmd: "{{ wait_condition }}"
loop: "{{ _commands }}"
loop_control:
loop_var: wait_condition

- name: Stop after applying CRs if requested
when:
Expand Down
31 changes: 21 additions & 10 deletions roles/libvirt_manager/molecule/deploy_layout/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.

- name: Converge
- name: One hypervisor
hosts: instance
gather_facts: true
vars:
Expand Down Expand Up @@ -243,31 +243,42 @@
- expected_count == found_count
loop: "{{ volume_count.results }}"

- name: Cleanup
- name: Cleanup one hypervisor
hosts: instance
tasks:
- name: Clean layout
ansible.builtin.import_role:
name: libvirt_manager
tasks_from: clean_layout.yml

- name: Reload clean inventory
ansible.builtin.meta: refresh_inventory

- name: Expose current hosts
ansible.builtin.debug:
msg: "{{ hostvars.keys() }}"

- name: Inject fake hosts in inventory
hosts: instance
tasks:
- name: Inject compute-0 in inventory
- name: Inject hypervisor-0 in inventory
ansible.builtin.add_host:
name: compute-0
name: hypervisor-0
groups:
- hypervisors
ansible_host: localhost
ansible_connection: local

- name: Inject compute-1 in inventory
- name: Inject hypervisor-1 in inventory
ansible.builtin.add_host:
name: compute-1
name: hypervisor-1
groups:
- hypervisors
ansible_host: localhost
ansible_connection: local

- name: Converge
hosts: all
- name: Multiple hypervisors
hosts: hypervisors
vars:
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
cifmw_basedir: "/opt/basedir"
Expand All @@ -287,7 +298,7 @@
cifmw_libvirt_manager_configuration:
vms:
computecp0:
target: compute-0
target: hypervisor-0
amount: 1
disk_file_name: "blank"
disksize: 20
Expand All @@ -297,7 +308,7 @@
- public
- osp_trunk
computecp1:
target: compute-1
target: hypervisor-1
amount: 1
disk_file_name: "blank"
disksize: 20
Expand Down
Loading

0 comments on commit 092a395

Please sign in to comment.