Blazar role for OpenStack-Ansible

Blazar role for OpenStack-Ansible

tags:openstack, blazar, cloud, ansible
category:*nix

To clone or view the source code for this repository, visit the role repository for os_blazar.

Default variables

# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
blazar_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
blazar_service_setup_host_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default((blazar_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable'])) }}"

blazar_package_state: latest
blazar_pip_package_state: latest

blazar_git_repo: https://git.openstack.org/openstack/blazar
blazar_git_install_branch: stable/rocky
blazar_developer_mode: false

blazar_venv_tag: untagged
blazar_bin: "/openstack/venvs/blazar-{{ blazar_venv_tag }}/bin"

# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
blazar_venv_download: "{{ not blazar_developer_mode | bool }}"
blazar_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/blazar.tgz
blazar_etc_dir: /etc/blazar
blazar_config_option: "--config-file {{ blazar_etc_dir }}/blazar.conf"

## Common PIP requirements
blazar_pip_packages:
  - blazar
  - blazar-nova
  - osprofiler
  - pymysql
  - python-blazarclient
  - systemd-python

## blazar developer constraint
blazar_developer_constraints:
  - "git+{{ blazar_git_repo }}@{{ blazar_git_install_branch }}#egg=blazar"

## System info
blazar_system_user_name: blazar
blazar_system_group_name: blazar
blazar_system_shell: /bin/false
blazar_system_comment: blazar system user
blazar_system_user_home: "/var/lib/{{ blazar_system_user_name }}"

## Database credentials
blazar_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}"
blazar_galera_address: "{{ galera_address | default('127.0.0.1') }}"
blazar_galera_database: blazar
blazar_galera_user: blazar
blazar_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
blazar_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('/etc/ssl/certs/galera-ca.pem') }}"

## Service Type and Data
blazar_service_name: blazar
blazar_service_region: RegionOne
blazar_service_proto: http
blazar_service_type: policy
blazar_service_description: "blazar service"
blazar_service_publicuri: "{{ blazar_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ blazar_service_port }}"
blazar_service_publicurl: "{{ blazar_service_publicuri }}"
blazar_service_internaluri: "{{ blazar_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ blazar_service_port }}"
blazar_service_internalurl: "{{ blazar_service_internaluri }}"
blazar_service_adminuri: "{{ blazar_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ blazar_service_port }}"
blazar_service_adminurl: "{{ blazar_service_adminuri }}"
blazar_service_registry_proto: "{{ blazar_service_proto }}"
blazar_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(blazar_service_proto) }}"
blazar_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(blazar_service_proto) }}"
blazar_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(blazar_service_proto) }}"

#NOTE:  move password to tests/test-vars.yml
blazar_service_password: password

## Service name
blazar_services:
  blazar-api:
    group: blazar_all
    service_name: blazar-api
    execstarts: "{{ blazar_bin }}/blazar-api {{ blazar_config_option }}"
    init_config_overrides: "{{ blazar_api_init_config_overrides }}"
    start_order: 1
  blazar-manager:
    group: blazar_all
    service_name: blazar-manager
    execstarts: "{{ blazar_bin }}/blazar-manager {{ blazar_config_option }}"
    init_config_overrides: "{{ blazar_manager_init_config_overrides }}"
    start_order: 2

## Keystone
blazar_service_project_domain_id: default
blazar_service_project_name: service
blazar_service_user_domain_id: default
blazar_service_user_name: blazar
blazar_keystone_auth_plugin: password

blazar_service_in_ldap: false

## Oslo Messaging
blazar_messaging_enabled: true

# RPC
blazar_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
blazar_oslomsg_rpc_setup_host: "{{ (blazar_oslomsg_rpc_host_group in groups) | ternary(groups[blazar_oslomsg_rpc_host_group][0], 'localhost') }}"
blazar_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
blazar_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}"
blazar_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
blazar_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
blazar_oslomsg_rpc_userid: blazar
blazar_oslomsg_rpc_vhost: /blazar

# Notify
blazar_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
blazar_oslomsg_notify_setup_host: "{{ (blazar_oslomsg_notify_host_group in groups) | ternary(groups[blazar_oslomsg_notify_host_group][0], 'localhost') }}"
blazar_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
blazar_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
blazar_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
blazar_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
blazar_oslomsg_notify_userid: "{{ blazar_oslomsg_rpc_userid }}"
blazar_oslomsg_notify_vhost: "{{ blazar_oslomsg_rpc_vhost }}"
blazar_oslomsg_notify_password: "{{ blazar_oslomsg_rpc_password }}"

blazar_role_name: admin
blazar_bind_address: 0.0.0.0
blazar_service_port: 1234
blazar_program_name: blazar-server

## Tunable overrides
blazar_blazar_api_paste_ini_overrides: {}
blazar_blazar_conf_overrides: {}
blazar_api_init_config_overrides: {}
blazar_manager_init_config_overrides: {}

# This variable is used by the repo_build process to determine
# which host group to check for members of before building the
# pip packages required by this role. The value is picked up
# by the py_pkgs lookup.
blazar_role_project_group: blazar_all

Dependencies

This role needs pip >= 7.1 installed on the target host.

Example playbook

Tags

  • blazar-install
  • blazar-config
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.