Chapter 2. Configuring and deploying the overcloud for autoscaling
You must configure the templates for the services on your overcloud that enable autoscaling.
Procedure
- Create environment templates and a resource registry for autoscaling services before you deploy the overcloud for autoscaling. For more information, see Section 2.1, “Configuring the overcloud for autoscaling”
- Deploy the overcloud. For more information, see Section 2.2, “Deploying the overcloud for autoscaling”
2.1. Configuring the overcloud for autoscaling
Create the environment templates and resource registry that you need to deploy the services that provide autoscaling.
Procedure
-
Log in to the undercloud host as the
stackuser. Create a directory for the autoscaling configuration files:
$ mkdir -p $HOME/templates/autoscaling/
Create the resource registry file for the definitions that the services require for autoscaling:
$ cat <<EOF > $HOME/templates/autoscaling/resources-autoscaling.yaml resource_registry: OS::TripleO::Services::AodhApi: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-api-container-puppet.yaml OS::TripleO::Services::AodhEvaluator: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-evaluator-container-puppet.yaml OS::TripleO::Services::AodhListener: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-listener-container-puppet.yaml OS::TripleO::Services::AodhNotifier: /usr/share/openstack-tripleo-heat-templates/deployment/aodh/aodh-notifier-container-puppet.yaml OS::TripleO::Services::CeilometerAgentCentral: /usr/share/openstack-tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-central-container-puppet.yaml OS::TripleO::Services::CeilometerAgentNotification: /usr/share/openstack-tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-notification-container-puppet.yaml OS::TripleO::Services::ComputeCeilometerAgent: /usr/share/openstack-tripleo-heat-templates/deployment/ceilometer/ceilometer-agent-compute-container-puppet.yaml OS::TripleO::Services::GnocchiApi: /usr/share/openstack-tripleo-heat-templates/deployment/gnocchi/gnocchi-api-container-puppet.yaml OS::TripleO::Services::GnocchiMetricd: /usr/share/openstack-tripleo-heat-templates/deployment/gnocchi/gnocchi-metricd-container-puppet.yaml OS::TripleO::Services::GnocchiStatsd: /usr/share/openstack-tripleo-heat-templates/deployment/gnocchi/gnocchi-statsd-container-puppet.yaml OS::TripleO::Services::HeatApi: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-api-container-puppet.yaml OS::TripleO::Services::HeatApiCfn: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-api-cfn-container-puppet.yaml OS::TripleO::Services::HeatApiCloudwatch: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-api-cloudwatch-disabled-puppet.yaml OS::TripleO::Services::HeatEngine: /usr/share/openstack-tripleo-heat-templates/deployment/heat/heat-engine-container-puppet.yaml OS::TripleO::Services::Redis: /usr/share/openstack-tripleo-heat-templates/deployment/database/redis-container-puppet.yaml EOF
Create an environment template to configure the services required for autoscaling:
cat <<EOF > $HOME/templates/autoscaling/parameters-autoscaling.yaml parameter_defaults: NotificationDriver: 'messagingv2' GnocchiDebug: false CeilometerEnableGnocchi: true ManagePipeline: true ManageEventPipeline: true EventPipelinePublishers: - gnocchi://?archive_policy=generic PipelinePublishers: - gnocchi://?archive_policy=generic ManagePolling: true ExtraConfig: ceilometer::agent::polling::polling_interval: 60 EOFIf you use Red Hat Ceph Storage as the data storage back end for the time-series database service, add the following parameters to your
parameters-autoscaling.yamlfile:parameter_defaults: GnocchiRbdPoolName: 'metrics' GnocchiBackend: 'rbd'
You must create the defined archive policy
genericbefore you can store metrics. You define this archive policy after the deployment. For more information, see Section 3.1, “Creating the generic archive policy for autoscaling”.-
Set the
polling_intervalparameter, for example, 60 seconds. The value of thepolling_intervalparameter must match the gnocchi granularity value that you defined when you created the archive policy. For more information, see Section 3.1, “Creating the generic archive policy for autoscaling”. - Deploy the overcloud. For more information, see Section 2.2, “Deploying the overcloud for autoscaling”
2.2. Deploying the overcloud for autoscaling
You can deploy the overcloud for autoscaling by using director or by using a standalone environment.
Prerequisites
- You have created the environment templates for deploying the services that provide autoscaling capabilities. For more information, see Section 2.1, “Configuring the overcloud for autoscaling”.
Procedure
2.2.1. Deploying the overcloud for autoscaling by using director
Use director to deploy the overcloud. If you are using a standalone environment, see Section 2.2.2, “Deploying the overcloud for autoscaling in a standalone environment”.
Prerequisites
- A deployed undercloud. For more information, see Installing director on the undercloud.
Procedure
-
Log in to the undercloud as the
stackuser. Source the
stackrcundercloud credentials file:[stack@director ~]$ source ~/stackrc
Add the autoscaling environment files to the stack with your other environment files and deploy the overcloud:
(undercloud)$ openstack overcloud deploy --templates \ -e [your environment files] \ -e $HOME/templates/autoscaling/parameters-autoscaling.yaml \ -e $HOME/templates/autoscaling/resources-autoscaling.yaml
2.2.2. Deploying the overcloud for autoscaling in a standalone environment
To test the environment files in a pre-production environment, you can deploy the overcloud with the services required for autoscaling by using a standalone deployment.
This procedure uses example values and commands that you must change to suit a production environment.
If you want to use director to deploy the overcloud for autoscaling, see Section 2.2.1, “Deploying the overcloud for autoscaling by using director”.
Prerequisites
- An all-in-one RHOSP environment has been staged with the python3-tripleoclient. For more information, see Installing the all-in-one Red Hat OpenStack Platform environment.
- An all-in-one RHOSP environment has been staged with the base configuration. For more information, see Configuring the all-in-one Red Hat OpenStack Platform environment.
Procedure
Change to the user that manages your overcloud deployments, for example, the
stackuser:[root@standalone ~]# su - stack
Replace or set the environment variables
$IP,$NETMASKand$VIPfor the overcloud deployment:$ export IP=192.168.25.2 $ export VIP=192.168.25.3 $ export NETMASK=24
Deploy the overcloud to test and verify the resource and parameter files:
$ sudo openstack tripleo deploy \ --templates \ --local-ip=$IP/$NETMASK \ --control-virtual-ip=$VIP \ -e /usr/share/openstack-tripleo-heat-templates/environments/standalone/standalone-tripleo.yaml \ -r /usr/share/openstack-tripleo-heat-templates/roles/Standalone.yaml \ -e $HOME/containers-prepare-parameters.yaml \ -e $HOME/standalone_parameters.yaml \ -e $HOME/templates/autoscaling/resources-autoscaling.yaml \ -e $HOME/templates/autoscaling/parameters-autoscaling.yaml \ --output-dir $HOME \ --standalone
Export the
OS_CLOUDenvironment variable:$ export OS_CLOUD=standalone
Additional resources
2.3. Verifying the overcloud deployment for autoscaling
Verify that the autoscaling services are deployed and enabled. Verification output is from a standalone environment, but director-based environments provide similar output.
Prerequisites
- You have deployed the autoscaling services in an existing overcloud using standalone or director. For more information, see Section 2.2, “Deploying the overcloud for autoscaling”.
Procedure
-
Log in to your environment as the
stackuser. For standalone environments set the
OS_CLOUDenvironment variable:[stack@standalone ~]$ export OS_CLOUD=standalone
For director environments, source the
stackrcundercloud credentials file:[stack@undercloud ~]$ source ~/stackrc
Verification
Verify that the deployment was successful and ensure that the service API endpoints for autoscaling are available:
$ openstack endpoint list --service metric +----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+ | 2956a12327b744b29abd4577837b2e6f | regionOne | gnocchi | metric | True | internal | http://192.168.25.3:8041 | | 583453c58b064f69af3de3479675051a | regionOne | gnocchi | metric | True | admin | http://192.168.25.3:8041 | | fa029da0e2c047fc9d9c50eb6b4876c6 | regionOne | gnocchi | metric | True | public | http://192.168.25.3:8041 | +----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+
$ openstack endpoint list --service alarming +----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+ | 08c70ec137b44ed68590f4d5c31162bb | regionOne | aodh | alarming | True | internal | http://192.168.25.3:8042 | | 194042887f3d4eb4b638192a0fe60996 | regionOne | aodh | alarming | True | admin | http://192.168.25.3:8042 | | 2604b693740245ed8960b31dfea1f963 | regionOne | aodh | alarming | True | public | http://192.168.25.3:8042 | +----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+
$ openstack endpoint list --service orchestration +----------------------------------+-----------+--------------+---------------+---------+-----------+-------------------------------------------+ | ID | Region | Service Name | Service Type | Enabled | Interface | URL | +----------------------------------+-----------+--------------+---------------+---------+-----------+-------------------------------------------+ | 00966a24dd4141349e12680307c11848 | regionOne | heat | orchestration | True | admin | http://192.168.25.3:8004/v1/%(tenant_id)s | | 831e411bb6d44f6db9f5103d659f901e | regionOne | heat | orchestration | True | public | http://192.168.25.3:8004/v1/%(tenant_id)s | | d5be22349add43ae95be4284a42a4a60 | regionOne | heat | orchestration | True | internal | http://192.168.25.3:8004/v1/%(tenant_id)s | +----------------------------------+-----------+--------------+---------------+---------+-----------+-------------------------------------------+
Verify that the services are running on the overcloud:
$ sudo podman ps --filter=name='heat|gnocchi|ceilometer|aodh' CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 31e75d62367f registry.redhat.io/rhosp-rhel9/openstack-aodh-api:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) aodh_api 77acf3487736 registry.redhat.io/rhosp-rhel9/openstack-aodh-listener:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) aodh_listener 29ec47b69799 registry.redhat.io/rhosp-rhel9/openstack-aodh-evaluator:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) aodh_evaluator 43efaa86c769 registry.redhat.io/rhosp-rhel9/openstack-aodh-notifier:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) aodh_notifier 0ac8cb2c7470 registry.redhat.io/rhosp-rhel9/openstack-aodh-api:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) aodh_api_cron 31b55e091f57 registry.redhat.io/rhosp-rhel9/openstack-ceilometer-central:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) ceilometer_agent_central 5f61331a17d8 registry.redhat.io/rhosp-rhel9/openstack-ceilometer-compute:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) ceilometer_agent_compute 7c5ef75d8f1b registry.redhat.io/rhosp-rhel9/openstack-ceilometer-notification:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) ceilometer_agent_notification 88fa57cc1235 registry.redhat.io/rhosp-rhel9/openstack-gnocchi-api:17.0 kolla_start 23 minutes ago Up 23 minutes ago (healthy) gnocchi_api 0f05a58197d5 registry.redhat.io/rhosp-rhel9/openstack-gnocchi-metricd:17.0 kolla_start 23 minutes ago Up 23 minutes ago (healthy) gnocchi_metricd 6d806c285500 registry.redhat.io/rhosp-rhel9/openstack-gnocchi-statsd:17.0 kolla_start 23 minutes ago Up 23 minutes ago (healthy) gnocchi_statsd 7c02cac34c69 registry.redhat.io/rhosp-rhel9/openstack-heat-api:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) heat_api_cron d3903df545ce registry.redhat.io/rhosp-rhel9/openstack-heat-api:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) heat_api db1d33506e3d registry.redhat.io/rhosp-rhel9/openstack-heat-api-cfn:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) heat_api_cfn 051446294c70 registry.redhat.io/rhosp-rhel9/openstack-heat-engine:17.0 kolla_start 27 minutes ago Up 27 minutes ago (healthy) heat_engine
Verify that the time-series database service is available:
$ openstack metric status --fit-width +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+ | metricd/processors | ['standalone-80.general.local.0.a94fbf77-1ac0-49ed-bfe2-a89f014fde01', | | | 'standalone-80.general.local.3.28ca78d7-a80e-4515-8060-233360b410eb', | | | 'standalone-80.general.local.1.7e8b5a5b-2ca1-49be-bc22-25f51d67c00a', | | | 'standalone-80.general.local.2.3c4fe59e-23cd-4742-833d-42ff0a4cb692'] | | storage/number of metric having measures to process | 0 | | storage/total number of measures to process | 0 | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------+