diff --git a/docs/contributing/development_environment.md b/docs/contributing/development_environment.md index c2652e424..543fef7dc 100644 --- a/docs/contributing/development_environment.md +++ b/docs/contributing/development_environment.md @@ -53,9 +53,39 @@ to create a virtual machine connected to the isolated networks. Create the edpm-compute-0 virtual machine. ``` cd install_yamls/devsetup -make standalone +make standalone EDPM_COMPUTE_CEPH_ENABLED=false ``` +Create the edpm-compute-1 virtual machine for an extra Nova compute cell. Note +that the main cell `nova` (in terms of OSP) is going to become `nova_cell1`, +and this extra `cell1` we're adding into the source OSP deployment, is going +to become `nova_cell2`, after the data plane adoption finishes. +``` +make edpm_compute EDPM_COMPUTE_SUFFIX=1 +make edpm_compute_repos EDPM_COMPUTE_SUFFIX=1 +``` + +Omit the `edpm_deploy` make target to not making it managed from the control +plane running on OCP. + +TODO: Instead, deploy it as a 2nd TripleO standalone Heat stack, +with an extra OSP compute: +``` +make standalone EDPM_COMPUTE_SUFFIX=1 EDPM_COMPUTE_CEPH_ENABLED=false +``` + +Ssh into deployed standalone host: +``` +ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@192.168.122.100 +``` +Discover the deployed compute host keys (a passwordless access is required by +the Nova Live-migration feature): +``` +ssh-copy-id -i ~/.ssh/id_rsa root@192.168.122.101 +``` + +TODO Discover the remote compute node from the central controller node + ### Convenience steps To make our life easier we can copy the deployment passwords we'll be using @@ -116,6 +146,8 @@ export OS_CLOUD=standalone source ~/install_yamls/devsetup/scripts/edpm-deploy-instance.sh ``` +TODO(bogdando): document creating a 2nd instance on another compute cell + Confirm the image UUID can be seen in Ceph's images pool. ``` ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@192.168.122.100 sudo cephadm shell -- rbd -p images ls -l diff --git a/docs/contributing/nova.md b/docs/contributing/nova.md new file mode 100644 index 000000000..95c4c5c64 --- /dev/null +++ b/docs/contributing/nova.md @@ -0,0 +1,125 @@ +# Nova adoption + +## Prerequisites + +* Previous Adoption steps completed. Notably, the service databases + must already be imported into the podified MariaDB. + +## Variables + +(There are no shell variables necessary currently.) + +## Procedure - Nova adoption + +* Patch OpenStackControlPlane to deploy Nova: + + ``` + oc patch openstackcontrolplane openstack -n openstack --type=merge --patch ' + spec: + nova: + enabled: true + secret: osp-secret + databaseInstance: openstack + apiOverride: # FIXME: could this be skipped? + route: {} + template: + cellTemplates: + cell0: + cellDatabaseUser: nova_cell0 # renamed from OSP17 'nova' + noVNCProxyServiceTemplate: + replicas: 0 # must remain 0? + metadataServiceTemplate: + replicas: 0 # must remain 0? + conductorServiceTemplate: + replicas: 0 # must remain 0 + externalEndpoints: + - endpoint: internal + ipAddressPool: internalapi + loadBalancerIPs: + - 172.17.0.80 + hasAPIAccess: true + cell1: + cellDatabaseUser: nova_cell1 # renamed from OSP17 'nova_cell0' + cellDatabaseInstance: openstack-cell1 + cellMessageBusInstance: rabbitmq-cell1 + noVNCProxyServiceTemplate: + replicas: 1 + metadataServiceTemplate: + replicas: 1 + conductorServiceTemplate: + replicas: 1 + hasAPIAccess: true + externalEndpoints: + - endpoint: internal + ipAddressPool: internalapi + loadBalancerIPs: + - 172.17.0.80 + apiServiceTemplate: + replicas: 1 + override: + service: + internal: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer + metadataServiceTemplate: + replicas: 1 + override: + service: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer + schedulerServiceTemplate: + replicas: 1 + override: + service: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer + noVNCProxyServiceTemplate: + replicas: 1 #FIXME: or only need to set if just for cell1? + # FIXME: not needed for VNCservice? + override: + service: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer + ' + ``` + +## Post-checks + +* See that Nova endpoints are defined and pointing to the + podified FQDNs and that Nova API responds. + + ``` + alias openstack="oc exec -t openstackclient -- openstack" + + openstack endpoint list | grep nova + + # Without OpenStack CLI nova plugin installed: + NOVA_PUBLIC_URL=$(openstack endpoint list -c 'Service Name' -c 'Service Type' -c URL | grep nova | grep public | awk '{ print $6; }') + curl "$NOVA_PUBLIC_URL" + + # With OpenStack CLI nova plugin installed: + openstack server list + ``` + + TODO: checks for cells mappings, compare it to the values noted earlier + TODO: check for a VM running in cell1 now instead of nova_cell0 ? diff --git a/docs/openstack/backend_services_deployment.md b/docs/openstack/backend_services_deployment.md index 056b48107..976f27f0e 100644 --- a/docs/openstack/backend_services_deployment.md +++ b/docs/openstack/backend_services_deployment.md @@ -62,6 +62,25 @@ podified OpenStack control plane services. ## Pre-checks +Get the database_connection and transport_url cells mappings on the source OSP environment, before those get renamed during +the [databases adoption](mariadb_copy.md). Note those below to compare it later with the renamed post-adoption values. + +Firstly, check the templated view stored in the galera database: +```bash +podman exec -it galera-bundle-podman-0 mysql -uroot nova_api -e"select uuid,name,transport_url,database_connection,disabled from cell_mappings" | grep '|' +| uuid | name | transport_url | database_connection | disabled | +| 00000000-0000-0000-0000-000000000000 | cell0 | none:/// | mysql+pymysql://{username}:{password}@192.168.122.99/nova_cell0?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo | 0 | +| 58036269-e862-4b3d-943d-2dbd0fc2d915 | default | rabbit://{username}:{password}@standalone.ctlplane.localdomain:5672/?ssl=0 | mysql+pymysql://{username}:{password}@192.168.122.99/nova?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo | 0 | +``` + +Then note its Nova representation (showing names and passwords): +```bash +podman exec -it nova_api nova-manage cell_v2 list_cells --verbose | grep '|' +| Name | UUID | Transport URL | Database Connection | Disabled | +| cell0 | 00000000-0000-0000-0000-000000000000 | none:/// | mysql+pymysql://nova:4w6xaYHjGSGJDv66z7xhHQioz@192.168.122.99/nova_cell0?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo | False | +| default | 58036269-e862-4b3d-943d-2dbd0fc2d915 | rabbit://guest:FxEbJ5yKxaGiYthgI0PJFk3y1@standalone.ctlplane.localdomain:5672/?ssl=0 | mysql+pymysql://nova:4w6xaYHjGSGJDv66z7xhHQioz@192.168.122.99/nova?read_default_file=/etc/my.cnf.d/tripleo.cnf&read_default_group=tripleo | False | +``` + ## Procedure - backend services deployment * Make sure you are using the OpenShift namespace where you want the