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..6d22298cd --- /dev/null +++ b/dt/nova/nova-three-cells/README.md @@ -0,0 +1,12 @@ +# Deployed Topology - Nova/Three Cells + +If you are looking for information on how to deploy the multiplecells based DT, then +please see the +[README](../../../examples/dt/nova/nova-three-cells/README.md) in the examples +directory. + +This directory ,`dt/nova/nova-three-cells/`, exists so that the +[kustomization.yaml](../../../examples/dt/nova/nova-three-cells/control-plane/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..5758cebdc --- /dev/null +++ b/dt/nova/nova-three-cells/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/nova-three-cells/kustomization.yaml b/dt/nova/nova-three-cells/kustomization.yaml new file mode 100644 index 000000000..d1f94db5a --- /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.openstack-cell2 + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.galera.templates.openstack-cell2 + 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.cell2 + targets: + - select: + kind: OpenStackControlPlane + fieldPaths: + - spec.nova.template.cellTemplates.cell2 + 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..4ef7bb1c7 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/README.md @@ -0,0 +1,183 @@ +# Deployed Topology - Nova/Three Cells + +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. Compute-0 is allocated +to cell1 and compute-1 will be placed in cell2. + +## Environment + +### Nodes + +| Role | Machine Type | Count | +| ----------------- | ------------ | ----- | +| Compact OpenShift | vm | 3 | +| OpenStack Compute | vm | 2 | + + +### 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..40557e11b --- /dev/null +++ b/examples/dt/nova/nova-three-cells/control-plane.md @@ -0,0 +1,54 @@ +# Configuring networking and deploy the OpenStack control plane + +## Assumptions + +- A storage class called `local-storage` should already exist. + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the dt/nova/nova-three-cells directory +``` +cd architecture/examples/dt/nova/nova-three-cells +``` +Edit the [nncp/values.yaml](control-plane/nncp/values.yaml) and +[service-values.yaml](control-plane/service-values.yaml) files to suit +your environment. +``` +vi nncp/values.yaml +vi service-values.yaml +``` + +## Apply node network configuration + +Generate the node network configuration +``` +kustomize build nncp > nncp.yaml +``` +Apply the NNCP CRs +``` +oc apply -f nncp.yaml +``` +Wait for NNCPs to be available +``` +oc wait nncp -l osp/nncm-config-type=standard --for jsonpath='{.status.conditions[0].reason}'=SuccessfullyConfigured --timeout=300s +``` + +## Apply networking and control-plane configuration + +Generate the control-plane and networking CRs. +``` +kustomize build > control-plane.yaml +``` +Apply the CRs +``` +oc apply -f control-plane.yaml +``` + +Wait for control plane to be available +``` +oc wait osctlplane controlplane --for condition=Ready --timeout=600s +``` 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..3f8dd8c59 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/control-plane/service-values.yaml @@ -0,0 +1,59 @@ +--- +apiVersion: v1 +kind: ConfigMap + +metadata: + name: service-values + annotations: + config.kubernetes.io/local-config: "true" + +data: + preserveJobs: false + galera: + templates: + 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 + + nova: + template: + secret: osp-secret + cellTemplates: + cell2: + cellDatabaseAccount: nova-cell2 + cellDatabaseInstance: openstack-cell2 + cellMessageBusInstance: rabbitmq-cell2 + conductorServiceTemplate: + replicas: 1 + hasAPIAccess: true + + swift: + enabled: true + telemetry: + enabled: true + template: + ceilometer: + enabled: true + + rabbitmq: + templates: + rabbitmq-cell2: + replicas: 3 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..3ccf0a944 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/data-plane.md @@ -0,0 +1,64 @@ +# Configuring and deploying the dataplane + +## Assumptions + +- The [control plane](control-plane.md) has been created and successfully deployed + +## Initialize + +Switch to the "openstack" namespace +``` +oc project openstack +``` +Change to the dt/nova/nova-three-cells/edpm directory +``` +cd architecture/examples/dt/nova/nova-three-cells/edpm/ +``` +Edit the [edpm/nodeset/values.yaml](edpm/nodeset/values.yaml), the [edpm/nodeset2/values.yaml](edpm/nodeset2/values.yaml), and [edpm/deployment/values.yaml](edpm/deployment/values.yaml) files to suit +your environment. +``` +vi nodeset/values.yaml +vi nodeset2/values.yaml +vi deployment/values.yaml +``` +Generate the dataplane nodeset CR. +``` +kustomize build nodeset > dataplane-nodeset.yaml +``` +Generate the dataplane nodeset2 CR. +``` +kustomize build nodeset2 > dataplane-nodeset2.yaml +``` +Generate the dataplane deployment CR. +``` +kustomize build deployment > dataplane-deployment.yaml +``` + +## Create CRs +Create the nodeset CR +``` +oc apply -f dataplane-nodeset.yaml +``` +Wait for dataplane nodeset setup to finish +``` +oc wait osdpns openstack-edpm --for condition=SetupReady --timeout=600s +``` + +Create the second nodeset CR +``` +oc apply -f dataplane-nodeset2.yaml +``` +Wait for dataplane nodeset setup to finish +``` +oc wait osdpns openstack-edpm-2 --for condition=SetupReady --timeout=600s +``` + +Start the deployment +``` +oc apply -f dataplane-deployment.yaml +``` + +Wait for dataplane deployment to finish +``` +oc wait osdpns openstack-edpm --for condition=Ready --timeout=60m +``` 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..04bac286f --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/nodeset2/kustomization.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../../../../dt/nova/nova-three-cells/edpm/nodeset + +resources: + - values.yaml + - nova_cell2_service.yaml + +patches: + - target: + kind: OpenStackDataPlaneNodeSet + name: openstack-edpm + patch: |- + - op: replace + path: /metadata/name + value: openstack-edpm-2 diff --git a/examples/dt/nova/nova-three-cells/edpm/nodeset2/nova_cell2_service.yaml b/examples/dt/nova/nova-three-cells/edpm/nodeset2/nova_cell2_service.yaml new file mode 100644 index 000000000..1a839d033 --- /dev/null +++ b/examples/dt/nova/nova-three-cells/edpm/nodeset2/nova_cell2_service.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova-cell-2 +spec: + label: nova-cell-2 + dataSources: + - secretRef: + name: nova-cell2-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/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..e631b7341 --- /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-cell-2 diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index c163f3cfb..c4834104f 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -10,6 +10,7 @@ - rhoso-architecture-validate-hci-adoption - rhoso-architecture-validate-nfv-ovs-dpdk-sriov-adoption - rhoso-architecture-validate-nfv-ovs-dpdk-sriov-hci + - rhoso-architecture-validate-nova-three-cells - rhoso-architecture-validate-osasinfra - rhoso-architecture-validate-osasinfra-ipv6 - rhoso-architecture-validate-ovs-dpdk diff --git a/zuul.d/validations.yaml b/zuul.d/validations.yaml index 8a40a998a..cba46f305 100644 --- a/zuul.d/validations.yaml +++ b/zuul.d/validations.yaml @@ -99,6 +99,18 @@ parent: rhoso-architecture-base-job vars: cifmw_architecture_scenario: nfv-ovs-dpdk-sriov-hci +- job: + files: + - examples/dt/nova/nova-three-cells/control-plane + - examples/dt/nova/nova-three-cells/control-plane/nncp + - examples/dt/nova/nova-three-cells/edpm/deployment + - examples/dt/nova/nova-three-cells/edpm/nodeset + - examples/dt/nova/nova-three-cells/edpm/nodeset2 + - lib + name: rhoso-architecture-validate-nova-three-cells + parent: rhoso-architecture-base-job + vars: + cifmw_architecture_scenario: nova-three-cells - job: files: - dt/osasinfra