Chapter 8. Working with custom roles and services
Chapter 8. Working with custom roles and services The all-in-one Red Hat OpenStack Platform (RHOSP) installation runs on a single node that contains all of the OpenStack services. The Standalone.yaml role file in the /usr/share/openstack-tripleo-heat-templates/roles directory is the configuration file that contains all of the services in the all-in-one installation. You can duplicate and modify the Standalone.yaml role file to enable and disable services in your installation. The Standalone.yaml file contains a list of services in the Standalone role. Use the following example to understand the syntax of this file: Include this role file in the deployment command to configure your stack with the Standalone role that contains the services that you include in the ServicesDefault: section of the role file: However, in a production, multi-node Red Hat OpenStack Platform environment, you assign each node with a role that contains a portion of the OpenStack services, rather than including all services on a single node. For example, the default Controller role includes administration, networking, and high availability services, and the default Compute role includes computing services. The default role file in a multi-node environment is the /usr/share/openstack-tripleo-heat-templates/roles_data.yaml file. This file defines the following role types: Controller Compute BlockStorage ObjectStorage CephStorage Use the following example to understand role syntax in a multi-node environment: ----` - name: Controller description: | Controller role that contains all of the services for database, messaging and network functions. ServicesDefault: - OS::TripleO::Services::AuditD - OS::TripleO::Services::CACerts - OS::TripleO::Services::CephClient ... - name: Compute description: | Basic Compute Node role ServicesDefault: - OS::TripleO::Services::AuditD - OS::TripleO::Services::CACerts - OS::TripleO::Services::CephClient ... ----` You must include the role file each time you enter the deployment command. You can use the -r argument in the deployment command to override this file and use a custom role file: ----` [stack@all-in-one]USD sudo openstack tripleo deploy --templates -r ~/templates/roles_data-custom.yaml ----` 8.1. Enabling and disabling services in the all-in-one Red Hat OpenStack Platform environment To enable or disable individual services in your environment, complete the following steps: Procedure To enable a service, create a new environment file and remove the value OS::Heat::None from the service that you want to enable: Include this environment file in the deployment command. To disable a service, create a new environment file and include the value OS::Heat::None for the service that you want to disable: Include this environment file in the deployment command.
- name: Standalone description: | A standalone role that includes a minimal set of services. Use this role for testing in a single node configuration with the `openstack tripleo deploy --standalone` command, or with the `openstack overcloud deploy` command. CountDefault: 1 tags: - primary - controller disable_constraints: True ServicesDefault: - OS::TripleO::Services::Aide - OS::TripleO::Services::AodhApi - OS::TripleO::Services::AodhEvaluator - OS::TripleO::Services::Tuned - OS::TripleO::Services::Vpp - OS::TripleO::Services::Zaqar [stack@all-in-one]USD sudo openstack tripleo deploy --templates -r /usr/share/openstack-tripleo-heat-templates/roles/Standalone.yaml - OS::TripleO::Services::<SERVICE>: - OS::TripleO::Services::<SERVICE>: OS::Heat::None