Add docs for composable services/roles

This adds some basic docs explaining how to use composable services
and custom roles.

Change-Id: I22b84cc22db7aa60265a13a3cb26e28a98190105
This commit is contained in:
Steven Hardy 2016-12-20 10:47:44 +00:00 committed by Michele Baldessari
parent 3c2125c99a
commit 1fb9641e6d
3 changed files with 147 additions and 0 deletions

View File

@ -0,0 +1,56 @@
.. _composable_services:
Deploying with Composable Services
==================================
TripleO offers the option of deploying with a user-defined list of services
per role (where "role" means group of nodes, e.g "Controller", and "service"
refers to the individual services or configurations e.g "Nova API").
Deploying with custom service lists
-----------------------------------
Each role defines a default list of services, which can be viewed in the
`roles_data.yaml` file (see `/usr/share/openstack-tripleo-heat-templates`, or
the tripleo-heat-templates_ git repository.)
The data in `roles_data.yaml` is used to set the defaults for per-role parameters
e.g `CustomControllerServices`. These defaults can be overridden via environment
files, e.g::
cat > keystone_only_params.yaml << EOF
parameter_defaults:
CustomControllerServices:
- OS::TripleO::Services::Keystone
- OS::TripleO::Services::RabbitMQ
- OS::TripleO::Services::HAproxy
- OS::TripleO::Services::MySQL
ComputeCount: 0
OvercloudCustomControllerFlavor: customcontroller
EOF
The example above overrides the default list of services, and instead deploys
Keystone and the services it requires. It also sets the ComputeCount to zero
to enable a minimal "keystone only" deployment on a single node.
You can then pass the environment file on deployment as follows::
openstack overcloud deploy -e keystone_only_params.yaml
The same approach can be used for any role.
.. warning::
While considerable flexibilty is available regarding service placement with
these interfaces, the flexible placement of pacemaker managed services is only
available since the Ocata release.
.. warning::
In general moving control-plane services to the Compute role is not
recommended, as the compute nodes require a different upgrade lifecycle
and thus control-plane services on this role may present problems during
major upgrades between releases.
.. _tripleo-heat-templates: https://git.openstack.org/openstack/tripleo-heat-templates

View File

@ -6,6 +6,8 @@ Documentation on how to deploy custom configurations with |project|.
.. toctree::
composable_services
custom_roles
node_config
node_specific_hieradata
extra_config

View File

@ -0,0 +1,89 @@
.. _custom_roles:
Deploying with Custom Roles
===========================
TripleO offers the option of deploying with a user-defined list of roles,
each running a user defined list of services (where "role" means group of
nodes, e.g "Controller", and "service" refers to the individual services or
configurations e.g "Nova API").
See :doc:`composable_services` if you only wish to modify the default list of
deployed services, or see below if you wish to modify the deployed roles.
Deploying with custom roles
---------------------------
Each role is defined in the `roles_data.yaml` file (see
`/usr/share/openstack-tripleo-heat-templates`, or the tripleo-heat-templates_ git
repository.)
The data in `roles_data.yaml` is used to perform templating with jinja2_ such
that arbitrary user-defined roles may be added, and the default roles may
be modified or removed.
The steps to define your custom roles configuration are:
1. Copy the default roles_data.yaml::
cp /usr/share/openstack-tripleo-heat-templates/roles_data.yaml ~/my_roles_data.yaml
2. Edit my_roles_data.yaml to suit your requirements
The roles_data is a simple list of roles, where the only mandatory argument is
the name, and several optional additional keys are supported:
* name: Name of the role e.g "CustomController", mandatory
* CountDefault: Default number of nodes, defaults to zero
* ServicesDefault: List of services, optional, defaults to an empty list
See the default roles_data.yaml or overcloud-resource-registry-puppet.j2.yaml
for the list of supported services. Both files can be found in the top
tripleo-heat-templates folder
* HostnameFormatDefault: Format string for hostname, optional
For example the following role would deploy a pacemaker managed galera cluster::
- name: Galera
HostnameFormatDefault: '%stackname%-galera-%index%'
ServicesDefault:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::Timezone
- OS::TripleO::Services::Ntp
- OS::TripleO::Services::Snmp
- OS::TripleO::Services::Kernel
- OS::TripleO::Services::Pacemaker
- OS::TripleO::Services::MySQL
- OS::TripleO::Services::TripleoPackages
- OS::TripleO::Services::TripleoFirewall
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
.. note::
In the example above, if you wanted to deploy the Galera role on specific nodes
you would either use predictable placement :doc:`node_placement` or add a custom
parameter called OvercloudGaleraFlavor::
parameter_defaults:
OvercloudGaleraFlavor: oooq_galera
3. Pass the modified roles_data on deployment as follows::
openstack overcloud deploy --templates -r ~/my_roles_data.yaml
.. note::
It is also possible to copy the entire tripleo-heat-templates tree, and modify
the roles_data.yaml file in place, then deploy via `--templates <copy of tht>`
.. warning::
Note that in your custom roles you may not use any already predefined name
So in practice you may not override the following roles: Controller, Compute,
BlockStorage, SwiftStorage and CephStorage. You need to use different names
instead.
.. _tripleo-heat-templates: https://git.openstack.org/openstack/tripleo-heat-templates
.. _jinja2: http://jinja.pocoo.org/docs/dev/