From 28677c19e4f623740d20eba6b99f3922750c6eb3 Mon Sep 17 00:00:00 2001 From: jamepark4 Date: Tue, 10 Sep 2024 14:39:45 -0400 Subject: [PATCH] Add nova 3 cell DT Standard deployments currently deploy cell0 and cell1. Create a DT that deploys cell0, cell1, and cell2. --- automation/vars/nova-three-cells.yaml | 60 +++++ dt/nova/nova-three-cells/README.md | 11 + .../edpm/deployment/kustomization.yaml | 21 ++ .../nova-three-cells/edpm/kustomization.yaml | 20 ++ .../edpm/nodeset/kustomization.yaml | 23 ++ .../edpm/nodeset/nova_cell_service.yaml | 21 ++ dt/nova/nova-three-cells/kustomization.yaml | 135 +++++++++++ dt/nova/nova-three-cells/namespace.yaml | 12 + examples/dt/nova/nova-three-cells/README.md | 185 ++++++++++++++ .../dt/nova/nova-three-cells/control-plane.md | 2 + .../control-plane/kustomization.yaml | 10 + .../control-plane/nncp/kustomization.yaml | 23 ++ .../control-plane/nncp/values.yaml | 228 ++++++++++++++++++ .../control-plane/service-values.yaml | 83 +++++++ .../dt/nova/nova-three-cells/data-plane.md | 2 + .../edpm/deployment/kustomization.yaml | 18 ++ .../edpm/deployment/values.yaml | 10 + .../edpm/nodeset/kustomization.yaml | 9 + .../nova-three-cells/edpm/nodeset/values.yaml | 124 ++++++++++ .../edpm/nodeset2/kustomization.yaml | 34 +++ .../edpm/nodeset2/values.yaml | 124 ++++++++++ .../nova/nova-three-cells/kustomization.yaml | 9 + examples/dt/nova/nova-three-cells/values.yaml | 130 ++++++++++ 23 files changed, 1294 insertions(+) create mode 100644 automation/vars/nova-three-cells.yaml create mode 100644 dt/nova/nova-three-cells/README.md create mode 100644 dt/nova/nova-three-cells/edpm/deployment/kustomization.yaml create mode 100644 dt/nova/nova-three-cells/edpm/kustomization.yaml create mode 100644 dt/nova/nova-three-cells/edpm/nodeset/kustomization.yaml create mode 100644 dt/nova/nova-three-cells/edpm/nodeset/nova_cell_service.yaml create mode 100644 dt/nova/nova-three-cells/kustomization.yaml create mode 100644 dt/nova/nova-three-cells/namespace.yaml create mode 100644 examples/dt/nova/nova-three-cells/README.md create mode 100644 examples/dt/nova/nova-three-cells/control-plane.md create mode 100644 examples/dt/nova/nova-three-cells/control-plane/kustomization.yaml create mode 100644 examples/dt/nova/nova-three-cells/control-plane/nncp/kustomization.yaml create mode 100644 examples/dt/nova/nova-three-cells/control-plane/nncp/values.yaml create mode 100644 examples/dt/nova/nova-three-cells/control-plane/service-values.yaml create mode 100644 examples/dt/nova/nova-three-cells/data-plane.md create mode 100644 examples/dt/nova/nova-three-cells/edpm/deployment/kustomization.yaml create mode 100644 examples/dt/nova/nova-three-cells/edpm/deployment/values.yaml create mode 100644 examples/dt/nova/nova-three-cells/edpm/nodeset/kustomization.yaml create mode 100644 examples/dt/nova/nova-three-cells/edpm/nodeset/values.yaml create mode 100644 examples/dt/nova/nova-three-cells/edpm/nodeset2/kustomization.yaml create mode 100644 examples/dt/nova/nova-three-cells/edpm/nodeset2/values.yaml create mode 100644 examples/dt/nova/nova-three-cells/kustomization.yaml create mode 100644 examples/dt/nova/nova-three-cells/values.yaml diff --git a/automation/vars/nova-three-cells.yaml b/automation/vars/nova-three-cells.yaml new file mode 100644 index 000000000..9b38a3b82 --- /dev/null +++ b/automation/vars/nova-three-cells.yaml @@ -0,0 +1,60 @@ +--- +vas: + nova-three-cells: + stages: + - path: examples/dt/nova/nova-three-cells/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/nova-three-cells/control-plane + wait_conditions: + - >- + oc -n openstack wait osctlplane controlplane --for condition=Ready + --timeout=1800s + 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/nova-three-cells/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/nova-three-cells/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/nova-three-cells/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/nova-three-cells/README.md b/dt/nova/nova-three-cells/README.md new file mode 100644 index 000000000..ac39951e2 --- /dev/null +++ b/dt/nova/nova-three-cells/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/nova- multiplecells/README.md) in the examples +directory. + +This directory `dt/nova/multiplecells/`, exists so that the +[kustomization.yaml](../../examples/dt/nova/nova-three-cells/kustomization.yaml) in +the examples directory of nova-three-cells 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/nova-three-cells/edpm/deployment/kustomization.yaml b/dt/nova/nova-three-cells/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..35ccc4852 --- /dev/null +++ b/dt/nova/nova-three-cells/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/nova-three-cells/edpm/kustomization.yaml b/dt/nova/nova-three-cells/edpm/kustomization.yaml new file mode 100644 index 000000000..a0545c8e5 --- /dev/null +++ b/dt/nova/nova-three-cells/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/nova-three-cells/edpm/nodeset/kustomization.yaml b/dt/nova/nova-three-cells/edpm/nodeset/kustomization.yaml new file mode 100644 index 000000000..557149312 --- /dev/null +++ b/dt/nova/nova-three-cells/edpm/nodeset/kustomization.yaml @@ -0,0 +1,23 @@ +--- +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 + +resources: + - nova_cell_service.yaml diff --git a/dt/nova/nova-three-cells/edpm/nodeset/nova_cell_service.yaml b/dt/nova/nova-three-cells/edpm/nodeset/nova_cell_service.yaml new file mode 100644 index 000000000..9def059a1 --- /dev/null +++ b/dt/nova/nova-three-cells/edpm/nodeset/nova_cell_service.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova +spec: + label: nova + dataSources: + - secretRef: + name: nova-cell1-compute-config + - secretRef: + name: nova-migration-ssh-key + - configMapRef: + name: nova-extra-config + optional: true + playbook: osp.edpm.nova + caCerts: combined-ca-bundle + edpmServiceType: nova + containerImageFields: + - NovaComputeImage + - EdpmIscsidImage diff --git a/dt/nova/nova-three-cells/kustomization.yaml b/dt/nova/nova-three-cells/kustomization.yaml new file mode 100644 index 000000000..1bd8de786 --- /dev/null +++ b/dt/nova/nova-three-cells/kustomization.yaml @@ -0,0 +1,135 @@ +--- +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.glance.customServiceConfig + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.glance.template.customServiceConfig + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.glance.default.replicas + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.glance.template.glanceAPIs.default.replicas + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.swift.enabled + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.swift.enabled + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.telemetry.enabled + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.telemetry.enabled + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.telemetry.template.ceilometer.enabled + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.telemetry.template.ceilometer.enabled + options: + create: true + - source: + kind: ConfigMap + name: network-values + fieldPath: data.rabbitmq-cell2.endpoint_annotations + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.rabbitmq.templates.rabbitmq-cell2.override.service.metadata.annotations + options: + create: true + - source: + kind: ConfigMap + name: service-values + fieldPath: data.rabbitmq.templates.rabbitmq-cell2.replicas + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.rabbitmq.templates.rabbitmq-cell2.replicas + options: + create: true + - source: + kind: ConfigMap + name: network-values + fieldPath: data.lbServiceType + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.rabbitmq.templates.rabbitmq-cell2.override.service.spec.type + 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/nova-three-cells/namespace.yaml b/dt/nova/nova-three-cells/namespace.yaml new file mode 100644 index 000000000..60a6e8c42 --- /dev/null +++ b/dt/nova/nova-three-cells/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/nova-three-cells/README.md b/examples/dt/nova/nova-three-cells/README.md new file mode 100644 index 000000000..54f1d91cd --- /dev/null +++ b/examples/dt/nova/nova-three-cells/README.md @@ -0,0 +1,185 @@ +# Deployed Topology - Nova/MultipleCells + +Deploys an environment with three cells instead of the standard two cells + +## Purpose + +Focused on leveraging multiple nodesets to deploy two distinct cells +(cell1 and cell2) in addition to cell0. Computes will be allocated to both +cells + +## Environment + +### Nodes + +| Role | Machine Type | Count | +| ----------------- | ------------ | ----- | +| Compact OpenShift | vm | 3 | +| OpenStack Compute | vm | 4 | + +## Node topology +TBD + +### Networks + +| Name | Type | Interface | CIDR | +| ------------ | -------- | --------- | --------------- | +| Provisioning | untagged | nic1 | 172.22.0.0/24 | +| Machine | untagged | nic2 | 192.168.32.0/20 | +| RH OSP | trunk | nic3 | | + + +#### VLAN networks in RH OSP + +| Name | Type | CIDR | +| ----------- | ----------- | ----------------- | +| ctlplane | untagged | 192.168.122.0/24 | +| internalapi | VLAN tagged | 172.17.0.0/24 | +| octavia | VLAN tagged | 172.23.0.0/24 | +| storage | VLAN tagged | 172.18.0.0/24 | +| storagemgmt | VLAN tagged | 172.20.0.0/24 | +| tenant | VLAN tagged | 172.19.0.0/24 | + + +### Services, enabled features and configurations + +| Service | configuration | Lock-in coverage? | +| ---------------- | ----------------------- | ------------------ | +| Barbican | (default) | Must have | +| Cinder | LVM/iSCSI/lioadm | Must have | +| Cinder Backup | Swift | Must have | +| Glance | Swift | Must have | +| Swift | (default) | Must have | +| Horizon | N/A | Must have | +| Neutron | Geneve (OVN) | Must have | +| Swift | (default) | Must have | + +#### Support services + +The following table lists services which are not the main focus of the testing +(which may be covered by additional scenarios), but are required for the DT +to work properly and can be deployed with any/default configuration. + +| Service | Reason | +| ---------------- |--------------------------- | +| Keystone | needed by all services | + + +### Additional configuration + +- Always-on, default services and features: TLSe +- Two additional compute nodes + +#### Nova + +Increase default cells to include cell2 + +```YAML +--- +spec: + nova: + template: + secret: osp-secret + cellTemplates: + cell0: + cellDatabaseAccount: nova-cell0 + cellDatabaseInstance: openstack + cellMessageBusInstance: rabbitmq + conductorServiceTemplate: + replicas: 3 + hasAPIAccess: true + cell1: + cellDatabaseAccount: nova-cell1 + cellDatabaseInstance: openstack-cell1 + cellMessageBusInstance: rabbitmq-cell1 + conductorServiceTemplate: + replicas: 3 + hasAPIAccess: true + cell2: + cellDatabaseAccount: nova-cell2 + cellDatabaseInstance: openstack-cell2 + cellMessageBusInstance: rabbitmq-cell2 + conductorServiceTemplate: + replicas: 3 + hasAPIAccess: true +``` + +#### RabbitMQ + +Add a new rabbitmq service for cell2 + +```YAML +--- +spec: + rabbitmq: + templates: + rabbitmq-cell2: + replicas: 3 +``` + +#### Galera + +Create a third galera service for cell2 + +```YAML +spec: + galera: + templates: + openstack-cell2: + storageClass: lvms-local-storage + storageRequest: 5G + secret: osp-secret + replicas: 3 +``` + +#### OSDPNS + +Create a second nodeset that references a new compute service an necessary +secret/transport url for cell2 + +```YAML +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneNodeSet +metadata: + name: openstack-edpm-2 + namespace: openstack +spec: + 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-cell-2 + +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova-cell-2 + namespace: openstack +spec: + addCertMounts: false + caCerts: combined-ca-bundle + containerImageFields: + - NovaComputeImage + - EdpmIscsidImage + dataSources: + - secretRef: + name: nova-cell2-compute-config + - secretRef: + name: nova-migration-ssh-key + - configMapRef: + name: nova-extra-config + optional: true + edpmServiceType: nova + playbook: osp.edpm.nova + +``` diff --git a/examples/dt/nova/nova-three-cells/control-plane.md b/examples/dt/nova/nova-three-cells/control-plane.md new file mode 100644 index 000000000..b261cd751 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/control-plane.md @@ -0,0 +1,2 @@ +# Configuring networking and deploy the OpenStack control plane +TBD diff --git a/examples/dt/nova/nova-three-cells/control-plane/kustomization.yaml b/examples/dt/nova/nova-three-cells/control-plane/kustomization.yaml new file mode 100644 index 000000000..7a4a26541 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/control-plane/kustomization.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../dt/nova/nova-three-cells + +resources: + - nncp/values.yaml + - service-values.yaml diff --git a/examples/dt/nova/nova-three-cells/control-plane/nncp/kustomization.yaml b/examples/dt/nova/nova-three-cells/control-plane/nncp/kustomization.yaml new file mode 100644 index 000000000..b75ee5150 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/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/nova-three-cells/control-plane/nncp/values.yaml b/examples/dt/nova/nova-three-cells/control-plane/nncp/values.yaml new file mode 100644 index 000000000..db60775ec --- /dev/null +++ b/examples/dt/nova/nova-three-cells/control-plane/nncp/values.yaml @@ -0,0 +1,228 @@ +--- +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 + rabbitmq-cell2: + endpoint_annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.87 + + lbServiceType: LoadBalancer + storageClass: host-nfs-storageclass + bridgeName: ospbr diff --git a/examples/dt/nova/nova-three-cells/control-plane/service-values.yaml b/examples/dt/nova/nova-three-cells/control-plane/service-values.yaml new file mode 100644 index 000000000..cca5960a8 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/control-plane/service-values.yaml @@ -0,0 +1,83 @@ +--- +apiVersion: v1 +kind: ConfigMap + +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" + +data: + preserveJobs: false + galera: + templates: + openstack: + storageClass: lvms-local-storage + storageRequest: 5G + secret: osp-secret + replicas: 3 + openstack-cell1: + storageClass: lvms-local-storage + storageRequest: 5G + secret: osp-secret + replicas: 3 + openstack-cell2: + storageClass: lvms-local-storage + storageRequest: 5G + secret: osp-secret + replicas: 3 + + glance: + customServiceConfig: | + [DEFAULT] + enabled_backends = default_backend:swift + [glance_store] + default_backend = default_backend + [default_backend] + swift_store_create_container_on_put = True + swift_store_auth_version = 3 + swift_store_auth_address = {{ .KeystoneInternalURL }} + swift_store_endpoint_type = internalURL + swift_store_user = service:glance + swift_store_key = {{ .ServicePassword }} + default: + replicas: 1 + + swift: + enabled: true + telemetry: + enabled: true + template: + ceilometer: + enabled: true + + rabbitmq: + templates: + rabbitmq-cell2: + replicas: 3 + + nova: + template: + secret: osp-secret + cellTemplates: + cell0: + cellDatabaseAccount: nova-cell0 + cellDatabaseInstance: openstack + cellMessageBusInstance: rabbitmq + conductorServiceTemplate: + replicas: 3 + hasAPIAccess: true + cell1: + cellDatabaseAccount: nova-cell1 + cellDatabaseInstance: openstack-cell1 + cellMessageBusInstance: rabbitmq-cell1 + conductorServiceTemplate: + replicas: 3 + hasAPIAccess: true + cell2: + cellDatabaseAccount: nova-cell2 + cellDatabaseInstance: openstack-cell2 + cellMessageBusInstance: rabbitmq-cell2 + conductorServiceTemplate: + replicas: 3 + hasAPIAccess: true diff --git a/examples/dt/nova/nova-three-cells/data-plane.md b/examples/dt/nova/nova-three-cells/data-plane.md new file mode 100644 index 000000000..d5cec0f7e --- /dev/null +++ b/examples/dt/nova/nova-three-cells/data-plane.md @@ -0,0 +1,2 @@ +# Deploying the OpenStack dataplane +TBD diff --git a/examples/dt/nova/nova-three-cells/edpm/deployment/kustomization.yaml b/examples/dt/nova/nova-three-cells/edpm/deployment/kustomization.yaml new file mode 100644 index 000000000..f0e07955c --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/deployment/kustomization.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova-three-cells/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/nova-three-cells/edpm/deployment/values.yaml b/examples/dt/nova/nova-three-cells/edpm/deployment/values.yaml new file mode 100644 index 000000000..7f371b2cc --- /dev/null +++ b/examples/dt/nova/nova-three-cells/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/nova-three-cells/edpm/nodeset/kustomization.yaml b/examples/dt/nova/nova-three-cells/edpm/nodeset/kustomization.yaml new file mode 100644 index 000000000..775857c09 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/nodeset/kustomization.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova-three-cells/edpm/nodeset + +resources: + - values.yaml diff --git a/examples/dt/nova/nova-three-cells/edpm/nodeset/values.yaml b/examples/dt/nova/nova-three-cells/edpm/nodeset/values.yaml new file mode 100644 index 000000000..1ae9bcfd6 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/nodeset/values.yaml @@ -0,0 +1,124 @@ +--- +# 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_ + + service: + name: nova + cellSecretRef: nova-cell1-compute-config + + 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/nova-three-cells/edpm/nodeset2/kustomization.yaml b/examples/dt/nova/nova-three-cells/edpm/nodeset2/kustomization.yaml new file mode 100644 index 000000000..d698b9f00 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/nodeset2/kustomization.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova-three-cells/edpm/nodeset + +resources: + - values.yaml + +patches: + - target: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + patch: |- + - op: replace + path: /metadata/name + value: openstack-edpm-2 + - op: replace + path: /spec/services/13 + value: nova-cell-2 + - target: + kind: OpenStackDataPlaneService + name: nova + patch: |- + - op: replace + path: /metadata/name + value: nova-cell-2 + - op: replace + path: /spec/label + value: nova-cell-2 + - op: replace + path: /spec/dataSources/0/secretRef/name + value: nova-cell2-compute-config diff --git a/examples/dt/nova/nova-three-cells/edpm/nodeset2/values.yaml b/examples/dt/nova/nova-three-cells/edpm/nodeset2/values.yaml new file mode 100644 index 000000000..67a9cfede --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/nodeset2/values.yaml @@ -0,0 +1,124 @@ +--- +# 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_ + + service: + name: nova-cell2 + cellSecretRef: nova-cell2-compute-config + + 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/nova-three-cells/kustomization.yaml b/examples/dt/nova/nova-three-cells/kustomization.yaml new file mode 100644 index 000000000..5f7c250c7 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/kustomization.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../dt/nova/nova-three-cells/edpm + +resources: + - values.yaml diff --git a/examples/dt/nova/nova-three-cells/values.yaml b/examples/dt/nova/nova-three-cells/values.yaml new file mode 100644 index 000000000..03498a641 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/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