diff --git a/README.md b/README.md index 8b2ce4e0a..5a941f9c3 100644 --- a/README.md +++ b/README.md @@ -14,5 +14,5 @@ links: * [Contributing to documentation](https://openstack-k8s-operators.github.io/data-plane-adoption/contributing/documentation/) - how to build docs locally, docs patterns and tips. -* [Tests](https://openstack-k8s-operators.github.io/data-plane-adoption/contributing/tests/) - +* [Tests](https://openstack-k8s-operators.github.io/data-plane-adoption/dev/tests/#_tests) - information about the test suite, and how to run it. diff --git a/docs_dev/assemblies/development_environment.adoc b/docs_dev/assemblies/development_environment.adoc index 8da179a8b..6b1787e48 100644 --- a/docs_dev/assemblies/development_environment.adoc +++ b/docs_dev/assemblies/development_environment.adoc @@ -163,6 +163,17 @@ sudo ip addr add dev vlan20 172.17.0.222/24 sudo ip link set up dev vlan20 ---- +To adopt the Swift service as well, route VLAN23 to have access to the storage +backend services: + +[,bash] +---- +EDPM_BRIDGE=$(sudo virsh dumpxml edpm-compute-0 | grep -oP "(?<=bridge=').*(?=')") +sudo ip link add link $EDPM_BRIDGE name vlan23 type vlan id 23 +sudo ip addr add dev vlan23 172.20.0.222/24 +sudo ip link set up dev vlan23 +---- + === Snapshot/revert When the deployment of the Standalone OpenStack is finished, it's a diff --git a/docs_user/assemblies/openstack_adoption.adoc b/docs_user/assemblies/openstack_adoption.adoc index a27cd71e5..7d62ed22f 100644 --- a/docs_user/assemblies/openstack_adoption.adoc +++ b/docs_user/assemblies/openstack_adoption.adoc @@ -20,6 +20,7 @@ include::../modules/openstack-mariadb_copy.adoc[leveloffset=+1] include::../modules/openstack-ovn_adoption.adoc[leveloffset=+1] include::../modules/openstack-keystone_adoption.adoc[leveloffset=+1] include::../modules/openstack-neutron_adoption.adoc[leveloffset=+1] +include::../modules/openstack-swift_adoption.adoc[leveloffset=+1] include::../modules/openstack-glance_adoption.adoc[leveloffset=+1] include::../modules/openstack-placement_adoption.adoc[leveloffset=+1] include::../modules/openstack-nova_adoption.adoc[leveloffset=+1] diff --git a/docs_user/modules/openstack-backend_services_deployment.adoc b/docs_user/modules/openstack-backend_services_deployment.adoc index 00a43edea..331c993d7 100644 --- a/docs_user/modules/openstack-backend_services_deployment.adoc +++ b/docs_user/modules/openstack-backend_services_deployment.adoc @@ -73,6 +73,7 @@ NEUTRON_PASSWORD=$(cat ~/tripleo-standalone-passwords.yaml | grep ' NeutronPassw NOVA_PASSWORD=$(cat ~/tripleo-standalone-passwords.yaml | grep ' NovaPassword:' | awk -F ': ' '{ print $2; }') OCTAVIA_PASSWORD=$(cat ~/tripleo-standalone-passwords.yaml | grep ' OctaviaPassword:' | awk -F ': ' '{ print $2; }') PLACEMENT_PASSWORD=$(cat ~/tripleo-standalone-passwords.yaml | grep ' PlacementPassword:' | awk -F ': ' '{ print $2; }') +SWIFT_PASSWORD=$(cat ~/tripleo-standalone-passwords.yaml | grep ' SwiftPassword:' | awk -F ': ' '{ print $2; }') ---- == Pre-checks @@ -121,6 +122,7 @@ oc set data secret/osp-secret "NeutronPassword=$NEUTRON_PASSWORD" oc set data secret/osp-secret "NovaPassword=$NOVA_PASSWORD" oc set data secret/osp-secret "OctaviaPassword=$OCTAVIA_PASSWORD" oc set data secret/osp-secret "PlacementPassword=$PLACEMENT_PASSWORD" +oc set data secret/osp-secret "SwiftPassword=$SWIFT_PASSWORD" ---- * Deploy OpenStackControlPlane. *Make sure to only enable DNS, diff --git a/docs_user/modules/openstack-stop_openstack_services.adoc b/docs_user/modules/openstack-stop_openstack_services.adoc index d12b81f7a..b18b5d97f 100644 --- a/docs_user/modules/openstack-stop_openstack_services.adoc +++ b/docs_user/modules/openstack-stop_openstack_services.adoc @@ -16,7 +16,7 @@ Since gracefully stopping all services is non-trivial and beyond the scope of th recommendations on how to check some things in the services. Note that you should not stop the infrastructure management services yet, such as database, RabbitMQ, and HAProxy Load Balancer, nor should you stop the -Nova compute service and containerized modular libvirt daemons. +Nova compute service, containerized modular libvirt daemons and Swift storage backend services. == Variables diff --git a/docs_user/modules/openstack-swift_adoption.adoc b/docs_user/modules/openstack-swift_adoption.adoc new file mode 100644 index 000000000..5278e0d27 --- /dev/null +++ b/docs_user/modules/openstack-swift_adoption.adoc @@ -0,0 +1,150 @@ +[id="adopting-the-object-storage-service_{context}"] + +//:context: adopting-object-storage-service + += Adopting the Object Storage service + +== Limitations + +* The described process does not migrate data from existing nodes yet. Data is + still stored on existing nodes, but is accessed through the Swift proxy + instance running on the OpenShift control plane. + +== Prerequisites + +* Previous adoption steps completed. +* The Swift storage backend services must NOT be stopped. +* Storage network has been properly configured on the OpenShift cluster. + +== Variables + +No new environmental variables need to be defined, though you use the +`CONTROLLER1_SSH` that was defined in a previous step for the pre-checks. + +== Pre-checks + +== Copy over swift.conf file + +* Create the `swift-conf` secret, containing the Swift hash path suffix and prefix: ++ +[source,yaml] +---- +oc apply -f - < obj +openstack container create test ++---------------------------------------+-----------+------------------------------------+ +| account | container | x-trans-id | ++---------------------------------------+-----------+------------------------------------+ +| AUTH_4d9be0a9193e4577820d187acdd2714a | test | txe5f9a10ce21e4cddad473-0065ce41b9 | ++---------------------------------------+-----------+------------------------------------+ + +openstack object create test obj ++--------+-----------+----------------------------------+ +| object | container | etag | ++--------+-----------+----------------------------------+ +| obj | test | d41d8cd98f00b204e9800998ecf8427e | ++--------+-----------+----------------------------------+ + +openstack object save test obj --file - +Hello World! +---- diff --git a/tests/playbooks/test_minimal.yaml b/tests/playbooks/test_minimal.yaml index b9c09a680..b834c9be1 100644 --- a/tests/playbooks/test_minimal.yaml +++ b/tests/playbooks/test_minimal.yaml @@ -32,6 +32,7 @@ - ovn_adoption - keystone_adoption - neutron_adoption + - swift_adoption - glance_adoption - placement_adoption - nova_adoption diff --git a/tests/roles/backend_services/defaults/main.yaml b/tests/roles/backend_services/defaults/main.yaml index 39523dc4b..e85bdc952 100644 --- a/tests/roles/backend_services/defaults/main.yaml +++ b/tests/roles/backend_services/defaults/main.yaml @@ -10,3 +10,4 @@ octavia_password: '' placement_password: '' heat_password: '' heat_auth_encryption_key: '' +swift_password: '' diff --git a/tests/roles/backend_services/tasks/main.yaml b/tests/roles/backend_services/tasks/main.yaml index f3c9e5f45..73a01dac3 100644 --- a/tests/roles/backend_services/tasks/main.yaml +++ b/tests/roles/backend_services/tasks/main.yaml @@ -44,6 +44,9 @@ {% if manila_password %} oc set data secret/osp-secret "ManilaPassword={{ manila_password }}" {% endif %} + {% if swift_password %} + oc set data secret/osp-secret "SwiftPassword={{ swift_password }}" + {% endif %} - name: when not a periodic CI job use the base deployment when: not periodic|default(false) diff --git a/tests/roles/swift_adoption/meta/main.yaml b/tests/roles/swift_adoption/meta/main.yaml new file mode 100644 index 000000000..610f184fb --- /dev/null +++ b/tests/roles/swift_adoption/meta/main.yaml @@ -0,0 +1,2 @@ +dependencies: + - role: common_defaults diff --git a/tests/roles/swift_adoption/tasks/main.yaml b/tests/roles/swift_adoption/tasks/main.yaml new file mode 100644 index 000000000..24199c9b8 --- /dev/null +++ b/tests/roles/swift_adoption/tasks/main.yaml @@ -0,0 +1,91 @@ +- name: Add swift.conf secret + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + CONTROLLER1_SSH="{{ controller1_ssh }}" + oc apply -f - <