From ca072be3e39f6a55ba729b5728eb5239241bee25 Mon Sep 17 00:00:00 2001 From: pkomarov Date: Fri, 10 Jan 2025 03:25:26 +0200 Subject: [PATCH] Fix docs rendering for OSPdO adoption JIRA: https://github.com/openstack-k8s-operators/data-plane-adoption/pull/780 --- docs_user/main.adoc | 9 +++++---- ...ing-compute-services-to-the-data-plane.adoc | 2 +- ...dopting-image-service-with-nfs-backend.adoc | 1 - .../proc_deploying-backend-services.adoc | 10 +++++----- ...grating-databases-to-mariadb-instances.adoc | 2 +- docs_user/modules/proc_migrating-ovn-data.adoc | 18 +++++++++--------- .../modules/proc_migrating-tls-everywhere.adoc | 2 +- ...opology-specific-service-configuration.adoc | 13 ++++++------- 8 files changed, 28 insertions(+), 29 deletions(-) diff --git a/docs_user/main.adoc b/docs_user/main.adoc index 647ca7628..a01e65d2a 100644 --- a/docs_user/main.adoc +++ b/docs_user/main.adoc @@ -11,16 +11,17 @@ include::adoption-attributes.adoc[] include::assemblies/assembly_rhoso-180-adoption-overview.adoc[leveloffset=+1] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] -include::assemblies/assembly_prepare_director_operator_for_adoption_process.adoc[leveloffset=+1] +ifeval::["{build_variant}" == "ospdo"] +include::assemblies/assembly_prepare_director_operator_and_rhoso_for_adoption_process.adoc +[leveloffset=+1] endif::[] include::modules/proc_migrating-tls-everywhere.adoc[leveloffset=+1] include::assemblies/assembly_migrating-databases-to-the-control-plane.adoc[leveloffset=+1] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] -include::assemblies/assembly_ospdo-scale-down-pre-database-adoption.adoc[leveloffset=+1] +ifeval::["{build_variant}" == "ospdo"] +include::modules/assembly_ospdo-scale-down-pre-database-adoption.adoc[leveloffset=+1] endif::[] include::assemblies/assembly_adopting-openstack-control-plane-services.adoc[leveloffset=+1] diff --git a/docs_user/modules/proc_adopting-compute-services-to-the-data-plane.adoc b/docs_user/modules/proc_adopting-compute-services-to-the-data-plane.adoc index 504633ad6..22990fd91 100644 --- a/docs_user/modules/proc_adopting-compute-services-to-the-data-plane.adoc +++ b/docs_user/modules/proc_adopting-compute-services-to-the-data-plane.adoc @@ -126,7 +126,7 @@ endif::[] ifeval::["{build}" == "downstream"] $(cat | base64 | sed \'s/^/ /') endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] $(oc exec -n $ -t openstackclient openstackclient -- cat /home/cloud-admin/.ssh/id_rsa | base64 | sed 's/^/ /') endif::[] EOF diff --git a/docs_user/modules/proc_adopting-image-service-with-nfs-backend.adoc b/docs_user/modules/proc_adopting-image-service-with-nfs-backend.adoc index 7b35b5346..e22df18e4 100644 --- a/docs_user/modules/proc_adopting-image-service-with-nfs-backend.adoc +++ b/docs_user/modules/proc_adopting-image-service-with-nfs-backend.adoc @@ -130,7 +130,6 @@ $ oc patch openstackcontrolplane openstack --type=merge --patch-file glance_nfs_ $ oc get pods -l service=glance NAME READY STATUS RESTARTS glance-default-single-0 3/3 Running 0 -``` ---- * Ensure that the description of the pod reports the following output: diff --git a/docs_user/modules/proc_deploying-backend-services.adoc b/docs_user/modules/proc_deploying-backend-services.adoc index e1e43f8bf..95da60751 100644 --- a/docs_user/modules/proc_deploying-backend-services.adoc +++ b/docs_user/modules/proc_deploying-backend-services.adoc @@ -113,7 +113,7 @@ make input ---- endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] ---- $ oc get secret tripleo-passwords -o jsonpath='{.data.*}' | base64 -d>~/tripleo-standalone-passwords.yaml ---- @@ -237,7 +237,7 @@ ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] metallb.universe.tf/allow-shared-ip: ctlplane metallb.universe.tf/loadBalancerIPs: 192.168.122.80 endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] metallb.universe.tf/address-pool: metallb.universe.tf/allow-shared-ip: metallb.universe.tf/loadBalancerIPs: @@ -327,7 +327,7 @@ ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] dbType: SB networkAttachment: internalapi endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] ovnController: networkAttachment: tenant nodeSelector: @@ -366,7 +366,7 @@ ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] metallb.universe.tf/address-pool: internalapi metallb.universe.tf/loadBalancerIPs: 172.17.0.86 endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] metallb.universe.tf/address-pool: metallb.universe.tf/loadBalancerIPs: endif::[] @@ -387,7 +387,7 @@ endif::[] replicas: 1 EOF ---- -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] * Replace with the name of your network definition. * Replace with the LoadBalancer IP address. * Replace with the name of your network. diff --git a/docs_user/modules/proc_migrating-databases-to-mariadb-instances.adoc b/docs_user/modules/proc_migrating-databases-to-mariadb-instances.adoc index aaf6891a2..791494bcc 100644 --- a/docs_user/modules/proc_migrating-databases-to-mariadb-instances.adoc +++ b/docs_user/modules/proc_migrating-databases-to-mariadb-instances.adoc @@ -175,7 +175,7 @@ EOF ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] $ oc rsh mariadb-copy-data << EOF endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] $ oc rsh -n $OSPDO_NAMESPACE mariadb-copy-data << EOF endif::[] # db schemas to rename on import diff --git a/docs_user/modules/proc_migrating-ovn-data.adoc b/docs_user/modules/proc_migrating-ovn-data.adoc index 556dd9a75..fd4ba637d 100644 --- a/docs_user/modules/proc_migrating-ovn-data.adoc +++ b/docs_user/modules/proc_migrating-ovn-data.adoc @@ -34,7 +34,7 @@ $ grep -rI 'ovn_[ns]b_conn' /var/lib/config-data/puppet-generated/ .Procedure + -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] . Get the {OpenShiftShort} master node that contains the {OpenStackShort} Controller: + ---- @@ -63,7 +63,7 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] namespace: $OSPDO_NAMESPACE endif::[] name: ovn-data @@ -84,16 +84,16 @@ metadata: ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] k8s.v1.cni.cncf.io/networks: internalapi endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] '[{"name": "internalapi-static", "namespace": $, "ips": [""]}]' endif::[] labels: app: adoption -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] namespace: $OSPDO_NAMESPACE endif::[] spec: -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] nodeName: '{{ }}' endif::[] containers: @@ -122,7 +122,7 @@ endif::[] secretName: ovn-data-cert EOF ---- -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] + * Replace `` with the {OpenStackShort} node that contains the Controller. endif::[] @@ -133,7 +133,7 @@ endif::[] ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] $ oc wait --for=condition=Ready pod/ovn-copy-data --timeout=30s endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] $ oc wait --for=condition=Ready -n $OSPDO_NAMESPACE pod/ovn-copy-data --timeout=30s endif::[] ---- @@ -153,7 +153,7 @@ ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] $ oc exec ovn-copy-data -- bash -c "ovsdb-client backup tcp:$SOURCE_OVSDB_IP:6641 > /backup/ovs-nb.db" $ oc exec ovn-copy-data -- bash -c "ovsdb-client backup tcp:$SOURCE_OVSDB_IP:6642 > /backup/ovs-sb.db" endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] $ oc exec -n $OSPDO_NAMESPACE ovn-copy-data -- bash -c "ovsdb-client backup tcp:$SOURCE_OVSDB_IP:6641 > /backup/ovs-nb.db" $ oc exec -n $OSPDO_NAMESPACE ovn-copy-data -- bash -c "ovsdb-client backup tcp:$SOURCE_OVSDB_IP:6642 > /backup/ovs-sb.db" endif::[] @@ -235,7 +235,7 @@ ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] $ oc exec ovn-copy-data -- bash -c "ovsdb-client restore tcp:$PODIFIED_OVSDB_NB_IP:6641 < /backup/ovs-nb.db" $ oc exec ovn-copy-data -- bash -c "ovsdb-client restore tcp:$PODIFIED_OVSDB_SB_IP:6642 < /backup/ovs-sb.db" endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] $ oc exec -n $RHOSO_NAMESPACE ovn-copy-data -- bash -c "ovsdb-client restore tcp:$PODIFIED_OVSDB_NB_IP:6641 < /backup/ovs-nb.db" $ oc exec -n $RHOSO_NAMESPACE ovn-copy-data -- bash -c "ovsdb-client restore tcp:$PODIFIED_OVSDB_SB_IP:6642 < /backup/ovs-sb.db" endif::[] diff --git a/docs_user/modules/proc_migrating-tls-everywhere.adoc b/docs_user/modules/proc_migrating-tls-everywhere.adoc index 1e66d6464..333354968 100644 --- a/docs_user/modules/proc_migrating-tls-everywhere.adoc +++ b/docs_user/modules/proc_migrating-tls-everywhere.adoc @@ -39,7 +39,7 @@ endif::[] . To locate the CA certificate and key, list all the certificates inside your NSSDB: + -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] To locate the CA certificate and key, list all the certificates inside your NSSDB. If you installed OSPdO by using director-dev-tools, the server host runs the freeipa server as a container: + ---- diff --git a/docs_user/modules/proc_retrieving-topology-specific-service-configuration.adoc b/docs_user/modules/proc_retrieving-topology-specific-service-configuration.adoc index 8fa1c2707..76b907774 100644 --- a/docs_user/modules/proc_retrieving-topology-specific-service-configuration.adoc +++ b/docs_user/modules/proc_retrieving-topology-specific-service-configuration.adoc @@ -12,8 +12,7 @@ Before you migrate your databases to the {rhos_long} control plane, retrieve the * Define the following shell variables. Replace the example values with values that are correct for your environment: + ----- -ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] +ifeval::["{build_variant}" == "ospdo"] ifeval::["{build}" != "downstream"] CONTROLLER1_SSH="ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@192.168.122.100" MARIADB_IMAGE=quay.io/podified-antelope-centos9/openstack-mariadb:current-podified @@ -46,13 +45,13 @@ $ sudo grep -rI 'listen mysql' -A10 /var/lib/config-data/puppet-generated/ | gre ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] export PULL_OPENSTACK_CONFIGURATION_DATABASES=$(oc run mariadb-client ${MARIADB_CLIENT_ANNOTATIONS} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] export PULL_OPENSTACK_CONFIGURATION_DATABASES=$(oc run mariadb-client --overrides="$RUN_OVERRIDES" -n $OSPDO_NAMESPACE -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] mysql -rsh "$SOURCE_MARIADB_IP" -uroot -p"$SOURCE_DB_ROOT_PASSWORD" -e 'SHOW databases;') echo "$PULL_OPENSTACK_CONFIGURATION_DATABASES" ---- -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] ---- export CONTROLLER1_SSH="oc -n $OSPDO_NAMESPACE rsh -c openstackclient openstackclient ssh controller-0.ctlplane" ---- @@ -128,7 +127,7 @@ The `nova`, `nova_api`, and `nova_cell0` databases are included in the same data ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] export PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK=$(oc run mariadb-client ${MARIADB_CLIENT_ANNOTATIONS} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] export PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK=$(oc run mariadb-client --overrides="$RUN_OVERRIDES" -n $OSPDO_NAMESPACE -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] mysqlcheck --all-databases -h $SOURCE_MARIADB_IP -u root -p"$SOURCE_DB_ROOT_PASSWORD" | grep -v OK) @@ -141,7 +140,7 @@ echo "$PULL_OPENSTACK_CONFIGURATION_MYSQLCHECK_NOK" ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc run mariadb-client ${MARIADB_CLIENT_ANNOTATIONS} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] export PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS=$(oc run mariadb-client --overrides="$RUN_OVERRIDES" -n $OSPDO_NAMESPACE -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] mysql -rsh "${SOURCE_MARIADB_IP}" -uroot -p"${SOURCE_DB_ROOT_PASSWORD}" nova_api -e \ @@ -155,7 +154,7 @@ echo "$PULL_OPENSTACK_CONFIGURATION_NOVADB_MAPPED_CELLS" ifeval::["{OpenStackPreviousInstaller}" != "director_operator"] export PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES=$(oc run mariadb-client ${MARIADB_CLIENT_ANNOTATIONS} -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] -ifeval::["{OpenStackPreviousInstaller}" == "director_operator"] +ifeval::["{build_variant}" == "ospdo"] export PULL_OPENSTACK_CONFIGURATION_NOVA_COMPUTE_HOSTNAMES=$(oc run mariadb-client --overrides="$RUN_OVERRIDES" -n $OSPDO_NAMESPACE -q --image ${MARIADB_IMAGE} -i --rm --restart=Never -- \ endif::[] mysql -rsh "$SOURCE_MARIADB_IP" -uroot -p"$SOURCE_DB_ROOT_PASSWORD" nova_api -e \