Skip to content

Commit

Permalink
Add PIDONE VA
Browse files Browse the repository at this point in the history
This commit add a "PIDONE Validated Architecture" composed by:

- 3 x ocp masters
- 3 x ocp workers
- 1 x testOperator-tainted ocp worker

The additional workers are required so that we can perform
disruptive tests simulating ocp failures (reboots/crashes/etc).

Similarly, we need a special worker that would only run
testoperator pods so that the tests will not be affected by
the simulated infrastructure failures.
  • Loading branch information
lmiccini committed May 23, 2024
1 parent b6f7811 commit eb0d9e9
Show file tree
Hide file tree
Showing 16 changed files with 1,354 additions and 0 deletions.
66 changes: 66 additions & 0 deletions automation/vars/pidone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
vas:
pidone:
stages:
- pre_stage_run:
- name: Apply taint on worker-3
type: cr
definition:
spec:
taints:
- effect: NoSchedule
key: testOperator
value: 'true'
- effect: NoExecute
key: testOperator
value: 'true'
kind: Node
resource_name: worker-3
state: patched
path: examples/va/pidone/nncp
wait_conditions:
- >-
oc -n openstack wait nncp
-l osp/nncm-config-type=standard
--for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured
--timeout=60s
values:
- name: network-values
src_file: values.yaml
build_output: nncp.yaml

- path: examples/va/pidone
wait_conditions:
- >-
oc -n openstack wait osctlplane controlplane --for condition=Ready
--timeout=30m
values:
- name: network-values
src_file: nncp/values.yaml
- name: service-values
src_file: service-values.yaml
build_output: control-plane.yaml

- path: examples/va/pidone/edpm/nodeset
wait_conditions:
- >-
oc -n openstack wait openstackdataplanenodeset
openstack-edpm
--for condition=SetupReady
--timeout=600s
values:
- name: edpm-nodeset-values
src_file: values.yaml
build_output: nodeset.yaml

- path: examples/va/pidone/edpm/deployment
wait_conditions:
- >-
oc -n openstack wait openstackdataplanedeployment
edpm-deployment
--for condition=Ready
--timeout=40m
values:
- name: edpm-deployment-values
src_file: values.yaml
build_output: deployment.yaml
12 changes: 12 additions & 0 deletions examples/va/pidone/edpm/deployment/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../va/pidone/edpm/deployment
# - https://github.com/openstack-k8s-operators/architecture/va/nfv/sriov/edpm/deployment?ref=main
## It's possible to replace ../../../../../../va/nfv/sriov/edpm/deployment/ with a git checkout URL as per:
## https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md

resources:
- values.yaml
12 changes: 12 additions & 0 deletions examples/va/pidone/edpm/deployment/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# yamllint disable rule:line-length
# local-config: referenced, but not emitted by kustomize
---
apiVersion: v1
kind: ConfigMap
metadata:
name: edpm-deployment-values
annotations:
config.kubernetes.io/local-config: "true"
data:
deployment:
name: edpm-deployment
9 changes: 9 additions & 0 deletions examples/va/pidone/edpm/nodeset/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../../../va/pidone/edpm/nodeset

