From c7b1d4437d5b76196da3422aa73cbbb46f7e6f1e Mon Sep 17 00:00:00 2001 From: jamepark4 Date: Tue, 10 Sep 2024 14:39:45 -0400 Subject: [PATCH] Add multi-cell DT --- automation/vars/nova-multiplecells.yaml | 61 +++++ dt/nova/multiplecells/README.md | 11 + .../edpm/deployment/kustomization.yaml | 21 ++ dt/nova/multiplecells/edpm/kustomization.yaml | 20 ++ .../edpm/nodeset/kustomization.yaml | 20 ++ dt/nova/multiplecells/kustomization.yaml | 59 +++++ dt/nova/multiplecells/namespace.yaml | 12 + examples/dt/nova/multiplecells/README.md | 28 +++ .../dt/nova/multiplecells/control-plane.md | 2 + .../control-plane/kustomization.yaml | 10 + .../control-plane/nncp/kustomization.yaml | 23 ++ .../control-plane/nncp/values.yaml | 224 ++++++++++++++++++ .../control-plane/service-values.yaml | 64 +++++ examples/dt/nova/multiplecells/data-plane.md | 2 + .../edpm/deployment/kustomization.yaml | 18 ++ .../multiplecells/edpm/deployment/values.yaml | 10 + .../edpm/nodeset/kustomization.yaml | 9 + .../multiplecells/edpm/nodeset/values.yaml | 121 ++++++++++ .../edpm/nodeset2/kustomization.yaml | 18 ++ .../multiplecells/edpm/nodeset2/values.yaml | 121 ++++++++++ .../dt/nova/multiplecells/kustomization.yaml | 9 + examples/dt/nova/multiplecells/values.yaml | 130 ++++++++++ 22 files changed, 993 insertions(+) create mode 100644 automation/vars/nova-multiplecells.yaml create mode 100644 dt/nova/multiplecells/README.md create mode 100644 dt/nova/multiplecells/edpm/deployment/kustomization.yaml create mode 100644 dt/nova/multiplecells/edpm/kustomization.yaml create mode 100644 dt/nova/multiplecells/edpm/nodeset/kustomization.yaml create mode 100644 dt/nova/multiplecells/kustomization.yaml create mode 100644 dt/nova/multiplecells/namespace.yaml create mode 100644 examples/dt/nova/multiplecells/README.md create mode 100644 examples/dt/nova/multiplecells/control-plane.md create mode 100644 examples/dt/nova/multiplecells/control-plane/kustomization.yaml create mode 100644 examples/dt/nova/multiplecells/control-plane/nncp/kustomization.yaml create mode 100644 examples/dt/nova/multiplecells/control-plane/nncp/values.yaml create mode 100644 examples/dt/nova/multiplecells/control-plane/service-values.yaml create mode 100644 examples/dt/nova/multiplecells/data-plane.md create mode 100644 examples/dt/nova/multiplecells/edpm/deployment/kustomization.yaml create mode 100644 examples/dt/nova/multiplecells/edpm/deployment/values.yaml create mode 100644 examples/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml create mode 100644 examples/dt/nova/multiplecells/edpm/nodeset/values.yaml create mode 100644 examples/dt/nova/multiplecells/edpm/nodeset2/kustomization.yaml create mode 100644 examples/dt/nova/multiplecells/edpm/nodeset2/values.yaml create mode 100644 examples/dt/nova/multiplecells/kustomization.yaml create mode 100644 examples/dt/nova/multiplecells/values.yaml diff --git a/automation/vars/nova-multiplecells.yaml b/automation/vars/nova-multiplecells.yaml new file mode 100644 index 000000000..cee4053d5 --- /dev/null +++ b/automation/vars/nova-multiplecells.yaml @@ -0,0 +1,61 @@ +--- +vas: + nova-multiplecells: + stages: + - path: examples/dt/nova/multiplecells/control-plane/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/dt/nova/multiplecells/control-plane + wait_conditions: + - >- + oc -n openstack wait osctlplane controlplane --for condition=Ready + --timeout=1200s + values: + - name: network-values + src_file: nncp/values.yaml + - name: service-values + src_file: service-values.yaml + build_output: control-plane.yaml + + - path: examples/dt/nova/multiplecells/edpm/nodeset + wait_conditions: + - >- + oc -n openstack wait + osdpns openstack-edpm --for condition=SetupReady + --timeout=60m + values: + - name: edpm-nodeset-values + src_file: values.yaml + build_output: nodeset.yaml + + - path: examples/dt/nova/multiplecells/edpm/nodeset2 + wait_conditions: + - >- + oc -n openstack wait + osdpns openstack-edpm-2 --for condition=SetupReady + --timeout=60m + values: + - name: edpm-nodeset2-values + src_file: values.yaml + build_output: nodeset2.yaml + + - path: examples/dt/nova/multiplecells/edpm/deployment + wait_conditions: + - >- + oc -n openstack wait openstackdataplanedeployment + edpm-deployment --for condition=Ready + --timeout=60m + values: + - name: edpm-deployment-values + src_file: values.yaml + build_output: deployment.yaml + diff --git a/dt/nova/multiplecells/README.md b/dt/nova/multiplecells/README.md new file mode 100644 index 000000000..b6c81d3d3 --- /dev/null +++ b/dt/nova/multiplecells/README.md @@ -0,0 +1,11 @@ +# Deployed Topology - Nova/MultipleCells + +If you are looking for information on how to deploy the multiplecells based DT, then +please the [README](../../examples/dt/nova/multiplecells/README.md) in the examples +directory. + +This directory `dt/nova/multiplecells/`, exists so that the +[kustomization.yaml](../../examples/dt/nova/multiplecells/kustomization.yaml) in +the examples directory of nova-multiplecells topology, reference it by path as a +component. It's contents are likely uninteresting unless you want to understand +how kustomize was implemented in this repository. diff --git a/dt/nova/multiplecells/edpm/deployment/kustomization.yaml b/dt/nova/multiplecells/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..35ccc4852 --- /dev/null +++ b/dt/nova/multiplecells/edpm/deployment/kustomization.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + # Set namespace to OpenStack on all namespaced objects without a namespace + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/dataplane/deployment diff --git a/dt/nova/multiplecells/edpm/kustomization.yaml b/dt/nova/multiplecells/edpm/kustomization.yaml new file mode 100644 index 000000000..a0545c8e5 --- /dev/null +++ b/dt/nova/multiplecells/edpm/kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../lib/dataplane diff --git a/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml b/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml new file mode 100644 index 000000000..5758cebdc --- /dev/null +++ b/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../lib/dataplane/nodeset diff --git a/dt/nova/multiplecells/kustomization.yaml b/dt/nova/multiplecells/kustomization.yaml new file mode 100644 index 000000000..31b0e01ef --- /dev/null +++ b/dt/nova/multiplecells/kustomization.yaml @@ -0,0 +1,59 @@ +--- +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../lib/networking/metallb + - ../../../lib/networking/netconfig + - ../../../lib/networking/nad + - ../../../lib/control-plane + +replacements: + - source: + kind: ConfigMap + name: service-values + fieldPath: data.galera.templates + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.galera.templates + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.rabbitmq.templates + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.rabbitmq.templates + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.nova.template.cellTemplates + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.cellTemplates + options: + create: true + diff --git a/dt/nova/multiplecells/namespace.yaml b/dt/nova/multiplecells/namespace.yaml new file mode 100644 index 000000000..60a6e8c42 --- /dev/null +++ b/dt/nova/multiplecells/namespace.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: builtin +kind: NamespaceTransformer +metadata: + name: _ignored_ + namespace: openstack +setRoleBindingSubjects: none +unsetOnly: true +fieldSpecs: + - path: metadata/name + kind: Namespace + create: true diff --git a/examples/dt/nova/multiplecells/README.md b/examples/dt/nova/multiplecells/README.md new file mode 100644 index 000000000..ec709696f --- /dev/null +++ b/examples/dt/nova/multiplecells/README.md @@ -0,0 +1,28 @@ +# Deployed Topology - Nova/MultipleCells + +TBD + +## Purpose + +TBD + +## Environment + +### Nodes + + +## Node topology +TBD + +### Networks +TBD + +#### Networks in RH OSP +TBD + +### Services, enabled features and configurations +TBD + +#### Support services +TBD + diff --git a/examples/dt/nova/multiplecells/control-plane.md b/examples/dt/nova/multiplecells/control-plane.md new file mode 100644 index 000000000..b261cd751 --- /dev/null +++ b/examples/dt/nova/multiplecells/control-plane.md @@ -0,0 +1,2 @@ +# Configuring networking and deploy the OpenStack control plane +TBD diff --git a/examples/dt/nova/multiplecells/control-plane/kustomization.yaml b/examples/dt/nova/multiplecells/control-plane/kustomization.yaml new file mode 100644 index 000000000..4da500d3d --- /dev/null +++ b/examples/dt/nova/multiplecells/control-plane/kustomization.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../dt/nova/multiplecells + +resources: + - nncp/values.yaml + - service-values.yaml diff --git a/examples/dt/nova/multiplecells/control-plane/nncp/kustomization.yaml b/examples/dt/nova/multiplecells/control-plane/nncp/kustomization.yaml new file mode 100644 index 000000000..b75ee5150 --- /dev/null +++ b/examples/dt/nova/multiplecells/control-plane/nncp/kustomization.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +transformers: + - |- + apiVersion: builtin + kind: NamespaceTransformer + metadata: + name: _ignored_ + namespace: openstack + setRoleBindingSubjects: none + unsetOnly: true + fieldSpecs: + - path: metadata/name + kind: Namespace + create: true + +components: + - ../../../../../../lib/nncp + +resources: + - values.yaml diff --git a/examples/dt/nova/multiplecells/control-plane/nncp/values.yaml b/examples/dt/nova/multiplecells/control-plane/nncp/values.yaml new file mode 100644 index 000000000..8916d9a68 --- /dev/null +++ b/examples/dt/nova/multiplecells/control-plane/nncp/values.yaml @@ -0,0 +1,224 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: network-values + annotations: + config.kubernetes.io/local-config: "true" + +data: + openstack-operator-image: "quay.io/openstack-k8s-operators/openstack-operator-index:latest" + + node_0: + name: master-0 + internalapi_ip: 172.17.0.10 + tenant_ip: 172.19.0.10 + ctlplane_ip: 192.168.122.10 + storage_ip: 172.18.0.10 + node_1: + name: master-1 + internalapi_ip: 172.17.0.11 + tenant_ip: 172.19.0.11 + ctlplane_ip: 192.168.122.11 + storage_ip: 172.18.0.11 + node_2: + name: master-2 + internalapi_ip: 172.17.0.12 + tenant_ip: 172.19.0.12 + ctlplane_ip: 192.168.122.12 + storage_ip: 172.18.0.12 + + ctlplane: + dnsDomain: ctlplane.example.com + subnets: + - allocationRanges: + - end: 192.168.122.120 + start: 192.168.122.100 + - end: 192.168.122.200 + start: 192.168.122.150 + cidr: 192.168.122.0/24 + gateway: 192.168.122.1 + name: subnet1 + prefix-length: 24 + iface: enp6s0 + mtu: 9000 + lb_addresses: + - 192.168.122.80-192.168.122.90 + endpoint_annotations: + metallb.universe.tf/address-pool: ctlplane + metallb.universe.tf/allow-shared-ip: ctlplane + metallb.universe.tf/loadBalancerIPs: 192.168.122.80 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "ctlplane", + "type": "macvlan", + "master": "ospbr", + "ipam": { + "type": "whereabouts", + "range": "192.168.122.0/24", + "range_start": "192.168.122.30", + "range_end": "192.168.122.70" + } + } + internalapi: + dnsDomain: internalapi.example.com + subnets: + - allocationRanges: + - end: 172.17.0.250 + start: 172.17.0.100 + cidr: 172.17.0.0/24 + name: subnet1 + vlan: 20 + mtu: 1500 + prefix-length: 24 + iface: internalapi + vlan: 20 + base_iface: enp6s0 + lb_addresses: + - 172.17.0.80-172.17.0.90 + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "internalapi", + "type": "macvlan", + "master": "internalapi", + "ipam": { + "type": "whereabouts", + "range": "172.17.0.0/24", + "range_start": "172.17.0.30", + "range_end": "172.17.0.70" + } + } + storage: + dnsDomain: storage.example.com + subnets: + - allocationRanges: + - end: 172.18.0.250 + start: 172.18.0.100 + cidr: 172.18.0.0/24 + name: subnet1 + vlan: 21 + mtu: 9000 + prefix-length: 24 + iface: storage + vlan: 21 + base_iface: enp6s0 + lb_addresses: + - 172.18.0.80-172.18.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "storage", + "type": "macvlan", + "master": "storage", + "ipam": { + "type": "whereabouts", + "range": "172.18.0.0/24", + "range_start": "172.18.0.30", + "range_end": "172.18.0.70" + } + } + + tenant: + dnsDomain: tenant.example.com + subnets: + - allocationRanges: + - end: 172.19.0.250 + start: 172.19.0.100 + cidr: 172.19.0.0/24 + name: subnet1 + vlan: 22 + mtu: 1500 + prefix-length: 24 + iface: tenant + vlan: 22 + base_iface: enp6s0 + lb_addresses: + - 172.19.0.80-172.19.0.90 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "tenant", + "type": "macvlan", + "master": "tenant", + "ipam": { + "type": "whereabouts", + "range": "172.19.0.0/24", + "range_start": "172.19.0.30", + "range_end": "172.19.0.70" + } + } + octavia: + dnsDomain: octavia.openstack.lab + mtu: 1500 + vlan: 23 + base_iface: enp6s0 + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "octavia", + "type": "bridge", + "bridge": "octbr", + "ipam": { + "type": "whereabouts", + "range": "172.23.0.0/24", + "range_start": "172.23.0.30", + "range_end": "172.23.0.70", + "routes": [ + { + "dst": "172.24.0.0/16", + "gw": "172.23.0.150" + } + ] + } + } + + external: + dnsDomain: external.example.com + subnets: + - allocationRanges: + - end: 10.0.0.250 + start: 10.0.0.100 + cidr: 10.0.0.0/24 + gateway: 10.0.0.1 + name: subnet1 + mtu: 1500 + datacentre: + net-attach-def: | + { + "cniVersion": "0.3.1", + "name": "datacentre", + "type": "bridge", + "bridge": "ospbr", + "ipam": {} + } + dns-resolver: + config: + server: + - 192.168.122.1 + search: [] + options: + - key: server + values: + - 192.168.122.1 + + routes: + config: [] + + rabbitmq: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.85 + rabbitmq-cell1: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.86 + + lbServiceType: LoadBalancer + storageClass: host-nfs-storageclass + bridgeName: ospbr diff --git a/examples/dt/nova/multiplecells/control-plane/service-values.yaml b/examples/dt/nova/multiplecells/control-plane/service-values.yaml new file mode 100644 index 000000000..991ec390e --- /dev/null +++ b/examples/dt/nova/multiplecells/control-plane/service-values.yaml @@ -0,0 +1,64 @@ +--- +apiVersion: v1 +kind: ConfigMap + +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" + +data: + preserveJobs: false + galera: + templates: + openstack: + storageClass: local-storage + storageRequest: 500M + secret: osp-secret + replicas: 1 + openstack-cell1: + storageClass: local-storage + storageRequest: 500M + secret: osp-secret + replicas: 1 + openstack-cell2: + storageClass: local-storage + storageRequest: 500M + secret: osp-secret + replicas: 1 + + rabbitmq: + templates: + rabbitmq: + replicas: 1 + rabbitmq-cell1: + replicas: 1 + rabbitmq-cell2: + replicas: 1 + + nova: + template: + secret: osp-secret + cellTemplates: + cell0: + cellDatabaseAccount: nova-cell0 + cellDatabaseInstance: openstack + cellMessageBusInstance: rabbitmq + conductorServiceTemplate: + replicas: 1 + hasAPIAccess: true + cell1: + cellDatabaseAccount: nova-cell1 + cellDatabaseInstance: openstack-cell1 + cellMessageBusInstance: rabbitmq-cell1 + conductorServiceTemplate: + replicas: 1 + hasAPIAccess: true + cell2: + cellDatabaseAccount: nova-cell2 + cellDatabaseInstance: openstack-cell2 + cellMessageBusInstance: rabbitmq-cell2 + conductorServiceTemplate: + replicas: 1 + hasAPIAccess: true + diff --git a/examples/dt/nova/multiplecells/data-plane.md b/examples/dt/nova/multiplecells/data-plane.md new file mode 100644 index 000000000..d5cec0f7e --- /dev/null +++ b/examples/dt/nova/multiplecells/data-plane.md @@ -0,0 +1,2 @@ +# Deploying the OpenStack dataplane +TBD diff --git a/examples/dt/nova/multiplecells/edpm/deployment/kustomization.yaml b/examples/dt/nova/multiplecells/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..1ffe760af --- /dev/null +++ b/examples/dt/nova/multiplecells/edpm/deployment/kustomization.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/multiplecells/edpm/deployment + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneDeployment + name: edpm-deployment + patch: | + - op: add + path: /spec/nodeSets/- + value: openstack-edpm-2 diff --git a/examples/dt/nova/multiplecells/edpm/deployment/values.yaml b/examples/dt/nova/multiplecells/edpm/deployment/values.yaml new file mode 100644 index 000000000..7f371b2cc --- /dev/null +++ b/examples/dt/nova/multiplecells/edpm/deployment/values.yaml @@ -0,0 +1,10 @@ +# 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: {} diff --git a/examples/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml b/examples/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml new file mode 100644 index 000000000..4217dfe68 --- /dev/null +++ b/examples/dt/nova/multiplecells/edpm/nodeset/kustomization.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/multiplecells/edpm/nodeset + +resources: + - values.yaml diff --git a/examples/dt/nova/multiplecells/edpm/nodeset/values.yaml b/examples/dt/nova/multiplecells/edpm/nodeset/values.yaml new file mode 100644 index 000000000..cc3d672e4 --- /dev/null +++ b/examples/dt/nova/multiplecells/edpm/nodeset/values.yaml @@ -0,0 +1,121 @@ +--- +# 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: _replaced_ + private: _replaced_ + public: _replaced_ + + nova: + migration: + ssh_keys: + private: _replaced_ + public: _replaced_ + + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + timesync_ntp_servers: + - hostname: pool.ntp.org + edpm_network_config_hide_sensitive_logs: false + 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: 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 }} + 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 %} + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth0 + + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + + edpm_sshd_configure_firewall: true + edpm_sshd_allowed_ranges: + - 192.168.122.0/24 + + gather_facts: false + + 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: tenant + subnetName: subnet1 + + services: + - bootstrap + - download-cache + - configure-network + - validate-network + - install-os + - configure-os + - ssh-known-hosts + - run-os + - reboot-os + - install-certs + - ovn + - neutron-metadata + - libvirt + - nova + diff --git a/examples/dt/nova/multiplecells/edpm/nodeset2/kustomization.yaml b/examples/dt/nova/multiplecells/edpm/nodeset2/kustomization.yaml new file mode 100644 index 000000000..56d4fb2b6 --- /dev/null +++ b/examples/dt/nova/multiplecells/edpm/nodeset2/kustomization.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/multiplecells/edpm/nodeset + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + patch: |- + - op: replace + path: /metadata/name + value: openstack-edpm-2 diff --git a/examples/dt/nova/multiplecells/edpm/nodeset2/values.yaml b/examples/dt/nova/multiplecells/edpm/nodeset2/values.yaml new file mode 100644 index 000000000..9278f7ebe --- /dev/null +++ b/examples/dt/nova/multiplecells/edpm/nodeset2/values.yaml @@ -0,0 +1,121 @@ +--- +# 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: _replaced_ + private: _replaced_ + public: _replaced_ + + nova: + migration: + ssh_keys: + private: _replaced_ + public: _replaced_ + + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + timesync_ntp_servers: + - hostname: pool.ntp.org + edpm_network_config_hide_sensitive_logs: false + 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: 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 }} + 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 %} + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth0 + + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + + edpm_sshd_configure_firewall: true + edpm_sshd_allowed_ranges: + - 192.168.122.0/24 + + gather_facts: false + + networks: + - defaultRoute: true + name: ctlplane + subnetName: subnet1 + - name: internalapi + subnetName: subnet1 + - name: storage + subnetName: subnet1 + - name: tenant + subnetName: subnet1 + + nodes: + 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: tenant + subnetName: subnet1 + + services: + - bootstrap + - download-cache + - configure-network + - validate-network + - install-os + - configure-os + - ssh-known-hosts + - run-os + - reboot-os + - install-certs + - ovn + - neutron-metadata + - libvirt + - nova + diff --git a/examples/dt/nova/multiplecells/kustomization.yaml b/examples/dt/nova/multiplecells/kustomization.yaml new file mode 100644 index 000000000..e7cd00e38 --- /dev/null +++ b/examples/dt/nova/multiplecells/kustomization.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../dt/nova/multiplecells/edpm + +resources: + - values.yaml diff --git a/examples/dt/nova/multiplecells/values.yaml b/examples/dt/nova/multiplecells/values.yaml new file mode 100644 index 000000000..03498a641 --- /dev/null +++ b/examples/dt/nova/multiplecells/values.yaml @@ -0,0 +1,130 @@ +--- +apiVersion: v1 +kind: ConfigMap + +metadata: + name: edpm-nodeset-values + annotations: + config.kubernetes.io/local-config: "true" + +data: + ssh_keys: + authorized: _replaced_ + private: _replaced_ + public: _replaced_ + + nova: + migration: + ssh_keys: + private: _replaced_ + public: _replaced_ + + nodeset: + ansible: + ansibleUser: cloud-admin + ansiblePort: 22 + ansibleVars: + timesync_ntp_servers: + - hostname: pool.ntp.org + edpm_network_config_hide_sensitive_logs: false + 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: 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 }} + 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 %} + neutron_physical_bridge_name: br-ex + neutron_public_interface_name: eth0 + + edpm_nodes_validation_validate_controllers_icmp: false + edpm_nodes_validation_validate_gateway_icmp: false + + edpm_sshd_configure_firewall: true + edpm_sshd_allowed_ranges: + - 192.168.122.0/24 + + gather_facts: false + + 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: 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: tenant + subnetName: subnet1 + + services: + - bootstrap + - download-cache + - configure-network + - validate-network + - install-os + - configure-os + - ssh-known-hosts + - run-os + - reboot-os + - install-certs + - ovn + - neutron-metadata + - libvirt + - nova