diff --git a/docs_user/modules/openstack-autoscaling_adoption.adoc b/docs_user/modules/openstack-autoscaling_adoption.adoc index 06de4e41a..ef6568cf5 100644 --- a/docs_user/modules/openstack-autoscaling_adoption.adoc +++ b/docs_user/modules/openstack-autoscaling_adoption.adoc @@ -20,12 +20,12 @@ should be already adopted. == Procedure - Autoscaling adoption -Patch OpenStackControlPlane to deploy autoscaling services: +=== Patch OpenStackControlPlane to deploy autoscaling services: ---- -cat << EOF > aodh_patch.yaml +oc patch openstackcontrolplane openstack --type=merge --patch ' spec: - autoscaling: + telemetry: enabled: true prometheus: deployPrometheus: false @@ -53,29 +53,45 @@ endif::[] EOF ---- - -____ -If you have previously backed up your OpenStack services configuration file from the old environment, you can use os-diff to compare and make sure the configuration is correct. For more information, see xref:pulling-the-openstack-configuration_{context}[Pulling the OpenStack configuration]. -____ +=== Install cluster-observability-operator ---- -pushd os-diff -./os-diff cdiff --service aodh -c /tmp/collect_tripleo_configs/aodh/etc/aodh/aodh.conf -o aodh_patch.yaml +oc create -f - < ceilometer_patch.yaml +oc patch openstackcontrolplane openstack --type=merge --patch ' spec: - ceilometer: + telemetry: enabled: true template: + ceilometer: ifeval::["{build}" != "downstream"] - centralImage: quay.io/podified-antelope-centos9/openstack-ceilometer-central:current-podified - computeImage: quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified - customServiceConfig: | - [DEFAULT] - debug=true - ipmiImage: quay.io/podified-antelope-centos9/openstack-ceilometer-ipmi:current-podified - nodeExporterImage: quay.io/prometheus/node-exporter:v1.5.0 - notificationImage: quay.io/podified-antelope-centos9/openstack-ceilometer-notification:current-podified - secret: osp-secret - sgCoreImage: quay.io/infrawatch/sg-core:v5.1.1 + centralImage: quay.io/podified-antelope-centos9/openstack-ceilometer-central:current-podified + computeImage: quay.io/podified-antelope-centos9/openstack-ceilometer-compute:current-podified + customServiceConfig: | + [DEFAULT] + debug=true + ipmiImage: quay.io/podified-antelope-centos9/openstack-ceilometer-ipmi:current-podified + nodeExporterImage: quay.io/prometheus/node-exporter:v1.5.0 + notificationImage: quay.io/podified-antelope-centos9/openstack-ceilometer-notification:current-podified + secret: osp-secret + sgCoreImage: quay.io/infrawatch/sg-core:v5.1.1 endif::[] ifeval::["{build}" == "downstream"] - centralImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-central-rhel9:18.0 - computeImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-compute-rhel9:18.0 - customServiceConfig: | - [DEFAULT] - debug=true - ipmiImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-ipmi-rhel9:18.0 - nodeExporterImage: quay.io/prometheus/node-exporter:v1.5.0 - notificationImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-notification-rhel9:18.0 - secret: osp-secret - sgCoreImage: quay.io/infrawatch/sg-core:v5.1.1 + centralImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-central-rhel9:18.0 + computeImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-compute-rhel9:18.0 + customServiceConfig: | + [DEFAULT] + debug=true + ipmiImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-ipmi-rhel9:18.0 + nodeExporterImage: quay.io/prometheus/node-exporter:v1.5.0 + notificationImage: registry.redhat.io/rhosp-dev-preview/openstack-ceilometer-notification-rhel9:18.0 + secret: osp-secret + sgCoreImage: quay.io/infrawatch/sg-core:v5.1.1 endif::[] EOF ---- -____ -If you have previously backed up your OpenStack services configuration file from the old environment, you can use os-diff to compare and make sure the configuration is correct. For more information, see xref:pulling-the-openstack-configuration_{context}[Pulling the OpenStack configuration]. -____ - ----- -pushd os-diff -./os-diff cdiff --service ceilometer -c /tmp/collect_tripleo_configs/ceilometer/etc/ceilometer/ceilometer.conf -o ceilometer_patch.yaml ----- - -____ -This will produce the difference between both ini configuration files. -____ - -Patch OpenStackControlPlane to deploy Ceilometer services: - ----- -oc patch openstackcontrolplane openstack --type=merge --patch-file ceilometer_patch.yaml ----- == Post-checks @@ -84,19 +67,13 @@ CEILOMETETR_POD=`oc get pods -l service=ceilometer | tail -n 1 | cut -f 1 -d' '` oc exec -t $CEILOMETETR_POD -c ceilometer-central-agent -- cat /etc/ceilometer/ceilometer.conf ---- -=== Inspect the resulting Ceilometer IPMI agent pod on Data Plane nodes - ----- -podman ps | grep ceilometer-ipmi ----- - === Inspecting enabled pollsters ---- oc get secret ceilometer-config-data -o jsonpath="{.data['polling\.yaml']}" | base64 -d ---- -=== Enabling pollsters according to requirements +=== Create polling.yaml with required pollsters ---- cat << EOF > polling.yaml @@ -108,8 +85,11 @@ sources: - volume.size - image.size - cpu - - memory + - memory.usage EOF +---- +=== Update ceilometer configuration with new pollsters +---- oc patch secret ceilometer-config-data --patch="{\"data\": { \"polling.yaml\": \"$(base64 -w0 polling.yaml)\"}}" ---- diff --git a/tests/roles/autoscaling_adoption/meta/main.yaml b/tests/roles/autoscaling_adoption/meta/main.yaml new file mode 100644 index 000000000..610f184fb --- /dev/null +++ b/tests/roles/autoscaling_adoption/meta/main.yaml @@ -0,0 +1,2 @@ +dependencies: + - role: common_defaults diff --git a/tests/roles/autoscaling_adoption/tasks/main.yaml b/tests/roles/autoscaling_adoption/tasks/main.yaml new file mode 100644 index 000000000..37e2a43b6 --- /dev/null +++ b/tests/roles/autoscaling_adoption/tasks/main.yaml @@ -0,0 +1,78 @@ +- name: deploy podified Aodh + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc patch openstackcontrolplane openstack --type=merge --patch ' + spec: + telemetry: + enabled: true + template: + autoscaling: + enabled: true + heatInstance: heat + aodh: + customServiceConfig: | + [DEFAULT] + debug=true + passwordSelectors: + secret: osp-secret + databaseInstance: openstack + memcachedInstance: memcached + databaseUser: aodh + ' + +- name: wait for Aodh to start up + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc get pod --selector=service=aodh -o jsonpath='{.items[0].status.phase}{"\n"}' | grep Running + register: aodh_running_result + until: aodh_running_result is success + retries: 60 + delay: 2 + +- name: check that Aodh is reachable and its endpoints are defined + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + + alias openstack="oc exec -t openstackclient -- openstack" + + ${BASH_ALIASES[openstack]} endpoint list | grep aodh + register: aodh_responding_result + until: aodh_responding_result is success + retries: 60 + delay: 2 + +- name: deploy metric storage + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc patch openstackcontrolplane openstack --type=merge --patch ' + spec: + telemetry: + enabled: true + template: + metricStorage: + enabled: true + ' + +- name: wait for alertmanager metric storage to start up + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc get pod --selector=alertmanager=metric-storage -o jsonpath='{.items[0].status.phase}{"\n"}' | grep Running + register: alertmanager_running_result + until: alertmanager_running_result is success + retries: 60 + delay: 2 + +- name: wait for prometheus metric storage to start up + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc get pod --selector=prometheus=metric-storage -o jsonpath='{.items[0].status.phase}{"\n"}' | grep Running + register: prometheus_running_result + until: prometheus_running_result is success + retries: 60 + delay: 2 diff --git a/tests/roles/backend_services/defaults/main.yaml b/tests/roles/backend_services/defaults/main.yaml index 68ac4ac96..3c98fc3b0 100644 --- a/tests/roles/backend_services/defaults/main.yaml +++ b/tests/roles/backend_services/defaults/main.yaml @@ -1,6 +1,9 @@ # Service account passwords (not service DB passwords) from the # original deployment. +aodh_password: '' barbican_password: '' +ceilometer_metering_secret: '' +ceilometer_password: '' cinder_password: '' manila_password: '' glance_password: '' diff --git a/tests/roles/backend_services/tasks/main.yaml b/tests/roles/backend_services/tasks/main.yaml index 2a7c56172..d841219d2 100644 --- a/tests/roles/backend_services/tasks/main.yaml +++ b/tests/roles/backend_services/tasks/main.yaml @@ -16,9 +16,18 @@ ansible.builtin.shell: | {{ shell_header }} {{ oc_header }} + {% if aodh_password %} + oc set data secret/osp-secret "AodhPassword={{ aodh_password }}" + {% endif %} {% if barbican_password %} oc set data secret/osp-secret "BarbicanPassword={{ barbican_password }}" {% endif %} + {% if ceilometer_metering_secret %} + oc set data secret/osp-secret "CeilometerMeteringSecret={{ ceilometer_metering_secret }}" + {% endif %} + {% if ceilometer_password %} + oc set data secret/osp-secret "CeilometerPassword={{ ceilometer_password }}" + {% endif %} {% if cinder_password %} oc set data secret/osp-secret "CinderPassword={{ cinder_password }}" {% endif %} diff --git a/tests/roles/dataplane_adoption/tasks/main.yaml b/tests/roles/dataplane_adoption/tasks/main.yaml index 5a2eef9f1..66f7fac6f 100644 --- a/tests/roles/dataplane_adoption/tasks/main.yaml +++ b/tests/roles/dataplane_adoption/tasks/main.yaml @@ -166,6 +166,7 @@ - nova-compute-extraconfig - ovn - neutron-metadata + - telemetry env: - name: ANSIBLE_CALLBACKS_ENABLED value: "profile_tasks" diff --git a/tests/roles/heat_adoption/tasks/main.yaml b/tests/roles/heat_adoption/tasks/main.yaml index f239caff9..a7eee7953 100644 --- a/tests/roles/heat_adoption/tasks/main.yaml +++ b/tests/roles/heat_adoption/tasks/main.yaml @@ -29,6 +29,8 @@ authEncryptionKey: HeatAuthEncryptionKey database: HeatDatabasePassword service: HeatPassword + rabbitMqClusterName: rabbitmq + serviceUser: heat ' - name: wait for Heat to start up diff --git a/tests/roles/stop_openstack_services/tasks/main.yaml b/tests/roles/stop_openstack_services/tasks/main.yaml index 845cdd8eb..a9e7bccc0 100644 --- a/tests/roles/stop_openstack_services/tasks/main.yaml +++ b/tests/roles/stop_openstack_services/tasks/main.yaml @@ -13,7 +13,14 @@ {{ oc_header }} {{ stop_openstack_services_shell_vars }} - ServicesToStop=("tripleo_horizon.service" + ServicesToStop=("tripleo_aodh_api.service" + "tripleo_aodh_api_cron.service" + "tripleo_aodh_evaluator.service" + "tripleo_aodh_listener.service" + "tripleo_aodh_notifier.service" + "tripleo_ceilometer_agent_central.service" + "tripleo_ceilometer_agent_notification.service" + "tripleo_horizon.service" "tripleo_keystone.service" "tripleo_barbican_api.service" "tripleo_barbican_worker.service" @@ -23,7 +30,11 @@ "tripleo_cinder_scheduler.service" "tripleo_cinder_volume.service" "tripleo_cinder_backup.service" + "tripleo_collectd.service" "tripleo_glance_api.service" + "tripleo_gnocchi_api.service" + "tripleo_gnocchi_metricd.service" + "tripleo_gnocchi_statsd.service" "tripleo_manila_api.service" "tripleo_manila_api_cron.service" "tripleo_manila_scheduler.service" diff --git a/tests/roles/telemetry_adoption/meta/main.yaml b/tests/roles/telemetry_adoption/meta/main.yaml new file mode 100644 index 000000000..610f184fb --- /dev/null +++ b/tests/roles/telemetry_adoption/meta/main.yaml @@ -0,0 +1,2 @@ +dependencies: + - role: common_defaults diff --git a/tests/roles/telemetry_adoption/tasks/main.yaml b/tests/roles/telemetry_adoption/tasks/main.yaml new file mode 100644 index 000000000..f184c29fe --- /dev/null +++ b/tests/roles/telemetry_adoption/tasks/main.yaml @@ -0,0 +1,26 @@ +- name: deploy podified Ceilometer + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc patch openstackcontrolplane openstack --type=merge --patch ' + spec: + telemetry: + enabled: true + template: + ceilometer: + enabled: true + customServiceConfig: | + [DEFAULT] + debug=true + secret: osp-secret + ' + +- name: wait for Ceilometer to start up + ansible.builtin.shell: | + {{ shell_header }} + {{ oc_header }} + oc get pod --selector=service=ceilometer -o jsonpath='{.items[0].status.phase}{"\n"}' | grep Running + register: ceilometer_running_result + until: ceilometer_running_result is success + retries: 60 + delay: 2 diff --git a/tests/secrets.sample.yaml b/tests/secrets.sample.yaml index df9ae76bd..ba0800a07 100644 --- a/tests/secrets.sample.yaml +++ b/tests/secrets.sample.yaml @@ -15,7 +15,10 @@ source_db_root_password: "{{ lookup('file', tripleo_passwords) | from_yaml | com podified_db_root_password: 12345678 # Service account passwords (not DB passwords). +aodh_password: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.AodhPassword') | first }}" barbican_password: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.BarbicanPassword') | first }}" +ceilometer_metering_secret: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.CeilometerMeteringSecret') | first }}" +ceilometer_password: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.CeilometerPassword') | first }}" cinder_password: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.CinderPassword') | first }}" glance_password: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.GlancePassword') | first }}" ironic_password: "{{ lookup('file', tripleo_passwords) | from_yaml | community.general.json_query('*.IronicPassword') | first }}"