diff --git a/docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc b/docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc index 0e653bb6a..1f62eb701 100644 --- a/docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc +++ b/docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc @@ -32,51 +32,7 @@ Create an `OpenStackDataPlaneNodeSet` CR for each logical grouping of nodes in y ==== If desired, update the `values.yaml` file with values from your environment and add other kustomizations as needed before generating the CRs. Alternatively, the generated CRS can be directly edited before being applied. ==== -+ - -. The sample `OpenStackDataPlaneNodeSet` CR is connected to `cell1` by default. If you added additional Compute cells to the control plane and you want to connect the node set to one of the other cells, then you must create a custom service for the node set that includes the `Secret` CR for the cell: - -.. Create a custom `nova` service that includes the `Secret` CR for the cell to connect to: -+ -[subs=+quotes] ----- -apiVersion: dataplane.openstack.org/v1beta1 -kind: OpenStackDataPlaneService -metadata: - name: *nova-cell-custom* - spec: - label: dataplane-deployment-custom-service - playbook: osp.edpm.nova - ... - secrets: - - nova-cell2-compute-config <1> ----- -+ -<1> The `Secret` CR generated by the control plane for the cell. -+ -For information about how to create a custom service, see xref:proc_creating-a-custom-service_dataplane[Creating a custom service]. -.. Replace the `nova` service in your `OpenStackDataPlaneNodeSet` CR with your custom `nova` service: -+ -[subs=+quotes] ----- -apiVersion: dataplane.openstack.org/v1beta1 -kind: OpenStackDataPlaneNodeSet -metadata: - name: openstack-edpm-ipam -spec: - services: - - configure-network - - validate-network - - install-os - - configure-os - - run-os - - ovn - - libvirt - - *nova-cell-custom* - - telemetry ----- -+ [NOTE] Do not change the order of the default services. diff --git a/examples/nova_cell_custom/kustomization.yaml b/examples/nova_cell_custom/kustomization.yaml new file mode 100644 index 000000000..d71cecba5 --- /dev/null +++ b/examples/nova_cell_custom/kustomization.yaml @@ -0,0 +1,33 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +namespace: openstack + +components: +- ../base + +resources: +- openstackdataplanenovaservice.yaml + +configMapGenerator: +- name: nova-extra-config + files: + - 25-nova-extra.conf=nova-extra.conf + options: + disableNameSuffixHash: true + +patches: +- target: + kind: OpenStackDataPlaneService + name: nova + patch: |- + - op: replace + path: /metadata/name + value: nova-custom + - op: add + path: /spec/configMaps + value: + - nova-extra-config + +configurations: +- servicename.yaml diff --git a/examples/nova_cell_custom/nova-extra.conf b/examples/nova_cell_custom/nova-extra.conf new file mode 100644 index 000000000..e9de0ef51 --- /dev/null +++ b/examples/nova_cell_custom/nova-extra.conf @@ -0,0 +1,3 @@ +[compute] +cpu_shared_set = 2,6 +cpu_dedicated_set = 1,3,5,7 diff --git a/examples/nova_cell_custom/openstackdataplanenovaservice.yaml b/examples/nova_cell_custom/openstackdataplanenovaservice.yaml new file mode 100644 index 000000000..669eea54f --- /dev/null +++ b/examples/nova_cell_custom/openstackdataplanenovaservice.yaml @@ -0,0 +1,20 @@ +apiVersion: dataplane.openstack.org/v1beta1 +kind: OpenStackDataPlaneService +metadata: + name: nova +spec: + secrets: + - nova-cell1-compute-config + # NOTE: this Secret needs to be created before deploying the data plane. + # It should contain an ssh key-pair in the secret fields: ssh-privatekey + # and ssh-publickey + - nova-migration-ssh-key + playbook: osp.edpm.nova + tlsCert: + contents: + - dnsnames + - ips + networks: + - ctlplane + issuer: osp-rootca-issuer-internal + caCerts: combined-ca-bundle diff --git a/examples/nova_cell_custom/servicename.yaml b/examples/nova_cell_custom/servicename.yaml new file mode 100644 index 000000000..7d43116bd --- /dev/null +++ b/examples/nova_cell_custom/servicename.yaml @@ -0,0 +1,10 @@ +# This file is for teaching kustomize how to substitute OpenStackDataPlaneService name reference in OpenStackDataPlaneNodeSet +nameReference: +- kind: OpenStackDataPlaneService + version: v1beta1 + group: dataplane.openstack.org + fieldSpecs: + - kind: OpenStackDataPlaneNodeSet + version: v1beta1 + group: dataplane.openstack.org + path: spec/services