2016-09-06 13:49:19 +01:00
|
|
|
.. _configure:
|
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
========================
|
|
|
|
Configure the deployment
|
|
|
|
========================
|
2015-06-09 09:30:28 -05:00
|
|
|
|
2016-08-31 12:31:43 +01:00
|
|
|
.. figure:: figures/installation-workflow-configure-deployment.png
|
|
|
|
:width: 100%
|
2015-06-09 09:30:28 -05:00
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
Ansible references some files that contain mandatory and optional
|
|
|
|
configuration directives. Before you can run the Ansible playbooks, modify
|
|
|
|
these files to define the target environment. Configuration tasks include:
|
2015-06-09 09:30:28 -05:00
|
|
|
|
2016-08-31 12:31:43 +01:00
|
|
|
* Target host networking to define bridge interfaces and
|
|
|
|
networks.
|
|
|
|
* A list of target hosts on which to install the software.
|
|
|
|
* Virtual and physical network relationships for OpenStack
|
|
|
|
Networking (neutron).
|
|
|
|
* Passwords for all services.
|
2015-06-09 09:30:28 -05:00
|
|
|
|
2016-09-13 15:18:29 -05:00
|
|
|
Initial environment configuration
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-09-16 14:56:59 +01:00
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
OpenStack-Ansible (OSA) depends on various files that are used to build an
|
|
|
|
inventory for Ansible. Perform the following configuration on the deployment
|
|
|
|
host.
|
2016-09-13 15:18:29 -05:00
|
|
|
|
|
|
|
#. Copy the contents of the
|
|
|
|
``/opt/openstack-ansible/etc/openstack_deploy`` directory to the
|
|
|
|
``/etc/openstack_deploy`` directory.
|
|
|
|
|
|
|
|
#. Change to the ``/etc/openstack_deploy`` directory.
|
|
|
|
|
|
|
|
#. Copy the ``openstack_user_config.yml.example`` file to
|
|
|
|
``/etc/openstack_deploy/openstack_user_config.yml``.
|
|
|
|
|
2016-09-16 14:56:59 +01:00
|
|
|
#. Review the ``openstack_user_config.yml`` file and make changes
|
|
|
|
to the deployment of your OpenStack environment.
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2016-09-16 14:56:59 +01:00
|
|
|
.. note::
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2016-09-16 14:56:59 +01:00
|
|
|
The file is heavily commented with details about the various options.
|
2017-03-06 16:25:25 +00:00
|
|
|
See :ref:`openstack-user-config-reference` for more details.
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
The configuration in the ``openstack_user_config.yml`` file defines which hosts
|
|
|
|
run the containers and services deployed by OpenStack-Ansible. For
|
|
|
|
example, hosts listed in the ``shared-infra_hosts`` section run containers for
|
|
|
|
many of the shared services that your OpenStack environment requires. Some of
|
|
|
|
these services include databases, Memcached, and RabbitMQ. Several other
|
|
|
|
host types contain other types of containers, and all of these are listed
|
|
|
|
in the ``openstack_user_config.yml`` file.
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2017-08-13 19:41:16 -05:00
|
|
|
Some services, such as glance, heat, horizon and nova-infra, are not listed
|
|
|
|
individually in the example file as they are contained in the os-infra hosts.
|
|
|
|
You can specify image-hosts or dashboard-hosts if you want to scale out in a
|
|
|
|
specific manner.
|
|
|
|
|
Support cidr_networks in L3 network environments
In some environments, a single container, storage, or tunnel network may
not be applicable to every host. Each configured provider_network would
need to be limited to a particular subset of hosts and the host var keys
within the inventory for container_address, storage_address, and
tunnel_address will need to be maintained since they're specifically
required by various playbooks.
Add two new options for configuring provider_networks, 'reference_group'
and 'address_prefix'.
'reference_group' for providing a group name that any host must
be a member of, in addition to any of the groups listed in
'group_binds', for the network to be applied.
'address_prefix' for overriding the name of the key created for each IP
address allocated by a cidr_network. By default, this key is named
'cidr_network'_address, where 'cidr_network' is the given 'ip_from_q'
option for a provider network.
Closes-Bug: 1650356
Change-Id: Ia7f3119f0affc4fb6be97ca788ca3b46096b82a8
2017-05-10 20:58:10 -07:00
|
|
|
For examples, please see :ref:`test-environment-config`,
|
|
|
|
:ref:`production-environment-config`, and :ref:`pod-environment-config`
|
2016-09-20 16:49:40 +10:00
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
For details about how the inventory is generated from the environment
|
2016-10-28 14:56:47 +01:00
|
|
|
configuration, see
|
|
|
|
`developer-inventory <http://docs.openstack.org/developer/openstack-ansible/developer-docs/inventory.html>`_.
|
2016-10-05 14:54:42 -05:00
|
|
|
|
2017-05-25 11:10:07 +00:00
|
|
|
For details about how variable precedence works, and how to override
|
|
|
|
group vars, see
|
|
|
|
`developer-inventory-and-vars <http://docs.openstack.org/developer/openstack-ansible/developer-docs/inventory-and-vars.html>`_.
|
|
|
|
|
2017-02-14 00:56:42 -08:00
|
|
|
Installing additional services
|
2017-03-28 18:38:06 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-10-12 15:13:56 +01:00
|
|
|
|
|
|
|
To install additional services, the files in
|
|
|
|
``/etc/openstack_deploy/conf.d`` provide examples showing
|
|
|
|
the correct host groups to use. To add another service, add the host group,
|
|
|
|
allocate hosts to it, and then execute the playbooks.
|
|
|
|
|
2017-02-14 00:56:42 -08:00
|
|
|
Advanced service configuration
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
OpenStack-Ansible has many options that you can use for the advanced
|
|
|
|
configuration of services. Each role's documentation provides information
|
|
|
|
about the available options.
|
|
|
|
|
|
|
|
Infrastructure service roles
|
|
|
|
----------------------------
|
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`galera_server`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`haproxy_server`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`memcached_server`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`rabbitmq_server`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`repo_build`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`repo_server`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`rsyslog_server`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
OpenStack service roles
|
|
|
|
-----------------------
|
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_aodh`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_barbican`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_ceilometer`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_cinder`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_designate`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_glance`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_gnocchi`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_heat`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_horizon`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_ironic`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_keystone`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_magnum`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_neutron`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_nova`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_rally`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_sahara`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_swift`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_tempest`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`os_trove`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
|
|
|
|
|
|
|
Other roles
|
|
|
|
-----------
|
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`apt_package_pinning`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`ceph_client`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`galera_client`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`lxc_container_create`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`lxc_hosts`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`pip_install`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-15 10:19:02 -08:00
|
|
|
- :role_docs:`plugins`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`openstack_hosts`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2017-02-15 10:19:02 -08:00
|
|
|
- :role_docs:`openstack_openrc`
|
|
|
|
|
2017-02-14 02:15:40 -08:00
|
|
|
- :role_docs:`rsyslog_client`
|
2017-02-14 00:56:42 -08:00
|
|
|
|
2016-09-13 15:18:29 -05:00
|
|
|
Configuring service credentials
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-10-05 14:54:42 -05:00
|
|
|
|
2016-09-13 15:18:29 -05:00
|
|
|
Configure credentials for each service in the
|
2016-10-05 14:54:42 -05:00
|
|
|
``/etc/openstack_deploy/*_secrets.yml`` files. Consider using the
|
|
|
|
`Ansible Vault <http://docs.ansible.com/playbooks_vault.html>`_ feature to
|
|
|
|
increase security by encrypting any files that contain credentials.
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
Adjust permissions on these files to restrict access by nonprivileged
|
2016-09-13 15:18:29 -05:00
|
|
|
users.
|
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
The ``keystone_auth_admin_password`` option configures the ``admin`` tenant
|
|
|
|
password for both the OpenStack API and Dashboard access.
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2016-10-05 14:54:42 -05:00
|
|
|
We recommend that you use the ``pw-token-gen.py`` script to generate random
|
|
|
|
values for the variables in each file that contains service credentials:
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2017-03-28 18:38:06 +02:00
|
|
|
.. code-block:: shell-session
|
2016-09-13 15:18:29 -05:00
|
|
|
|
2017-03-28 18:38:06 +02:00
|
|
|
# cd /opt/openstack-ansible/scripts
|
|
|
|
# python pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml
|
2016-09-13 15:18:29 -05:00
|
|
|
|
|
|
|
To regenerate existing passwords, add the ``--regen`` flag.
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
The playbooks do not currently manage changing passwords in an existing
|
2016-10-05 14:54:42 -05:00
|
|
|
environment. Changing passwords and rerunning the playbooks will fail
|
|
|
|
and might break your OpenStack environment.
|