-
Notifications
You must be signed in to change notification settings - Fork 9
/
mesos_cluster.yaml
173 lines (151 loc) · 4.71 KB
/
mesos_cluster.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
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- indigo_custom_types: https://raw.githubusercontent.com/indigo-dc/tosca-types/master/custom_types.yaml
description: Deploy a Mesos Cluster (with Marathon and Chronos frameworks) on top of Virtual machines
metadata:
display_name: Deploy a Mesos cluster
icon: https://indigo-paas.cloud.ba.infn.it/public/images/apache-mesos-icon.png
topology_template:
inputs:
mesos_password:
type: string
description: Admin password for accessing Mesos HTTP service
required: yes
marathon_password:
type: string
description: Admin password for accessing Marathon HTTP service
required: yes
chronos_password:
type: string
description: Admin password for accessing Chronos HTTP service
required: yes
slave_num:
type: integer
description: Number of slave nodes in the cluster
default: 2
required: yes
slave_cpus:
type: integer
description: Numer of CPUs for the slave node
default: 1
required: yes
slave_mem:
type: scalar-unit.size
description: Amount of Memory for the slave node
default: 2 GB
required: yes
master_cpus:
type: integer
description: Numer of CPUs for the master node
default: 2
required: yes
master_mem:
type: scalar-unit.size
description: Amount of Memory for the master node
default: 4 GB
required: yes
node_templates:
mesos_master:
type: tosca.nodes.indigo.MesosMaster
properties:
mesos_masters_list: { get_attribute: [ HOST, private_address ] }
mesos_password: { get_input: mesos_password }
marathon_password: { get_input: marathon_password }
chronos_password: { get_input: chronos_password }
requirements:
- host: mesos_master_server
mesos_slave:
type: tosca.nodes.indigo.MesosSlave
properties:
master_ips: { get_attribute: [ mesos_master_server, private_address ] }
front_end_ip: { get_attribute: [ mesos_master_server, private_address, 0 ] }
requirements:
- host: mesos_slave_server
capabilities:
wn:
properties:
default_instances: 1
mesos_load_balancer:
type: tosca.nodes.indigo.MesosLoadBalancer
properties:
master_ips: { get_attribute: [ mesos_master_server, private_address ] }
marathon_password: { get_input: marathon_password }
requirements:
- host: mesos_lb_server
mesos_master_server:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
dns_name: mesosserverpublic
network_name: PUBLIC
ports:
mesos_port:
protocol: tcp
source: 5050
marathon_port:
protocol: tcp
source: 8443
chronos_port:
protocol: tcp
source: 4443
scalable:
properties:
count: 1
host:
properties:
num_cpus: 2
mem_size: 2 GB
os:
properties:
type: linux
distribution: ubuntu
version: 16.04
mesos_slave_server:
type: tosca.nodes.indigo.Compute
capabilities:
scalable:
properties:
count: { get_input: slave_num }
host:
properties:
num_cpus: { get_input: slave_cpus }
mem_size: { get_input: slave_mem }
os:
properties:
type: linux
distribution: ubuntu
version: 16.04
mesos_lb_server:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
network_name: PUBLIC
ports:
all_tcp:
protocol: tcp
source_range: [ 1, 65535 ]
scalable:
properties:
count: 1
host:
properties:
num_cpus: 2
mem_size: 2 GB
os:
properties:
type: linux
distribution: ubuntu
version: 16.04
outputs:
mesos_endpoint:
value: { concat: [ 'http://', get_attribute: [ mesos_master_server, public_address, 0 ], ':5050' ] }
marathon_endpoint:
value: { concat: [ 'https://', get_attribute: [ mesos_master_server, public_address, 0 ], ':8443' ] }
chronos_endpoint:
value: { concat: [ 'https://', get_attribute: [ mesos_master_server, public_address, 0 ], ':4443' ] }
mesos_lb_ip:
value: { get_attribute: [ mesos_lb_server, public_address ] }
mesos_master:
value: { get_attribute: [ mesos_master_server, public_address ] }