-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yaml
203 lines (192 loc) · 4.41 KB
/
docker-compose.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
services:
# Autoconfigure SSH Keys and Default configuration files for users
ssh-keys-and-config:
image: spurin/ssh-client
deploy:
restart_policy:
max_attempts: 0
volumes:
- config:/config
command: |
bash -c 'rm -rf /config/*; echo ansible > /config/guest_name; echo password > /config/guest_passwd; echo "/bin/bash" > /config/guest_shell; echo password > /config/root_passwd'
ubuntu-c:
hostname: ubuntu-c
container_name: ubuntu-c
volumes:
- config:/config
- shared:/shared
- ansible_home_ubuntu-c:/home/ansible
- root_home_ubuntu-c:/root
image: spurin/diveintoansible:ansible
ports:
- 2221:22
- 7681:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
ubuntu1:
hostname: ubuntu1
container_name: ubuntu1
volumes:
- config:/config
- shared:/shared
- ansible_home_ubuntu1:/home/ansible
- root_home_ubuntu1:/root
image: spurin/diveintoansible:ubuntu
ports:
- 2222:22
- 7682:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
ubuntu2:
hostname: ubuntu2
container_name: ubuntu2
volumes:
- config:/config
- shared:/shared
- ansible_home_ubuntu2:/home/ansible
- root_home_ubuntu2:/root
image: spurin/diveintoansible:ubuntu
ports:
- 2223:22
- 7683:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
ubuntu3:
hostname: ubuntu3
container_name: ubuntu3
volumes:
- config:/config
- shared:/shared
- ansible_home_ubuntu3:/home/ansible
- root_home_ubuntu3:/root
image: spurin/diveintoansible:ubuntu
ports:
- 2224:22
- 7684:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
centos1:
hostname: centos1
container_name: centos1
volumes:
- config:/config
- shared:/shared
- ansible_home_centos1:/home/ansible
- root_home_centos1:/root
image: spurin/diveintoansible:centos_stream
ports:
- 2225:22
- 7685:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
centos2:
hostname: centos2
container_name: centos2
volumes:
- config:/config
- shared:/shared
- ansible_home_centos2:/home/ansible
- root_home_centos2:/root
image: spurin/diveintoansible:centos_stream
ports:
- 2226:22
- 7686:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
centos3:
hostname: centos3
container_name: centos3
volumes:
- config:/config
- shared:/shared
- ansible_home_centos3:/home/ansible
- root_home_centos3:/root
image: spurin/diveintoansible:centos_stream
ports:
- 2227:22
- 7687:7681
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
networks:
- diveinto.io
# Docker in Docker
#
# Usage: on host that wishes to use docker
#
# sudo apt-get update
# sudo apt -y install docker.io
# export DOCKER_HOST=tcp://docker:2375
# docker ps -a
#
docker:
hostname: docker
container_name: docker
image: spurin/diveintoansible:dind
privileged: yes
volumes:
- shared:/shared
networks:
- diveinto.io
portal:
hostname: portal
container_name: portal
image: spurin/diveintoansible:portal
environment:
- NGINX_ENTRYPOINT_QUIET_LOGS=1
depends_on:
- centos1
- centos2
- centos3
- ubuntu1
- ubuntu2
- ubuntu3
ports:
- "1000:80"
networks:
- diveinto.io
volumes:
config:
shared:
ansible_home_ubuntu-c:
ansible_home_ubuntu1:
ansible_home_ubuntu2:
ansible_home_ubuntu3:
ansible_home_centos1:
ansible_home_centos2:
ansible_home_centos3:
root_home_ubuntu-c:
root_home_ubuntu1:
root_home_ubuntu2:
root_home_ubuntu3:
root_home_centos1:
root_home_centos2:
root_home_centos3:
networks:
diveinto.io:
name: diveinto.io