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

39 lines
1.1 KiB
YAML

## Main task file for stv3-workers role
# All the users, groups, directories and code are
# set up by the common role.
---
- name: yagi.conf
template: src=yagi.conf.j2 dest=/etc/stv3/yagi-{{item.cell}}.conf
owner=stv3 group=stv3 mode=0644
with_items: cells
notify:
- restart yagi-event
- name: swift_credentials.conf
template: src=swift_credentials.conf.j2 dest=/etc/stv3/swift_credentials.conf
owner=stv3 group=stv3 mode=0644
notify:
- restart yagi-event
- name: yagi-event-initd
template: src=yagi-event.debian.init.d.j2 dest=/etc/init.d/yagi-event-{{item.cell}}
owner=stv3 group=stv3 mode=0755
with_items: cells
- name: pipeline-worker-initd
template: src=pipeline-worker.debian.init.d.j2
dest=/etc/init.d/pipeline_worker_{{item}}
owner=stv3 group=stv3 mode=0755
with_sequence: count={{num_pipeline_workers}}
- name: yagi-event
debug: msg="Starting yagi-event"
notify:
- restart yagi-event
- name: pipeline-worker
debug: msg="Starting pipeline-worker"
notify:
- restart pipeline-worker