Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering for Director Operator docs variant Fixes #780

Merged
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ docs: docs-dependencies docs-user-all-variants docs-dev ## Build documentation
docs-user-all-variants:
cd docs_user; BUILD=upstream $(MAKE) html
cd docs_user; BUILD=downstream $(MAKE) html
cd docs_user; BUILD=downstream BUILD_VARIANT=ospdo $(MAKE) html

docs-user:
cd docs_user; $(MAKE) html
Expand Down
12 changes: 7 additions & 5 deletions docs_user/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
BUILD ?= upstream
ABUILD_VARIANT ?=
BUILD_VARIANT_WITH_SEPARATOR ?= $(if $(strip $(BUILD_VARIANT)),-$(BUILD_VARIANT),)
BUILD_DIR = ../docs_build
ROOTDIR = $(realpath .)
NAME = adoption-user
DEST_DIR = $(BUILD_DIR)/$(NAME)
DEST_HTML = $(DEST_DIR)/index-$(BUILD).html
DEST_PDF = $(BUILD_DIR)/$(NAME)-$(BUILD).pdf
DEST_HTML = $(DEST_DIR)/index-$(BUILD)$(BUILD_VARIANT_WITH_SEPARATOR).html
DEST_PDF = $(BUILD_DIR)/$(NAME)-$(BUILD)$(BUILD_VARIANT_WITH_SEPARATOR).pdf
IMAGES_DIR = $(DEST_DIR)/images
IMAGES_TS = $(DEST_DIR)/.timestamp-images
MAIN_SOURCE = main.adoc
Expand Down Expand Up @@ -45,7 +47,7 @@ watch-html:
$(MAKE) html; \
done

open-html: html
open-html: htmlf
${BROWSER_OPEN} "file://$(realpath $(ROOTDIR)/$(DEST_HTML))"

open-pdf: pdf
Expand All @@ -56,7 +58,7 @@ $(IMAGES_TS): $(IMAGES)
touch $(IMAGES_TS)

$(DEST_HTML): $(ALL_SOURCES)
$(BUNDLE_EXEC) asciidoctor -a source-highlighter=highlightjs -a highlightjs-languages="yaml,bash" -a highlightjs-theme="monokai" --failure-level WARN -a build=$(BUILD) -b xhtml5 -d book -o $@ $(MAIN_SOURCE)
$(BUNDLE_EXEC) asciidoctor -a source-highlighter=highlightjs -a highlightjs-languages="yaml,bash" -a highlightjs-theme="monokai" --failure-level WARN -a build=$(BUILD) -a build_variant=$(BUILD_VARIANT) -b xhtml5 -d book -o $@ $(MAIN_SOURCE)

$(DEST_PDF): $(ALL_SOURCES)
$(BUNDLE_EXEC) asciidoctor-pdf -a build=$(BUILD) -d book -o $@ $(MAIN_SOURCE) $(IMAGES)
$(BUNDLE_EXEC) asciidoctor-pdf -a build=$(BUILD) -a build_variant=$(BUILD_VARIANT) -d book -o $@ $(MAIN_SOURCE) $(IMAGES)
5 changes: 5 additions & 0 deletions docs_user/adoption-attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ ifeval::["{build}" == "downstream"]
:telemetry: Telemetry service
endif::[]

ifeval::["{build}-{build_variant}" == "downstream-ospdo"]
:OpenStackPreviousInstaller: director Operator
endif::[]


// Common URLs. Do not override. Do not delete.
:base_url: https://access.redhat.com/documentation
:defaultURL: https://docs.redhat.com/en/documentation/red_hat_openstack_services_on_openshift/{rhos_curr_ver}/html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ $ oc project openstack
----

. Define the common environment variables:
+
----
export PASSWORD_FILE="tripleo-passwords.yaml"

