Skip to content

Commit

Permalink
Add reproducer scenario for PIDONE VA
Browse files Browse the repository at this point in the history
This commit adds a scenario file with the parameters necessary
to deploy the "PIDONE VA", consisting in a 3 masters + 4 workers
OpenShift cluster with network isolation (ipv4).

Additionally, we need to expand networking-env-definition.yml to
include additional workers.

See openstack-k8s-operators/architecture#245
  • Loading branch information
lmiccini committed May 23, 2024
1 parent 1e6d717 commit dc54780
Show file tree
Hide file tree
Showing 2 changed files with 283 additions and 0 deletions.
153 changes: 153 additions & 0 deletions ci/playbooks/files/networking-env-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,159 @@ instances:
parent_interface: enp6s0
skip_nm: false
vlan_id: 22
ocp-worker-0:
hostname: ocp-worker-0
name: ocp-worker-0
networks:
ctlplane:
interface_name: enp6s0
ip_v4: 192.168.122.13
mac_addr: '0a:02:ca:be:0b:41'
mtu: 1500
network_name: ctlplane
skip_nm: false
internalapi:
interface_name: enp6s0.20
ip_v4: 172.17.0.13
mac_addr: '52:54:00:1b:6e:a6'
mtu: 1500
network_name: internalapi
parent_interface: enp6s0
skip_nm: false
vlan_id: 20
storage:
interface_name: enp6s0.21
ip_v4: 172.18.0.13
mac_addr: '52:54:00:56:fa:91'
mtu: 1500
network_name: storage
parent_interface: enp6s0
skip_nm: false
vlan_id: 21
tenant:
interface_name: enp6s0.22
ip_v4: 172.19.0.13
mac_addr: '52:54:00:18:a0:f9'
mtu: 1500
network_name: tenant
parent_interface: enp6s0
skip_nm: false
vlan_id: 22
ocp-worker-1:
hostname: ocp-worker-1
name: ocp-worker-1
networks:
ctlplane:
interface_name: enp6s0
ip_v4: 192.168.122.14
mac_addr: '0a:02:ca:be:0b:42'
mtu: 1500
network_name: ctlplane
skip_nm: false
internalapi:
interface_name: enp6s0.20
ip_v4: 172.17.0.14
mac_addr: '52:54:00:1b:6e:a7'
mtu: 1500
network_name: internalapi
parent_interface: enp6s0
skip_nm: false
vlan_id: 20
storage:
interface_name: enp6s0.21
ip_v4: 172.18.0.14
mac_addr: '52:54:00:56:fa:92'
mtu: 1500
network_name: storage
parent_interface: enp6s0
skip_nm: false
vlan_id: 21
tenant:
interface_name: enp6s0.22
ip_v4: 172.19.0.14
mac_addr: '52:54:00:18:a0:g0'
mtu: 1500
network_name: tenant
parent_interface: enp6s0
skip_nm: false
vlan_id: 22
ocp-worker-2:
hostname: ocp-worker-2
name: ocp-worker-2
networks:
ctlplane:
interface_name: enp6s0
ip_v4: 192.168.122.15
mac_addr: '0a:02:ca:be:0b:43'
mtu: 1500
network_name: ctlplane
skip_nm: false
internalapi:
interface_name: enp6s0.20
ip_v4: 172.17.0.15
mac_addr: '52:54:00:1b:6e:a8'
mtu: 1500
network_name: internalapi
parent_interface: enp6s0
skip_nm: false
vlan_id: 20
storage:
interface_name: enp6s0.21
ip_v4: 172.18.0.15
mac_addr: '52:54:00:56:fa:93'
mtu: 1500
network_name: storage
parent_interface: enp6s0
skip_nm: false
vlan_id: 21
tenant:
interface_name: enp6s0.22
ip_v4: 172.19.0.15
mac_addr: '52:54:00:18:a0:g1'
mtu: 1500
network_name: tenant
parent_interface: enp6s0
skip_nm: false
vlan_id: 22
ocp-worker-3:
hostname: ocp-worker-3
name: ocp-worker-3
networks:
ctlplane:
interface_name: enp6s0
ip_v4: 192.168.122.16
mac_addr: '0a:02:ca:be:0b:44'
mtu: 1500
network_name: ctlplane
skip_nm: false
internalapi:
interface_name: enp6s0.20
ip_v4: 172.17.0.16
mac_addr: '52:54:00:1b:6e:a9'
mtu: 1500
network_name: internalapi
parent_interface: enp6s0
skip_nm: false
vlan_id: 20
storage:
interface_name: enp6s0.21
ip_v4: 172.18.0.16
mac_addr: '52:54:00:56:fa:93'
mtu: 1500
network_name: storage
parent_interface: enp6s0
skip_nm: false
vlan_id: 21
tenant:
interface_name: enp6s0.22
ip_v4: 172.19.0.16
mac_addr: '52:54:00:18:a0:g2'
mtu: 1500
network_name: tenant
parent_interface: enp6s0
skip_nm: false
vlan_id: 22

