-
Notifications
You must be signed in to change notification settings - Fork 0
/
cluster.yml
99 lines (91 loc) · 3.15 KB
/
cluster.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
- name: Create HWX Cluster
hosts: localhost
connection: local
vars:
container_cluster_network_name: "example.com"
container_cluster_docker_image: "docker.io/centos/systemd"
tasks:
- name: Create Docker Network
docker_network:
name: "{{ container_cluster_network_name }}"
- name: Create DB Container
docker_container:
name: db
image: mysql:5.7
hostname: db.{{ container_cluster_network_name }}
network_mode: bridge
networks:
- name: "{{ container_cluster_network_name }}"
purge_networks: True
env:
MYSQL_ROOT_PASSWORD: redhat
MYSQL_DATABASE: ambari
MYSQL_USER: ambari
MYSQL_PASSWORD: ambari
- name: Create Ambari Server Container
docker_container:
name: ambari
image: ambari-server:2.7.10
hostname: ambari.{{ container_cluster_network_name }}
privileged: true
published_ports:
- 8080
network_mode: bridge
networks:
- name: "{{ container_cluster_network_name }}"
purge_networks: True
volumes:
- ./docker/ambari-server/vols/systemd-env.conf:/etc/ambari-server/conf/systemd/env.conf
- name: Create Master Container
docker_container:
name: msr-{{ item }}
image: ambari-agent:2.7.10
hostname: msr-{{ item }}.{{ container_cluster_network_name }}
network_mode: bridge
privileged: true
networks:
- name: "{{ container_cluster_network_name }}"
purge_networks: true
volumes:
- ./docker/ambari-agent/vols/systemd-env.conf:/etc/ambari-agent/conf/systemd/env.conf
with_sequence: count=3
- name: Create Data Container
docker_container:
name: dat-{{ item }}
image: ambari-agent:2.7.10
hostname: dat-{{ item }}.{{ container_cluster_network_name }}
network_mode: bridge
privileged: true
networks:
- name: "{{ container_cluster_network_name }}"
purge_networks: true
volumes:
- ./docker/ambari-agent/vols/systemd-env.conf:/etc/ambari-agent/conf/systemd/env.conf
with_sequence: count=3
- name: Create Kafka Container
docker_container:
name: kaf-{{ item }}
image: ambari-agent:2.7.10
hostname: kaf-{{ item }}.{{ container_cluster_network_name }}
network_mode: bridge
privileged: true
networks:
- name: "{{ container_cluster_network_name }}"
purge_networks: true
volumes:
- ./docker/ambari-agent/vols/systemd-env.conf:/etc/ambari-agent/conf/systemd/env.conf
with_sequence: count=2
- name: Create Storm Container
docker_container:
name: stm-{{ item }}
image: ambari-agent:2.7.10
hostname: stm-{{ item }}.{{ container_cluster_network_name }}
network_mode: bridge
privileged: true
networks:
- name: "{{ container_cluster_network_name }}"
purge_networks: true
volumes:
- ./docker/ambari-agent/vols/systemd-env.conf:/etc/ambari-agent/conf/systemd/env.conf
with_sequence: count=2