Sandy Walsh 618cdcdd63 Cell Support
Yagi-workers are now created per cell. One rabbit per cell.
Also renamed the common role to stv3-common to prevent conflicts
with other playbooks.

Take note of ansible/roles/stv3-workers/defaults/main.yaml to
see an example of the expected format of the calling facts file.
Each entry in this list-of-dictionaries represents a rabbit server
and Swift container for that cell.

Also, multiple pipeline_workers are created based on the value
of num_pipeline_workers (defaults to 2). This is so a machine
can better utilize multi-core architectures.

Change-Id: I09c4d364878493546d6e23e019f01f5f4f38c37c
2014-12-22 10:14:37 -08:00

76 lines
2.0 KiB
YAML

## Main task file for common role
---
- name: stv3 group
group: name=stv3 system=yes state=present
- name: stv3 user
user: name=stv3 group=stv3 createhome=no system=yes state=present
- name: stv3 config directory
file: path=/etc/stv3 state=directory owner=stv3 group=stv3
mode=0755
- name: stv3 /var/run directory for pid
file: path=/var/run/stv3 state=directory owner=stv3 group=stv3
mode=0755
- name: stv3 /var/log directory for logfiles
file: path=/var/log/stv3 state=directory owner=stv3 group=stv3
mode=0755
- name: install unzip
apt: name=unzip update_cache=yes
- name: install mysql-client
apt: name=mysql-client update_cache=yes
- name: move tarball
unarchive: src={{tarball_absolute_path}} dest=/opt
owner=stv3 group=stv3
- name: fix source code ownership
file: path=/opt/stv3 owner=stv3 group=stv3 recurse=yes
- name: winchester.yaml
template: src=winchester.yaml.j2 dest=/etc/stv3/winchester.yaml owner=stv3
group=stv3 mode=0644
notify:
- restart yagi-event
- restart pipeline-worker
- name: distiller.conf
copy: src=distiller.conf dest=/etc/stv3/distiller.conf
owner=stv3 group=stv3 mode=0644
notify:
- restart yagi-event
- restart pipeline-worker
- name: pipelines.yaml
copy: src=pipelines.yaml dest=/etc/stv3/pipelines.yaml
owner=stv3 group=stv3 mode=0644
notify:
- restart yagi-event
- restart pipeline-worker
- name: triggers.yaml
copy: src=triggers.yaml dest=/etc/stv3/triggers.yaml
owner=stv3 group=stv3 mode=0644
notify:
- restart yagi-event
- restart pipeline-worker
- name: event_definitions.yaml
copy: src=event_definitions.yaml dest=/etc/stv3/event_definitions.yaml
owner=stv3 group=stv3 mode=0644
notify:
- restart yagi-event
- restart pipeline-worker
- name: logging.conf
template: src=logging.conf.j2 dest=/etc/stv3/logging.conf owner=stv3
group=stv3 mode=0644
notify:
- restart yagi-event
- restart pipeline-worker