Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #717 from fao89/kustomizedocs
Browse files Browse the repository at this point in the history
Document kustomize examples
  • Loading branch information
openshift-merge-bot[bot] authored Mar 5, 2024
2 parents 03eaf6d + ee7c3f9 commit c6a18ed
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ docs: manifests docs-dependencies crd-to-markdown ## Build docs
sed -i "s/=== Custom/== Custom/g" docs/assemblies/custom_resources.adoc
cd docs; $(MAKE) html

.PHONY: docs-preview
docs-preview: docs
cd docs; $(MAKE) open-html

.PHONY: docs-clean
docs-clean:
rm -r docs_build
Expand Down
1 change: 1 addition & 0 deletions docs/assemblies/creating-the-data-plane.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ To create and deploy a data plane, you must perform the following tasks:
** CBO is installed and configured for provisioning.
** `BareMetalHosts` registered, inspected, and have the label `app:openstack`.
* You are logged on to a workstation that has access to the RHOCP cluster as a user with `cluster-admin` privileges.
* https://kustomize.io/[kustomize] version 5.0.1 or higher

include::proc_creating-the-SSH-key-secrets.adoc[leveloffset=+1]

Expand Down
29 changes: 25 additions & 4 deletions docs/assemblies/proc_creating-a-set-of-data-plane-nodes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,31 @@ Create an `OpenStackDataPlaneNodeSet` CR for each logical grouping of nodes in y

.Procedure

. Copy the sample `OpenStackDataPlaneNodeSet` CR that you require and save it to a file named `openstack-edpm.yaml` on your workstation:
. Copy the https://kustomize.io/[kustomize] examples on your workstation:

* Pre-provisioned nodes: https://github.com/openstack-k8s-operators/dataplane-operator/blob/main/config/samples/dataplane_v1beta1_openstackdataplanenodeset_with_ipam.yaml
* Bare metal nodes: https://github.com/openstack-k8s-operators/dataplane-operator/blob/main/config/samples/dataplane_v1beta1_openstackdataplanenodeset_baremetal_with_ipam.yaml
git clone -n --depth=1 --filter=tree:0 \
https://github.com/openstack-k8s-operators/dataplane-operator
cd dataplane-operator
git sparse-checkout set --no-cone examples
git checkout
cd examples

. Use kustomize to create the `OpenStackDataPlaneDeployment` and `OpenStackDataPlaneNodeSet` CRs:

* Pre-provisioned nodes:

kustomize build preprovisioned > openstack-edpm.yaml

* Bare metal nodes:

kustomize build baremetal > openstack-edpm.yaml

+
[NOTE]
====
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:

Expand Down Expand Up @@ -214,7 +235,7 @@ spec:

. Save the `openstack-edpm.yaml` definition file.

. Create the data plane resources:
. Create and <<proc_deploying-the-data-plane_dataplane,deploy>> the data plane resources:
+
----
$ oc create -f openstack-edpm.yaml
Expand Down
8 changes: 3 additions & 5 deletions docs/assemblies/proc_deploying-the-data-plane.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[role="_abstract"]
You use the `OpenStackDataPlaneDeployment` CRD to configure the services on the data plane nodes and deploy the data plane. Create an `OpenStackDataPlaneDeployment` custom resource (CR) that deploys each of your `OpenStackDataPlaneNodeSet` CRs.

. Procedure
.Procedure

. Copy the sample `OpenStackDataPlaneDeployment` CR from https://github.com/openstack-k8s-operators/dataplane-operator/blob/main/config/samples/dataplane_v1beta1_openstackdataplanedeployment_baremetal_with_ipam.yaml and save it to a file named `openstack-edpm-deploy.yaml` on your workstation.
. Complete the steps from <<proc_creating-a-set-of-data-plane-nodes_dataplane,Creating a DataPlane>> procedure, ensuring that you have a file named `openstack-edpm.yaml` on your workstation.

. Optional: Update `nodeSets` to include all the `OpenStackDataPlaneNodeSet` CRs that you want to deploy:
+
Expand All @@ -25,12 +25,10 @@ spec:
+
* Replace `<nodeSet_name>` with the names of the `OpenStackDataPlaneNodeSet` CRs that you want to include in your data plane deployment.

. Save the `openstack-edpm-deploy.yaml` deployment file.

. Deploy the data plane:
+
----
$ oc create -f openstack-edpm-deploy.yaml
$ oc create -f openstack-edpm.yaml
----
+
You can view the Ansible logs while the deployment executes:
Expand Down

0 comments on commit c6a18ed

Please sign in to comment.