Expand Down
7 changes: 4 additions & 3 deletions docs_user/main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ 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]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assembly is not rendering in the docs because the "assembly_prepare_director_operator_and_rhoso_for_adoption_process.adoc" is not in the assemblies folder, but it should be. Can you please move the "assembly_prepare_director_operator_and_rhoso_for_adoption_process.adoc" to the assemblies folder? After you do that, this include statement should work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on my patch I do see it on that location : ```

k@k:/my_workspace/data-plane-adoption/docs_user$ pwd
/home/k/my_workspace/data-plane-adoption/docs_user
k@k:
/my_workspace/data-plane-adoption/docs_user$ ls assemblies/assembly_prepare_director_operator_and_rhoso_for_adoption_process.adoc
assemblies/assembly_prepare_director_operator_and_rhoso_for_adoption_process.adoc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file still isn't rendering, but I think I know why. The file name should be formatted as follows:

assemblies/assembly_prepare-director-operator-and-rhoso-for-adoption-process.adoc

If you rename the file with the name I provided here, and then update the file name in the include statement in main.adoc, I'm hoping that fixes the problem.

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"]
ifeval::["{OpenStackPreviousInstaller}" == "director Operator"]
include::assemblies/assembly_ospdo-scale-down-pre-database-adoption.adoc[leveloffset=+1]
endif::[]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this assembly removed from main.adoc and deleted from the repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably my mistake , returning it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the ifeval be ifeval::["{build_variant}" == "ospdo"] ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ $ oc debug --keep-labels=true job/swift-ring-rebalance -- /bin/sh -c 'swift-ring
The output might show a md5 mismatch until approximately 2 minutes after pushing the new rings. After the 2 minutes, the output looks similar to the following example:
+
----
[...]
Oldest completion was 2024-03-14 16:53:27 (3 minutes ago) by 172.20.0.100:6000.
Most recent completion was 2024-03-14 16:56:38 (12 seconds ago) by swift-storage-0.swift-storage.openstack.svc:6200.
===============================================================================
[2024-03-14 16:56:50] Checking ring md5sums
4/4 hosts matched, 0 error[s] while checking hosts.
[...]
----
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ endif::[]
ifeval::["{build}" == "downstream"]
$(cat <path_to_SSH_key> | base64 | sed \'s/^/ /')
endif::[]
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
$(oc exec -n $<ospdo_namespace> -t openstackclient openstackclient -- cat /home/cloud-admin/.ssh/id_rsa | base64 | sed 's/^/ /')
ifeval::["{build_variant}" == "ospdo"]
$(oc exec -n $<ospdo_namespace> -t openstackclient openstackclient -- cat /home/cloud-admin/.ssh/id_rsa | base64 | sed \'s/^/ /')
endif::[]
EOF
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
40 changes: 20 additions & 20 deletions docs_user/modules/proc_deploying-backend-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines 118 to 119
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
----
$ oc get secret tripleo-passwords -o jsonpath='{.data.*}' | base64 -d>~/tripleo-standalone-passwords.yaml
+
----
$ oc get secret tripleo-passwords -o jsonpath='{.data.*}' | base64 -d>~/tripleo-standalone-passwords.yaml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a plus sign so that the second command aligns with the command above it.

----
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the rendered OSPdO doc, both the $ oc project openstack command and the $ oc get secret tripleo-passwords command are rendering. Was that intended?

If not, we might need another conditional statement on the $ oc project openstack command that ensures that the command only renders in the "regular" adoption guide. Following the syntax of the downstream/upstream conditionals, you could try something like this:

ifeval::["{build}" != "ospdo"]
----
$ oc project openstack
----
endif::[]

This might require a change to the MakeFile as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both : oc project openstack command and the oc get secret tripleo-passwords command commands are needed in the ospdo scenario, the first is needed for the second to get the right pass from the right namespace.
and in a downstream scenarion only the first is needed. so that makes sense as is now

Expand Down Expand Up @@ -231,16 +231,16 @@ spec:
service:
metadata:
annotations:
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
ifeval::["{OpenStackPreviousInstaller}" != "director Operator"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ifeval needs to be ["{build_variant}" == "ospdo"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

metallb.universe.tf/address-pool: ctlplane
metallb.universe.tf/allow-shared-ip: ctlplane
metallb.universe.tf/loadBalancerIPs: 192.168.122.80
endif::[]
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
metallb.universe.tf/address-pool: <address_pool>
metallb.universe.tf/allow-shared-ip: <address_pool>
metallb.universe.tf/loadBalancerIPs: <loadBalancer_IP>
ifeval::["{build_variant}" == "ospdo"]
metallb.universe.tf/address-pool: <address_pool> <2>
metallb.universe.tf/allow-shared-ip: <address_pool> <2>
metallb.universe.tf/loadBalancerIPs: <loadBalancer_IP> <3>
endif::[]
spec:
type: LoadBalancer
Expand Down Expand Up @@ -312,7 +312,7 @@ endif::[]
ovn:
enabled: false
template:
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
ifeval::["{OpenStackPreviousInstaller}" != "director Operator"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

["{build_variant}" == "ospdo"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

ovnController:
networkAttachment: tenant
nodeSelector:
Expand All @@ -327,7 +327,7 @@ ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
dbType: SB
networkAttachment: internalapi
endif::[]
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
ifeval::["{build_variant}" == "ospdo"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a <4> after <networkAttachment_name> in the ovndbcluster-nb section, like this:

  ovndbcluster-nb:
          dbType: NB
          networkAttachment: <networkAttachment_name> <4>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

ovnController:
networkAttachment: tenant
nodeSelector:
Expand All @@ -337,10 +337,10 @@ ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
ovnDBCluster:
ovndbcluster-nb:
dbType: NB
networkAttachment: <networkAttachment_name>
networkAttachment: <networkAttachment_name> <4>
ovndbcluster-sb:
dbType: SB
networkAttachment: <networkAttachment_name>
networkAttachment: <networkAttachment_name> <4>
endif::[]
placement:
enabled: false
Expand All @@ -362,13 +362,13 @@ endif::[]
service:
metadata:
annotations:
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
ifeval::["{OpenStackPreviousInstaller}" != "director Operator"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

["{build_variant}" == "ospdo"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.86
endif::[]
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
metallb.universe.tf/address-pool: <networkAttachment_name>
metallb.universe.tf/loadBalancerIPs: <loadBalancer_IP>
ifeval::["{build_variant}" == "ospdo"]
metallb.universe.tf/address-pool: <networkAttachment_name> <4>
metallb.universe.tf/loadBalancerIPs: <loadBalancer_IP> <3>
endif::[]
spec:
type: LoadBalancer
Expand All @@ -387,14 +387,14 @@ endif::[]
replicas: 1
EOF
----
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
* Replace <address_pool> with the name of your network definition.
* Replace <loadBalancer_IP> with the LoadBalancer IP address.
* Replace <networkAttachment_name> with the name of your network.
endif::[]

ifeval::["{build_variant}" == "ospdo"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ifeval::["{build_variant}" == "ospdo"]
+
<1> Select an existing storage class in your {OpenShiftShort} cluster.
ifeval::["{build_variant}" == "ospdo"]
<2> Replace `<address_pool>` with the name of your network definition.
<3> Replace `<loadBalancer_IP>` with the LoadBalancer IP address.
<4> Replace `<networkAttachment_name>` with the name of your network.
endif::[]

The text below the code block should be formatted as above. Please be sure to delete lines 396 and 397. I'm not able to do it myself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

+
<1> Select an existing storage class in your {OpenShiftShort} cluster.
ifeval::["{build_variant}" == "ospdo"]
<2> Replace `<address_pool>` with the name of your network definition.
<3> Replace `<loadBalancer_IP>` with the LoadBalancer IP address.
<4> Replace `<networkAttachment_name>` with the name of your network.
endif::[]

.Verification

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ ifeval::["{build}" != "downstream"]
defined] already. Replace the following example values with values that are correct for your environment:
+
----
CONTROLLER1_SSH="ssh -i <path to SSH key> root@<node IP>"
$ CONTROLLER1_SSH="ssh -i <path to SSH key> root@<node IP>"
----
+
endif::[]
ifeval::["{build}" != "upstream"]
* The `CONTROLLER1_SSH` environment variable is defined and points to the {OpenStackShort} Controller node. Replace the following example values with values that are correct for your environment:
+
----
CONTROLLER1_SSH="ssh -i <path to SSH key> root@<node IP>"
$ CONTROLLER1_SSH="ssh -i <path to SSH key> root@<node IP>"
----
+
endif::[]

.Procedure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ EOF
. Restore the databases from `.sql` files into the control plane MariaDB:
+
----
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
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
Expand Down
38 changes: 18 additions & 20 deletions docs_user/modules/proc_migrating-ovn-data.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ $ grep -rI 'ovn_[ns]b_conn' /var/lib/config-data/puppet-generated/
----

.Procedure
+
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
. Get the {OpenShiftShort} master node that contains the {OpenStackShort} Controller:
ifeval::["{build_variant}" == "ospdo"]
. Get the {OpenShiftShort} master node that contains the {OpenStackShort} Controller node:
+
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need this plus sign. The step numbering is off in the rendered docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

----
$ oc get vmi -n $<ospdo_namespace> -o jsonpath='{.items[0].metadata.labels.kubevirt\.io/nodeName}'
----
+
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need the plus sign.

* Replace `<ospdo_namespace>` with your OSPdO namespace.
endif::[]
. Prepare a temporary `PersistentVolume` claim and the helper pod for the OVN backup. Adjust the storage requests for a large database, if needed:
Expand All @@ -63,7 +61,7 @@ spec:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
ifeval::["{build_variant}" == "ospdo"]
namespace: $OSPDO_NAMESPACE
endif::[]
name: ovn-data
Expand All @@ -81,20 +79,20 @@ metadata:
name: ovn-copy-data
annotations:
openshift.io/scc: anyuid
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
ifeval::["{OpenStackPreviousInstaller}" != "director Operator"]
k8s.v1.cni.cncf.io/networks: internalapi
endif::[]
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
ifeval::["{build_variant}" == "ospdo"]
'[{"name": "internalapi-static", "namespace": $<ospdo_namespace>, "ips": ["<internalapi-static-ips>"]}]'
endif::[]
labels:
app: adoption
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
ifeval::["{build_variant}" == "ospdo"]
namespace: $OSPDO_NAMESPACE
endif::[]
spec:
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
nodeName: '{{ <ocp_node_holding_controller> }}'
ifeval::["{build_variant}" == "ospdo"]
nodeName: '{{ <ocp_node_holding_controller> }}' <1>
endif::[]
containers:
- image: $OVSDB_IMAGE
Expand Down Expand Up @@ -122,18 +120,17 @@ endif::[]
secretName: ovn-data-cert
EOF
----
ifeval::["{OpenStackPreviousInstaller}" == "director_operator"]
+
* Replace `<ocp_node_holding_controller>` with the {OpenStackShort} node that contains the Controller.
ifeval::["{build_variant}" == "ospdo"]
+ <1> Replace `<ocp_node_holding_controller>` with the {OpenStackShort} node that contains the Controller node.
endif::[]

. Wait for the pod to be ready:
+
----
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
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::[]
----
Expand All @@ -149,15 +146,16 @@ $ $CONTROLLER1_SSH sudo iptables -I INPUT -s {PODIFIED_INTERNALAPI_NETWORK} -p t
* If you did not enable TLS everywhere, run the following command:
+
----
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
ifeval::["{OpenStackPreviousInstaller}" != "director Operator"]
$ oc exec ovn-copy-data -- bash -c "ovsdb-client backup tcp:$SOURCE_OVSDB_IP:6641 > /backup/ovs-nb.db"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be a plus sign after the "OVN database backup" step, like this:

. Back up your OVN databases:
+

  • If you did not enable TLS everywhere, run the following command:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

$ 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::[]
----
+
* If you enabled TLS everywhere, run the following command:
+
----
Expand Down Expand Up @@ -205,7 +203,7 @@ PODIFIED_OVSDB_NB_IP=$(oc get svc --selector "statefulset.kubernetes.io/pod-name
PODIFIED_OVSDB_SB_IP=$(oc get svc --selector "statefulset.kubernetes.io/pod-name=ovsdbserver-sb-0" -ojsonpath='{.items[0].spec.clusterIP}')
----

.+ When using IPv6, adjust the address to the format expected by `ovsdb-*` tools:
. If you are using IPv6, adjust the address to the format expected by `ovsdb-*` tools:

----
PODIFIED_OVSDB_NB_IP=[$PODIFIED_OVSDB_NB_IP]
Expand All @@ -231,11 +229,11 @@ $ oc exec ovn-copy-data -- bash -c "ovsdb-client get-schema --ca-cert=/etc/pki/t
.. If you did not enable TLS everywhere, use the following command:
+
----
ifeval::["{OpenStackPreviousInstaller}" != "director_operator"]
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::[]
Expand Down
4 changes: 2 additions & 2 deletions docs_user/modules/proc_migrating-tls-everywhere.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ endif::[]

. To locate the CA certificate and key, list all the certificates inside your NSSDB:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 40 and line 51 are also rendering in the OSPdO doc. As mentioned above, we might need another ifeval to ensure that "regular" adoption content does not appear in the OSPdO guide. For example:

ifeval::["{build}" != "ospdo"]
To locate the CA certificate and key, list all the certificates inside your NSSDB:
+
----
$ IPA_SSH certutil -L -d /etc/pki/pki-tomcat/alias
----
endif::[]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both lines 40 and 51 need to appear in the OSPdO docs, then you don't need to have the following line twice:
"To locate the CA certificate and key, list all the certificates inside your NSSDB."

I would remove that line from between the OSPdO ifeval statements. So it just starts with "If you installed OSPdO..."

+
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:
+
----
$ IPA_SSH="podman exec -ti freeipa-server"
----
endif::[]
----
$IPA_SSH certutil -L -d /etc/pki/pki-tomcat/alias
$ IPA_SSH certutil -L -d /etc/pki/pki-tomcat/alias
----
+
* The `-L` option lists all certificates.
Expand Down
Loading
Loading