This patch fixes: doc/source/contributor/testing.rst:281: D000 Explicit markup ends without a blank line; unexpected unindent. doc/source/user/test/example.rst:28: D001 Line too long doc/source/admin/maintenance-tasks.rst:8: D000 Title level inconsistent: doc/source/admin/maintenance-tasks.rst:22: D000 Title level inconsistent: doc/source/admin/troubleshooting.rst:630: D001 Line too long doc/source/admin/troubleshooting.rst:650: D001 Line too long doc/source/admin/maintenance-tasks/inventory-backups.rst:11: D001 Line too long For consistency between maintenance-tasks/ files, they now all have the same markup hierarchy. Depends-On: https://review.openstack.org/567804 Change-Id: Id1cf9cb45543daa7c39d5141d8dc5827a76c6413
3.2 KiB
Container management
With Ansible, the OpenStack installation process is entirely automated using playbooks written in YAML. After installation, the settings configured by the playbooks can be changed and modified. Services and containers can shift to accommodate certain environment requirements. Scaling services is achieved by adjusting services within containers, or adding new deployment groups. It is also possible to destroy containers if needed after changes and modifications are complete.
Scale individual services
Individual OpenStack services, and other open source project
services, run within containers. It is possible to scale out these
services by modifying the
/etc/openstack_deploy/openstack_user_config.yml
file.
Navigate into the
/etc/openstack_deploy/openstack_user_config.yml
file.Access the deployment groups section of the configuration file. Underneath the deployment group name, add an affinity value line to container scales OpenStack services:
infra_hosts: infra1: ip: 10.10.236.100 # Rabbitmq affinity: galera_container: 1 rabbit_mq_container: 2
In this example,
galera_container
has a container value of one. In practice, any containers that do not need adjustment can remain at the default value of one, and should not be adjusted above or below the value of one.The affinity value for each container is set at one by default. Adjust the affinity value to zero for situations where the OpenStack services housed within a specific container will not be needed when scaling out other required services.
Update the container number listed under the
affinity
configuration to the desired number. The above example hasgalera_container
set at one andrabbit_mq_container
at two, which scales RabbitMQ services, but leaves Galera services fixed.Run the appropriate playbook commands after changing the configuration to create the new containers, and install the appropriate services.
For example, run the openstack-ansible lxc-containers-create.yml rabbitmq-install.yml commands from the
openstack-ansible/playbooks
repository to complete the scaling process described in the example above:$ cd openstack-ansible/playbooks $ openstack-ansible lxc-containers-create.yml rabbitmq-install.yml
Destroy and recreate containers
Resolving some issues may require destroying a container, and
rebuilding that container from the beginning. It is possible to destroy
and re-create a container with the
lxc-containers-destroy.yml
and
lxc-containers-create.yml
commands. These Ansible scripts
reside in the openstack-ansible/playbooks
repository.
Navigate to the
openstack-ansible
directory.Run the openstack-ansible lxc-containers-destroy.yml commands, specifying the target containers and the container to be destroyed.
$ openstack-ansible lxc-containers-destroy.yml --limit "CONTAINER_NAME" $ openstack-ansible lxc-containers-create.yml --limit "CONTAINER_NAME"
Replace ``CONTAINER_NAME`` with the target container.