-
Notifications
You must be signed in to change notification settings - Fork 1
/
provision_cluster.yml
76 lines (64 loc) · 2.06 KB
/
provision_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
---
# EC2 dynamic invetory create different permutations of host collections based on instance properties such as tags.
# See http://codeheaven.io/15-things-you-should-know-about-ansible/ item 12 for more info.
- name: Install/upgrade Python
hosts: tag_python
become: yes
become_method: sudo
gather_facts: false
pre_tasks:
- raw: sudo apt-get -y install python
- name: Install Java on tagged hosts
hosts: tag_java
gather_facts: true
roles:
- java
- name: Install Docker on tagged hosts
hosts: tag_docker
gather_facts: true
roles:
- docker
- name: Install Zookeeper on tagged hosts
hosts: tag_zookeeper
gather_facts: true
roles:
- zookeeper
- name: Install Mesos on tagged hosts
hosts: tag_mesos_master
gather_facts: true
roles:
- { role: mesos, zookeeper_hostnames: "{{ groups.tag_zookeeper | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}" }
- name: Install Mesos slaves on tagged hosts
hosts: tag_mesos_slave
gather_facts: true
roles:
- { role: mesos, mesos_containerizers: "docker,mesos", mesos_install_mode: "slave", zookeeper_hostnames: "{{ groups.tag_zookeeper | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}" }
- name: Install Marathon on tagged hosts
hosts: tag_marathon
gather_facts: true
roles:
- { role: marathon, zookeeper_hostnames: "{{ groups.tag_zookeeper | join(':' + zookeeper_client_port + ',') }}:{{ zookeeper_client_port }}" }
- name: Install K8s on tagged hosts
hosts: tag_k8s
gather_facts: true
vars:
repository: "deb https://apt.dockerproject.org/repo ubuntu-trusty main"
install_apparmor: true
roles:
- docker
- k8s
- name: Install DCOS bootstrap on tagged host
hosts: tag_dcos_bootstrap
gather_facts: true
roles:
- dcos_bootstrap
- name: Install DCOS master, slave and public slaves on tagged hosts
hosts: tag_dcos_cluster_node
gather_facts: true
roles:
- dcos
- name: Install DCOS cli on DCOS controller hosts
hosts: tag_dcos_controller[0]
gather_facts: true
roles:
- dcos_controller