ac517aff96
Change-Id: I112fb89707d2758fd4de649b18db87b30dc20716
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,
|
|
mysql_user: monapi,
|
|
mysql_password: password,
|
|
tags: [api]}
|
|
- {role: monasca-persister,
|
|
influxdb_user: mon_persister,
|
|
influxdb_password: password,
|
|
tags: [persister]}
|
|
- {role: monasca-notification,
|
|
mysql_user: notification,
|
|
mysql_password: password,
|
|
tags: [notification]}
|
|
- {role: storm, storm_nimbus_enabled: true, storm_supervisor_enabled: true, tags: [storm]}
|
|
- {role: monasca-thresh,
|
|
mysql_user: thresh,
|
|
mysql_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
|