OpenStack-Ansible Watcher

OpenStack-Ansible Watcher

This Ansible role installs Watcher.

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

Default variables

## Verbosity Options
debug: False

# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
watcher_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"

# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
watcher_package_state: "latest"
watcher_pip_package_state: "latest"

## Toggle developer mode
watcher_developer_mode: false

## The git source/branch
watcher_git_repo: https://git.openstack.org/openstack/watcher
watcher_git_install_branch: 'stable/rocky'

## The packages to build from source (used in developer mode)
watcher_developer_constraints:
  - "git+{{ watcher_git_repo }}@{{ watcher_git_install_branch }}#egg=watcher"

# Name of the virtual env to deploy into
watcher_venv_tag: untagged
watcher_bin: "/openstack/venvs/watcher-{{ watcher_venv_tag }}/bin"

# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
watcher_venv_download: "{{ not watcher_developer_mode | bool }}"
# URL of the pre-built virtualenv
watcher_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/watcher.tgz

## System info
watcher_system_user_name: watcher
watcher_system_group_name: watcher
watcher_system_shell: /bin/false
watcher_system_comment: watcher system user
watcher_system_user_home: "/var/lib/{{ watcher_system_user_name }}"

## DB
watcher_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}"
watcher_galera_address: "{{ galera_address | default('127.0.0.1') }}"
watcher_galera_user: watcher
watcher_galera_database: watcher

## Oslo Messaging info

# RPC
watcher_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
watcher_oslomsg_rpc_setup_host: "{{ (watcher_oslomsg_rpc_host_group in groups) | ternary(groups[watcher_oslomsg_rpc_host_group][0], 'localhost') }}"
watcher_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
watcher_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}"
watcher_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
watcher_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
watcher_oslomsg_rpc_userid: watcher
watcher_oslomsg_rpc_vhost: /watcher

# Notify
watcher_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
watcher_oslomsg_notify_setup_host: "{{ (watcher_oslomsg_notify_host_group in groups) | ternary(groups[watcher_oslomsg_notify_host_group][0], 'localhost') }}"
watcher_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
watcher_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
watcher_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
watcher_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
watcher_oslomsg_notify_userid: "{{ watcher_oslomsg_rpc_userid }}"
watcher_oslomsg_notify_password: "{{ watcher_oslomsg_rpc_password }}"
watcher_oslomsg_notify_vhost: "{{ watcher_oslomsg_rpc_vhost }}"

watcher_api_program_name: watcher-api
watcher_decision_engine_program_name: watcher-decision-engine
watcher_applier_program_name: watcher-applier

## Service Type and Data
watcher_service_region: RegionOne
watcher_service_name: watcher
watcher_service_port: 9322
watcher_service_proto: http
watcher_service_type: infra-optim
watcher_service_description: "Watcher Service"
watcher_service_user_name: watcher
watcher_service_tenant_name: service
watcher_service_project_name: service
watcher_service_project_domain_id: default
watcher_service_user_domain_id: default
watcher_service_publicuri: "{{ watcher_service_proto }}://{{ external_lb_vip_address }}:{{ watcher_service_port }}"
watcher_service_publicurl: "{{ watcher_service_publicuri }}"
watcher_service_internaluri: "{{ watcher_service_proto }}://{{ internal_lb_vip_address }}:{{ watcher_service_port }}"
watcher_service_internalurl: "{{ watcher_service_internaluri }}"
watcher_service_adminuri: "{{ watcher_service_proto }}://{{ internal_lb_vip_address }}:{{ watcher_service_port }}"
watcher_service_adminurl: "{{ watcher_service_adminuri }}"
watcher_service_in_ldap: false

## Keystone authentication middleware
watcher_keystone_auth_plugin: password

# Common pip packages
watcher_pip_packages:
  - cryptography
  - osprofiler
  - python-watcherclient
  - PyMySQL
  - python-memcached
  - watcher

## (Qdrouterd) integration
# TODO(ansmith): Change structure when more backends will be supported
watcher_oslomsg_amqp1_enabled: "{{ watcher_oslomsg_rpc_transport == 'amqp' }}"

watcher_optional_oslomsg_amqp1_pip_packages:
  - oslo.messaging[amqp1]

# watcher services info
watcher_role_name: admin

## Service Names
watcher_service_names:
  - "watcher-api"
  - "watcher-decision-engine"
  - "watcher-applier"

watcher_required_secrets:
  - watcher_galera_password
  - watcher_oslomsg_rpc_password
  - watcher_oslomsg_notify_password
  - watcher_service_password

# 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.
watcher_role_project_group: watcher_all

## Tunable overrides
watcher_policy_overrides: {}
watcher_conf_overrides: {}

watcher_api_init_config_overrides: {}
watcher_decision_init_config_overrides: {}
watcher_applier_init_config_overrides: {}

Dependencies

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

Example playbook

- name: Install Watcher
   hosts: all
   user: root
   roles:
     - role: "openstack-ansible-os_watcher"
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.