b77ac15b69
mysql_host -> database_host mysql_user -> database_user mysql_password -> database_password Please also see the following pull requests: https://github.com/hpcloud-mon/ansible-monasca-thresh/pull/19 https://github.com/hpcloud-mon/ansible-monasca-api/pull/43 https://github.com/hpcloud-mon/ansible-monasca-notification/pull/23 Change-Id: I1d18b8290cceefe339e1b5260804ff241a8a5a98
86 lines
2.6 KiB
YAML
86 lines
2.6 KiB
YAML
- name: Check if database type is set
|
|
hosts: mini-mon
|
|
tasks:
|
|
- name: Check for database_type
|
|
fail: msg="Must set database type when running this playbook. To pass via command line use -e."
|
|
when: database_type is not defined
|
|
|
|
- name: Installs DBs, kafka and other core dependencies.
|
|
hosts: mini-mon
|
|
sudo: yes
|
|
pre_tasks:
|
|
- name: apt-get update
|
|
apt: update_cache=yes
|
|
- name: Install virtualenv
|
|
apt: name=python-virtualenv
|
|
tasks:
|
|
- name: Install postfix, needed by notification engine
|
|
apt: name=postfix state=present
|
|
- name: Install pip from apt
|
|
apt: name=python-pip state=present
|
|
- name: pip upgrade pip
|
|
pip: name=pip state=latest
|
|
- name: Install python-dev
|
|
apt: name=python-dev state=present
|
|
roles:
|
|
- {role: zookeeper, tags: [zookeeper]}
|
|
- {role: kafka, tags: [kafka]}
|
|
- {role: influxdb, when: database_type == 'influxdb', tags: [influxdb]}
|
|
- {role: percona, tags: [mysql, percona]}
|
|
- {role: vertica, when: database_type == 'vertica', tags: [vertica]}
|
|
|
|
- name: Sets up schema and install Monasca apps
|
|
hosts: mini-mon
|
|
sudo: yes
|
|
vars:
|
|
monasca_agent_service: monitoring
|
|
monasca_checks:
|
|
host_alive:
|
|
init_config:
|
|
ssh_port: 22
|
|
ssh_timeout: 0.5
|
|
ping_timeout: 1
|
|
instances:
|
|
- name: devstack
|
|
host_name: devstack
|
|
alive_test: ssh
|
|
pre_tasks:
|
|
- name: Add devstack to hosts file
|
|
lineinfile: dest=/etc/hosts regexp="^{{ devstack }}" line="{{ devstack }} devstack" state=present
|
|
tasks:
|
|
- name: Setup the monasca cli credentials in the default environment
|
|
copy: src=env.sh dest=/etc/profile.d/monasca_cli.sh owner=root group=root mode=0644
|
|
tags:
|
|
- cli
|
|
roles:
|
|
- {role: monasca-schema, tags: [schema]}
|
|
- {role: monasca-api,
|
|
influxdb_user: mon_api,
|
|
influxdb_password: password,
|
|
database_user: monapi,
|
|
database_password: password,
|
|
tags: [api]}
|
|
- {role: monasca-persister,
|
|
influxdb_user: mon_persister,
|
|
influxdb_password: password,
|
|
tags: [persister]}
|
|
- {role: monasca-notification,
|
|
database_user: notification,
|
|
database_password: password,
|
|
tags: [notification]}
|
|
- {role: storm, storm_nimbus_enabled: true, storm_supervisor_enabled: true, tags: [storm]}
|
|
- {role: monasca-thresh,
|
|
database_user: thresh,
|
|
database_password: password,
|
|
tags: [thresh]}
|
|
- {role: monasca-agent, tags: [agent]}
|
|
|
|
- name: Define default alarms
|
|
hosts: mini-mon
|
|
gather_facts: no
|
|
roles:
|
|
- {role: monasca-default-alarms, tags: [alarms]}
|
|
|
|
- include: events.yml
|
|
- include: smoke.yml
|