monasca-vagrant/mini-mon.yml
Joe Keen 4a7d0fc4c4 Locking pip to a version that works
Change-Id: Id8b6b09b84799b76ec7cb736b740768c176ed78e
2016-01-20 22:32:34 -07:00

85 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 version=7.1.2
- 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: smoke.yml