-
Notifications
You must be signed in to change notification settings - Fork 0
/
worker_spark.yml
34 lines (33 loc) · 1.02 KB
/
worker_spark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- hosts: artemis:ares:maia
gather_facts: no
become: yes
vars:
weave_env:
DOCKER_HOST: unix:///var/run/weave/weave.sock
tasks:
- file: path=/srv/spark/tmp recurse=yes state=directory mode=0755
- firewalld: port=8081/tcp permanent=true state=enabled
- name: erase worker
environment: "{{weave_env}}"
docker:
name: spark_{{ inventory_hostname }}
image: registry.o-labs.ru/spark_worker
state: absent
- name: start spark worker
environment: "{{weave_env}}"
docker:
name: spark_{{ inventory_hostname }}
image: registry.o-labs.ru/spark_worker
state: started
pull: always
volumes:
- "/srv/spark/tmp:/tmp"
ports:
- "8081:8081"
restart_policy: always
restart_policy_retry: 5
cpu_set: 11-31
memory_limit: 61440MB
- name: resolver
shell: docker exec spark_{{ inventory_hostname }} bash -c "echo 'nameserver 8.8.8.8' >> /etc/resolv.conf"