networks:
ctlplane:
dns_v4:
Expand Down
130 changes: 130 additions & 0 deletions scenarios/reproducers/va-pidone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
# 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_architecture_scenario: pidone
cifmw_arch_automation_file: pidone.yaml

# HERE if you want to overload kustomization, you can uncomment this parameter
# and push the data structure you want to apply.
# cifmw_architecture_user_kustomize:
# stage_0:
# 'network-values':
# data:
# starwars: Obiwan

# HERE, if you want to stop the deployment loop at any stage, you can uncomment
# the following parameter and update the value to match the stage you want to
# reach. Known stages are:
# pre_kustomize_stage_INDEX
# pre_apply_stage_INDEX
# post_apply_stage_INDEX
#
# cifmw_deploy_architecture_stopper:

cifmw_libvirt_manager_configuration:
networks:
osp_trunk: |
<network>
<name>osp_trunk</name>
<forward mode='nat'/>
<bridge name='osp_trunk' stp='on' delay='0'/>
<ip family='ipv4'
address='{{ cifmw_networking_definition.networks.ctlplane.network |
ansible.utils.nthhost(1) }}'
prefix='{{ cifmw_networking_definition.networks.ctlplane.network |
ansible.utils.ipaddr('prefix') }}'>
</ip>
</network>
vms:
ocp:
amount: 3
admin_user: core
image_local_dir: "/home/dev-scripts/pool"
disk_file_name: "ocp_master"
disksize: "105"
xml_paths:
- /home/dev-scripts/ocp_master_0.xml
- /home/dev-scripts/ocp_master_1.xml
- /home/dev-scripts/ocp_master_2.xml
nets:
- osp_trunk
ocp_worker:
amount: 4
admin_user: core
image_local_dir: "/home/dev-scripts/pool"
disk_file_name: "ocp_worker"
disksize: "105"
xml_paths:
- /home/dev-scripts/ocp_worker_0.xml
- /home/dev-scripts/ocp_worker_1.xml
- /home/dev-scripts/ocp_worker_2.xml
- /home/dev-scripts/ocp_worker_3.xml
nets:
- osp_trunk
compute:
uefi: "{{ cifmw_use_uefi }}"
root_part_id: "{{ cifmw_root_partition_id }}"
amount: "{{ [cifmw_libvirt_manager_compute_amount|int, 3] | max }}"
image_url: "{{ cifmw_discovered_image_url }}"
sha256_image_name: "{{ cifmw_discovered_hash }}"
image_local_dir: "{{ cifmw_basedir }}/images/"
disk_file_name: "base-os.qcow2"
disksize: "{{ [cifmw_libvirt_manager_compute_disksize|int, 50] | max }}"
memory: "{{ [cifmw_libvirt_manager_compute_memory|int, 8] | max }}"
cpus: "{{ [cifmw_libvirt_manager_compute_cpus|int, 4] | max }}"
nets:
- ocpbm
- osp_trunk
controller:
uefi: "{{ cifmw_use_uefi }}"
root_part_id: "{{ cifmw_root_partition_id }}"
image_url: "{{ cifmw_discovered_image_url }}"
sha256_image_name: "{{ cifmw_discovered_hash }}"
image_local_dir: "{{ cifmw_basedir }}/images/"
disk_file_name: "base-os.qcow2"
disksize: 50
memory: 8
cpus: 4
nets:
- ocpbm
- osp_trunk


## devscript support for OCP deploy
cifmw_devscripts_config_overrides:
worker_memory: 16384
worker_disk: 100
worker_vcpu: 10
num_extra_workers: 0
num_workers: 4
fips_mode: "{{ cifmw_fips_enabled | default(false) | bool }}"

# this needs to be overridden otherwise there won't be enough
# subnets to assign to all the masters and workers
cluster_subnet_v4: "192.168.32.0/19"

# Note: with that extra_network_names "osp_trunk", we instruct
# devscripts role to create a new network, and associate it to
# the OCP nodes. This one is a "private network", and will hold
# the VLANs used for network isolation.

# Please create a custom env file to provide:
# cifmw_devscripts_ci_token:
# cifmw_devscripts_pull_secret:
#
# cifmw_install_yamls_defaults:
# NAMESPACE: openstack
#

cifmw_test_operator_tolerations:
- key: "testOperator"
value: "true"
effect: "NoSchedule"
- key: "testOperator"
value: "true"
effect: "NoExecute"
cifmw_test_operator_node_selector:
kubernetes.io/hostname: worker-3

0 comments on commit dc54780

Please sign in to comment.