Kolla Ansible
repository·master·Indexed 21 days ago
https://github.com/openstack/kolla-ansibleA deployment tool that uses Ansible to deploy OpenStack services and infrastructure components within Docker containers. It provides a production-ready and highly customizable cloud deployment solution, featuring advanced configuration options for endpoint networks, FQDNs, service configuration overrides, and scaling for large baremetal deployments using Nova and Ironic.
What's inside kolla-ansible
- Kolla Ansible is a deployment tool that deploys OpenStack services and infrastructure components inside Docker containers. It is designed to provide production-ready containers while allowing for high levels of customization. It is highly opinionated by default to enable quick deployments for operators, but can be modified to meet specific requirements as expertise grows.
Configure and run Neutron extensions in Kolla
masterKolla deploys Neutron by default as the OpenStack networking component. You can extend Neutron functionality by configuring and running specific extensions such as Networking-SFC, QoS, and others. Detailed configuration for specific networking technologies (like DPDK, SR-IOV, or Octavia) is available in their respective specialized guides.Deploy Kolla images with Kubernetes
masterKolla-Kubernetes is a project designed to manage the lifecycle of containerized OpenStack services using Kubernetes orchestration tools. This approach leverages Kubernetes' inherent capabilities for self-healing, rolling upgrades, and high availability (HA) through service monitoring, health checks, and replication controllers.Overview of Prometheus Monitoring in Kolla Ansible
masterKolla Ansible uses Prometheus as a framework to monitor the behavior and performance of nodes in large deployments. This monitoring approach covers both system-level and service-level characteristics.
Monitoring is achieved through three primary pillars:
- Exposing the data: Using existing exporters or direct product support to provide data in Prometheus format.
- Collecting and storing data: Configuring and running Prometheus instances to scrape and persist metrics.
- Analyzing and reporting: Using tools like Grafana (configured with Prometheus as a data source) to visualize metrics and identify issues.
Key use cases include querying component performance, displaying system-wide dashboards, and monitoring the status of Kolla Ansible containers to identify deployment issues.
Security considerations for Keystone tokens in HA
masterWhen deploying OpenStack in an active/active manner, choose your Keystone token format carefully:
- UUID Tokens: Recommended for initial HA deployments as they are easier to deploy in active/active environments.
- PKI Tokens: Provide better security but are more complex to deploy in an active/active configuration.
How etcd bootstrapping works in Kolla Ansible
masterKolla Ansible manages the etcd lifecycle by distinguishing between two bootstrapping modes based on the presence of existing data:
- New Cluster Bootstrap: Triggered when Kolla Ansible detects no existing data on the etcd nodes. This bootstraps a clean multi-node cluster.
- Existing Cluster Bootstrap: Triggered when data is detected. Kolla Ansible assumes a healthy cluster exists and will instead attempt to add a single node to that cluster.
Important Note on Configuration: Unlike most Kolla Ansible services, once an etcd cluster is bootstrapped, the service takes most of its configuration from the etcd database itself. Changes to bootstrap configuration may be ignored once the node has completed its initial bootstrap.
Security configuration for the Heka container
masterFor security, thehekaddaemon runs under a dedicatedhekauser within the Heka container. To ensure Heka can read logs produced by other services, thehekauser is added to thekollagroup. Permissions for the shared Docker volumes are managed via anextend_start.shscript that executessudo chownandsudo chmodto align ownership and group bits.Coalesce Python Tracebacks in Heka
masterOpenStack services often log Python Tracebacks as multiple separate log messages. To prevent these from being indexed as distinct, fragmented documents in Elasticsearch/Kibana, a custom Heka decoder is used to coalesce the individual log lines of a traceback into a single coherent message.Manage RabbitMQ High Availability and Queue Types
masterSince RabbitMQ 4.0, all queues are configured as quorum queues (highly available) by default. RabbitMQ also supports 'streams' as a high-performance alternative to 'fanout' queues.
To disable stream fanout, set
om_enable_rabbitmq_stream_fanout: false.Deploy CentOS 8 containers with Kolla Ansible
masterKolla Ansible automatically detects the host OS distribution to ensure compatibility. It deploys CentOS 7 containers on CentOS 7 hosts and CentOS 8 containers on CentOS 8 hosts to avoid kernel and userspace incompatibilities.
Image Tag Resolution Hierarchy
Kolla Ansible uses a hierarchy of variables to determine the correct container image tag. For a service like
nova-compute, the resolution order is:nova_compute_tag(Service-specific override)nova_tag(Service group override)openstack_tag(Intermediate OS-aware variable)openstack_release(Default fallback)
On CentOS 8 hosts,
openstack_tagdefaults to{openstack_release}-centos8. On other distributions, it defaults to{openstack_release}.Database and Message Queue Requirements for Nova Cells
masterNova Cells require specific database and message queue configurations to function:
- Global Services: Require access to the API database, the cell0 database, and a global message queue.
- Per-cell Services: Each individual cell requires its own unique database and message queue instance.
Implementation in Kolla Ansible: Kolla Ansible supports deploying shared database clusters and message queue clusters. In this shared model, cells are partitioned using distinct database names and message queue virtual hosts.
Configure Identity Provider metadata files
masterThe
metadata_folderspecified inkeystone_identity_providersmust contain JSON files named after the Issuer (URL-encoded). For example, if an Issuer iskeycloak.example.org/auth/realms/idp.client, the file name must escape slashes as%2F.Each provider requires three specific JSON files in that folder:
.client: Contains Service Provider credentials (client_idandclient_secret)..conf: Overrides OpenID Connect Apache2 plugin options. Can be an empty JSON{}if no overrides are needed..provider: Contains the full specification of the IdP (issuer, endpoints, supported scopes, etc.). You can use the JSON returned from the IdP's.well-knownendpoint.
<IDP metadata directory> - keycloak.example.org%2Fauth%2Frealms%2Fidp.client - keycloak.example.org%2Fauth%2Frealms%2Fidp.conf - keycloak.example.org%2Fauth%2Frealms%2Fidp.provider