Sample Analysis of kolla-ansible deployment
This article shows you a sample analysis of kolla-ansible deployment, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something from the details of this article.
General process of kolla-ansible deployment
After executing the command Kolla-ansible-i multinode deploy, koll invokes the ansible-playbook command
Then execute ansible-playbook-I multinode-e @ / etc/kolla/globals.yml-e @ / etc/kolla/passwords.yml-e CONFIG_DIR=/etc/kolla-e action=deploy / usr/share/kolla-ansible/ansible/site.yml
Then install the task menu in site.yml and execute it sequentially.
AnsibleLibraryKolla_container_facts.py
Module: kolla_container_facts
Description: used to check if a container is running
Options:
Api version of api_version:docker-py, not necessary, str type. Default is auto.
Name: container name, unnecessary, str or list type
Call example:
-hosts: all
Tasks:
-name: Gather docker facts
Kolla_container_facts:
-name: Gather glance container facts
Kolla_container_facts:
Name:
-glance_api
-glance_registry
Kolla_docker.py
Module: kolla_docker
Description: container used to control Docker
Options:
Common_options: dictionary options that contain common parameters, such as login information, non-necessary items, dict type, default value is dict ()
Action: the action methods, necessary items, and str types that can be called in the module. The optional action are: compare_container,compare_image,create_volume,get_container_env,get_container_state,pull_iamge,remove_volume,remove_container,recreate_or_restart_container,restart_container,start_container,stop_container
Api version of api_version:docker-py, not necessary, str type. Default is auto.
Auth_email: email address for authentication, non-essential, str type
Auth_password: password for authentication, non-essential, str type
Auth_registry: registry for authentication, non-essential, str type
Auth_username: user name for authentication, non-essential, str type
Detach: detach after the container is created, non-necessary, bool type. Default is True.
Name: name of the container or volume to be managed, non-essential, str type
Environment: environment variables, non-necessary items, dict types set in the container
Name of image:docker image, non-necessary entry, str type
Ipc_mode: sets the ipc namespace of docker, optional, str type. The default value is None. Optional values are: host
Cap_add: add capabilities, non-necessary items, list type to the container. The default is list ()
Security_opt: sets container security profile, optional, list type. Default is list ()
Labels: list of tags applied to the container, non-essential items, dict type. Default is dict ()
Pid_mode: sets docker pid namespace, non-necessary, str type. Default is None. Optional values are: host
Privileged: set privileges, non-necessary items, bool type to the container. The default value is False.
Remove_on_exit: when there is no separation from the container, delete the non-necessary entry, bool type, on successful exit. The default value is True.
Restart_policy: determine what docker should do when the container exits, optional items, str type, optional values are: never,on-failure,always,unless-stopped
Restart_retries: the number of restarts of the container when restart_policy is set, int type. Default is 10.
Volumes: sets the volume to be used, non-essential, list type
Volumes_from: the name or ID of the container in which the volume is to be used, the required list type
Call example:
-hosts: kolla_docker
Tasks:
-name: Start container
Kolla_docker:
Image: ubuntu
Name: test_container
Action: start_container
-name: Remove container
Kolla_docker:
Name: test_container
Action: remove_container
-name: Pull image without starting container
Kolla_docker:
Action: pull_container
Image: private-registry.example.com:5000/ubuntu
-name: Create named volume
Action: create_volume
Name: name_of_volume
-name: Remove named volume
Action: remove_volume
Name: name_of_volume
Kolla_toolbox.py
Module: kolla_toolbox
Description: used by kolla projects to call ansible modules in a kolla_toolbox container
Optional:
Module_name: module name of the call, required items, str type
Module_args: parameters passed to the called module, non-necessary, str or dict type
Module_extra_vars: extra parameters passed to the called module, non-necessary, str or dict type
Call example:
-hosts: controller
Tasks:
-name: Ensure the direct absent
Kolla_toolbox:
Module_name: file
Module_args: path=/tmp/a state=absent
-name: Create mysql database
Kolla_toolbox:
Module_name: mysql_db
Module_args:
Login_host: 192.168.1.10
Login_user: root
Login_password: admin
Name: testdb
-name: Creating default user role
Kolla_toolbox:
Module_name: os_keystone_role
Module_args:
Name: _ member_
Auth: "{{'{openstack_keystone_auth}}'}"
Module_extra_vars:
Openstack_keystone_auth:
Auth_url: http://127.0.0.1:5000
Username: admin
Password: password
Project_name: "admin"
Domain_name: "default"
Site.yml
Description: entry for kolla-ansible deployment. Kolla calls ansible to execute the entry file for playbook
Etckollaglobals.yml
Description: global variables that need to be configured when kolla-ansible deploys openstack. This configuration file overloads the variables used by the kolla project. The default values for all commented-out parameters in this file can be found in kolla-ansible/ansible/group_vars/all.yml.
Kolla option
Config_strategy: "COPY_ALWAYS"; optional [COPY_ONCE, COPY_ALWAYS]
Kolla_base_distro: "centos"; optional [centos, oraclelinux, ubuntu]
Kolla_install_type: "source"; optional [binary, source]
Openstack_release: "4.0.3"; version of container image
Node_custom_config: "/ etc/kolla/config"; you can customize some configuration files in this directory
Kolla_internal_vip_address: "192.168.215.209"; this VIP must be an unused IP, which will be used by keepalived for high availability
Kolla_internal_fqdn: "{{kolla_internal_vip_address}}"; this is the DNS name mapped to VIP
Kolla_external_vip_address: "{{kolla_internal_vip_address}}"; this VIP must be an unused IP, which will be used for keepalived for high availability. When kolla_internal_vip_address is used by default, internal and external communications are allowed to share the same address.
Kolla_external_fqdn: "{{kolla_external_vip_address}}"; the public address used to communicate with the OpenStack set in the public_url of the endpoint to be created.
Docker option
Docker_registry: "192.168.215.202 4000"; address of the docker image repository
Docker_namespace: "lokolla"; namespace of the image repository
Docker_registry_username: "sam"; account number of the image repository
Docker_registry_password: "correcthorsebatterystaple"; password of the image repository
Neutron option
Network_interface: "eth0"; all aip services use this network card to communicate by default. This network card must contain an IPv4 address
The following can be used for network cards with specific requirements
# kolla_external_vip_interface: "{{network_interface}}"
# api_interface: "{{network_interface}}"
# storage_interface: "{{network_interface}}"
# cluster_interface: "{{network_interface}}"
# tunnel_interface: "{{network_interface}}"
# dns_interface: "{{network_interface}}"
Neutron_external_interface: "eth2"; this is the original interface for neutron as its external network port
Neutron_plugin_agent: "openvswitch"; optional [openvswitch, linuxbridge]
Keepalived option
Keepalived_virtual_router_id: "52"; the unique ID of the keepalived cluster. The value should be between 0 and 255.
TLS option
To provide encryption and authentication on kolla_external_vip_interface, you can enable TLS. When you enable TLS, you must provide a certificate to allow the client to perform authentication.
Kolla_enable_tls_external: "no"
Kolla_external_fqdn_cert: "{{node_config_directory}} / certificates/haproxy.pem"
OpenStack option
Openstack_logging_debug: "False"; optional [True, False]
Nova_console: "novnc"; optional [novnc, spice]
Options for starting or shutting down the openstack service
# enable_aodh: "no"
# enable_barbican: "no"
# enable_ceilometer: "no"
# enable_central_logging: "no"
# enable_ceph: "no"
# enable_ceph_rgw: "no"
# enable_chrony: "no"
Enable_cinder: "yes"
# enable_cinder_backend_hnas_iscsi: "no"
# enable_cinder_backend_hnas_nfs: "no"
# enable_cinder_backend_iscsi: "no"
Enable_cinder_backend_lvm: "yes"
# enable_cinder_backend_nfs: "no"
.
Ceph option
Ceph can set up caching to improve performance. To use caching, you must provide a different disk than OSD
Ceph_enable_cache: "no"
Ceph_cache_mode: "writeback"; optional [forward, none, writeback]
Ceph_pool_type: "replicated"; optional [erasure, replicated]; the requirement for using erase coding pool is that the cache layer must be set
Keystone Identity option
Keystone_token_provider: 'uuid'; is available for [uuid, fernet]
Fernet_token_expiry: 86400
Glance Image option
Glance_backend_file: "yes"
Glance_backend_ceph: "no"
Ceilometer option
Ceilometer_database_type: "mongodb"; optional [mongodb, mysql, gnocchi]
Ceilometer_event_type: "mongodb"; optional [mongodb, gnocchi, panko]
Barbican option
Barbican_crypto_plugin: "simple_crypto"; optional [simple_crypto, p11_crypto]
Barbican_library_path: "/ usr/lib/libCryptoki2_64.so"
Barbican option
Panko_database_type: "mysql"; optional [mongodb, mysql]
Gnocchi option
Gnocchi_backend_storage: "{{'ceph' if enable_ceph | bool else' file'}}"; optional: [file, ceph]
Cinder-Block Storage option
# cinder_backend_ceph: "{{enable_ceph}}"
Cinder_volume_group: "cinder-volumes"
# cinder_backup_driver: "nfs"
# cinder_backup_share: ""
# cinder_backup_mount_options_nfs: ""
Designate option
Designate_backend: "bind9"
Designate_ns_record: "sample.openstack.org"
Nova-Compute option
# nova_backend_ceph: "{{enable_ceph}}"
Horizon-Dashboard option
# horizon_backend_database: "{{enable_murano | bool}}"
Manila-Shared File System option
# HNAS backend configuration
# hnas_ip:
# hnas_user:
# hnas_password:
# hnas_evs_id:
# hnas_evs_ip:
# hnas_file_system_name:
Swift-Object Storage option
Swift wants to be able to use block devices for storage. Two types of storage are supported: 1-storage devices with special partition names and file system labels, and 2-unpartitioned disks with file systems. The label of the file system is used to detect the disks that Swift will use.
# swift_devices_match_mode: "strict"; optional: [prefix, strict]
# swift_devices_name: "KOLLA_SWIFT_DATA"; this parameter defines the matching pattern: if the "strict" mode is selected, the name of the special swift partition should be specified for the swift_devices_match_mode,swift_device_name, for example: "KOLLA_SWIFT_DATA". If the "prefix" mode is selected, the swift_devices_name should specify the label of the matching pattern to the file system for quick preparation.
Tempest option (openstack integration test suite)
Tempest_image_id:
Tempest_flavor_ref_id:
Tempest_public_network_id:
Tempest_floating_network_name:
# tempest_image_alt_id: "{{tempest_image_id}}"
# tempest_flavor_ref_alt_id: "{{tempest_flavor_ref_id}}"
The above is a sample analysis of kolla-ansible deployment. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.