-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetDocker-on-Raspberry.yml
78 lines (74 loc) · 2.17 KB
/
setDocker-on-Raspberry.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- hosts: docker_bare_metal
any_errors_fatal: true
become: true
roles:
- { role: basicSetup, password: $6$LLQLgu6cn$GDxCSjtaTf8J4nhl8hemZM3kWjGK5nwwWolDHtr7cTwjs6taE7pk0Uv1u5cG9rfqB.gG5Gn5JNdF5zrmW8YBX1 }
- glusterForDocker
- { role: dockerRaspbian, no_gluster: false }
- docker-swarm
- { role: keepalived, keepalived_daemon_checked: "docker-proxy"}
tasks:
- name: create directory for portainer
file:
path: /mnt/cluster/portainer
state: directory
mode: '0755'
run_once: true
- name: Create portainer stack
docker_stack:
state: present
name: Webmanager
compose:
- version: '3.2'
services:
webmanager:
image: "portainer/portainer-ce"
ports:
- target: 9000
published: 9000
deploy:
placement:
constraints:
- node.role == manager
volumes:
- source: /var/run/docker.sock
target: /var/run/docker.sock
type: bind
- source: /mnt/cluster/portainer
target: /data
type: bind
run_once: true
- name: create directory for async
file:
path: /mnt/async/
state: directory
mode: '0755'
- name: create network for async
docker_network:
name: network-async
driver: overlay
run_once: true
- name: deploy async service
docker_swarm_service:
name: asyncer
image: fabrizio2210/docker_volume_synchronizer
networks:
- network-async
mounts:
- source: /var/run/docker.sock
target: /var/run/docker.sock
type: bind
- source: /mnt/async/
target: /opt/data
type: bind
mode: global
update_config:
parallelism: 0
command: wrapper.sh
args:
- "-k"
- "y7laMv1RAIJOWft3nRKmHnBYCptjEmNKQ8OrpaltFC1fLneJjmLwe96VEaOla5en"
- "-d"
- "/opt/data/"
run_once: true