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: master
blazar_upper_constraints_url: "{{ requirements_git_url | default('https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=' ~ requirements_git_install_branch | default('master')) }}"

# Enable/Disable Ceilometer
blazar_ceilometer_enabled: False

blazar_pip_install_args: "{{ pip_install_options | default('') }}"

blazar_venv_tag: "{{ venv_tag | default('untagged') }}"
blazar_bin: "/openstack/venvs/blazar-{{ blazar_venv_tag }}/bin"

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 constraints
blazar_git_constraints:
  - "git+{{ blazar_git_repo }}@{{ blazar_git_install_branch }}#egg=blazar"
  - "--constraint {{ blazar_upper_constraints_url }}"

## 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: "{{ openstack_service_bind_address | default('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

---
- name: Install blazar server
  hosts: blazar_all
  user: root
  roles:
    - { role: "os_blazar", tags: [ "os-blazar" ] }

Tags

  • blazar-install

  • blazar-config