resources:
- values.yaml
172 changes: 172 additions & 0 deletions examples/va/pidone/edpm/nodeset/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# yamllint disable rule:line-length
# local-config: referenced, but not emitted by kustomize
---
apiVersion: v1
kind: ConfigMap
metadata:
name: edpm-nodeset-values
annotations:
config.kubernetes.io/local-config: "true"
data:
ssh_keys:
# Authorized keys that will have access to the dataplane computes via SSH
authorized: CHANGEME
# The private key that will have access to the dataplane computes via SSH
private: CHANGEME2
# The public key that will have access to the dataplane computes via SSH
public: CHANGEME3
nodeset:
ansible:
ansibleUser: cloud-admin
ansiblePort: 22
ansibleVars:
timesync_ntp_servers:
- hostname: clock.redhat.com
# CHANGEME -- see https://access.redhat.com/solutions/253273
# edpm_bootstrap_command: |
# subscription-manager register --username <subscription_manager_username> \
# --password <subscription_manager_password>
# podman login -u <registry_username> -p <registry_password> registry.redhat.io
edpm_network_config_hide_sensitive_logs: false
edpm_network_config_os_net_config_mappings:
edpm-compute-0:
nic2: 6a:fe:54:3f:8a:02 # CHANGEME
edpm-compute-1:
nic2: 6b:fe:54:3f:8a:02 # CHANGEME
edpm-compute-2:
nic2: 6c:fe:54:3f:8a:02 # CHANGEME
edpm_network_config_template: |
---
{% set mtu_list = [ctlplane_mtu] %}
{% for network in nodeset_networks %}
{{ mtu_list.append(lookup('vars', networks_lower[network] ~ '_mtu')) }}
{%- endfor %}
{% set min_viable_mtu = mtu_list | max %}
network_config:
- type: interface
name: nic1
use_dhcp: true
mtu: {{ min_viable_mtu }}
- type: ovs_bridge
name: {{ neutron_physical_bridge_name }}
mtu: {{ min_viable_mtu }}
use_dhcp: false
dns_servers: {{ ctlplane_dns_nameservers }}
domain: {{ dns_search_domains }}
addresses:
- ip_netmask: {{ ctlplane_ip }}/{{ ctlplane_cidr }}
routes: {{ ctlplane_host_routes }}
members:
- type: interface
name: nic2
mtu: {{ min_viable_mtu }}
# force the MAC address of the bridge to this interface
primary: true
{% for network in nodeset_networks %}
- type: vlan
mtu: {{ lookup('vars', networks_lower[network] ~ '_mtu') }}
vlan_id: {{ lookup('vars', networks_lower[network] ~ '_vlan_id') }}
addresses:
- ip_netmask:
{{ lookup('vars', networks_lower[network] ~ '_ip') }}/{{ lookup('vars', networks_lower[network] ~ '_cidr') }}
routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }}
{% endfor %}
edpm_nodes_validation_validate_controllers_icmp: false
edpm_nodes_validation_validate_gateway_icmp: false
edpm_selinux_mode: enforcing
edpm_sshd_allowed_ranges:
- 192.168.122.0/24
edpm_sshd_configure_firewall: true
enable_debug: false
gather_facts: false
neutron_physical_bridge_name: br-ex
neutron_public_interface_name: eth0
service_net_map:
nova_api_network: internalapi
nova_libvirt_network: internalapi
storage_mtu: 9000
storage_mgmt_mtu: 9000
storage_mgmt_vlan_id: 23
storage_mgmt_cidr: "24"
storage_mgmt_host_routes: []
networks:
- defaultRoute: true
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: tenant
subnetName: subnet1
nodes:
edpm-compute-0:
ansible:
ansibleHost: 192.168.122.100
hostName: edpm-compute-0
networks:
- defaultRoute: true
fixedIP: 192.168.122.100
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
- name: tenant
subnetName: subnet1
edpm-compute-1:
ansible:
ansibleHost: 192.168.122.101
hostName: edpm-compute-1
networks:
- defaultRoute: true
fixedIP: 192.168.122.101
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
- name: tenant
subnetName: subnet1
edpm-compute-2:
ansible:
ansibleHost: 192.168.122.102
hostName: edpm-compute-2
networks:
- defaultRoute: true
fixedIP: 192.168.122.102
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
- name: tenant
subnetName: subnet1
services:
- bootstrap
- configure-network
- validate-network
- install-os
- configure-os
- ssh-known-hosts
- run-os
- reboot-os
- install-certs
- ovn
- neutron-metadata
- libvirt
- nova
nova:
migration:
ssh_keys:
private: CHANGEME4
public: CHANGEME5
10 changes: 10 additions & 0 deletions examples/va/pidone/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

components:
- ../../../va/pidone

resources:
- nncp/values.yaml
- service-values.yaml
Loading

0 comments on commit eb0d9e9

Please sign in to comment.