forked from thefactory/cloudformation-mesos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmesos.json
207 lines (193 loc) · 8.2 KB
/
mesos.json
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
204
205
206
207
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Launches a Mesos cluster",
"Parameters" : {
"ClusterId" : {
"Description" : "Mesos cluster ID",
"Type" : "String",
"Default" : "mesos"
},
"KeyName" : {
"Description" : "Existing EC2 KeyPair to be associated with all cluster instances for SSH access. For default AMIs, log in as the 'ubuntu' user.",
"Type" : "String"
},
"Subnets" : {
"Description" : "List of VPC subnet IDs in which to launch the cluster. Must match the passed AvailabilityZones.",
"Type" : "String"
},
"VpcId" : {
"Description" : "VPC associated with the provided subnets",
"Type" : "String"
},
"AvailabilityZones": {
"Description" : "(Optional) If passed, only launch nodes in these AZs (e.g., 'us-east-1a,us-east-1b'). Must match the passed Subnets.",
"Type" : "String",
"Default" : ""
},
"AdminSecurityGroup" : {
"Description" : "Existing security group that should be granted administrative access to Mesos (e.g., 'sg-123456')",
"Type": "String"
},
"ZkClientSecurityGroup" : {
"Description" : "Existing security group that should be used by ZooKeeper clients to access ZooKeeper",
"Type" : "String"
},
"ExhibitorDiscoveryUrl" : {
"Description" : "Exhibitor URL that returns active ZooKeeper nodes ('getCluster') (e.g., http://<exhibitor_node>/exhibitor/v1/cluster/list)",
"Type" : "String"
},
"MasterInstanceType" : {
"Description" : "EC2 instance type",
"Type" : "String",
"Default" : "m1.small",
"AllowedValues" : ["m1.small","m1.medium","m1.large","m1.xlarge","m3.medium","m3.large","m3.xlarge","m3.2xlarge","c1.medium","c1.xlarge","c3.large","c3.xlarge","c3.2xlarge","c3.4xlarge","c3.8xlarge","cc2.8xlarge","m2.xlarge","m2.2xlarge","m2.4xlarge","r3.large","r3.xlarge","r3.2xlarge","r3.4xlarge","r3.8xlarge","cr1.8xlarge","hi1.4xlarge","hs1.8xlarge","i2.xlarge","i2.2xlarge","i2.4xlarge","i2.8xlarge","t1.micro","cg1.4xlarge","g2.2xlarge"],
"ConstraintDescription" : "must be a valid EC2 instance type."
},
"MasterInstanceCount" : {
"Description" : "Number of master nodes to launch",
"Type" : "Number",
"Default" : "1"
},
"MasterQuorumCount" : {
"Description" : "Number of masters needed for Mesos replicated log registry quorum (should be ceiling(<MasterInstanceCount>/2))",
"Type" : "Number",
"Default" : "1"
},
"MasterLogstashConfig" : {
"Description" : "(optional) Config string for Logstash on the Mesos Masters",
"Type" : "String",
"Default" : ""
},
"SlaveInstanceType" : {
"Description" : "EC2 instance type",
"Type" : "String",
"Default" : "m1.small",
"AllowedValues" : ["m1.small","m1.medium","m1.large","m1.xlarge","m3.medium","m3.large","m3.xlarge","m3.2xlarge","c1.medium","c1.xlarge","c3.large","c3.xlarge","c3.2xlarge","c3.4xlarge","c3.8xlarge","cc2.8xlarge","m2.xlarge","m2.2xlarge","m2.4xlarge","r3.large","r3.xlarge","r3.2xlarge","r3.4xlarge","r3.8xlarge","cr1.8xlarge","hi1.4xlarge","hs1.8xlarge","i2.xlarge","i2.2xlarge","i2.4xlarge","i2.8xlarge","t1.micro","cg1.4xlarge","g2.2xlarge"],
"ConstraintDescription" : "must be a valid EC2 instance type."
},
"SlaveInstanceCount" : {
"Description" : "Number of slave nodes to launch",
"Type" : "Number",
"Default" : "1"
},
"SlaveLogstashConfig" : {
"Description" : "(optional) Config string for Logstash on the Mesos Slaves (to read task logs, you can use 'input { file { path => \"/tmp/mesos/slaves/*/frameworks/*/executors/*/runs/latest/stdout\" }')",
"Type" : "String",
"Default" : ""
},
"SlaveResources" : {
"Description" : "(optional) Resources to allocate to Mesos (as passed to --resources). To expose ports 8000-9000, for instance, you can use 'ports(*):[8000-9000, 31000-32000]'",
"Type" : "String",
"Default" : ""
},
"DockerCredentials" : {
"Description" : "JSON string to be saved as .dockercfg",
"Type" : "String",
"Default" : "{}"
},
"MarathonDockerImage" : {
"Description" : "The Marathon Docker image (format: 'registry:port/repository:version')",
"Type" : "String",
"Default" : "thefactory/marathon:0.7.5"
},
"MarathonLoggerDockerImage" : {
"Description" : "The marathon-logger Docker image (format: 'registry:port/repository:version')",
"Type" : "String",
"Default" : "thefactory/marathon-logger:latest"
},
"MarathonLoggerEventStore" : {
"Description" : "The marathon-logger event store connection string",
"Type" : "String",
"Default" : "in-memory://localhost/?max_length=100"
},
"MesosMasterTemplateUrl" : {
"Description" : "URL of the Mesos Master CloudFormation template on S3 (must be \"https://s3.amazonaws.com/<bucket>/<key>\")",
"Type" : "String"
},
"MesosSlaveTemplateUrl" : {
"Description" : "URL of the Mesos Slave CloudFormation template on S3 (must be \"https://s3.amazonaws.com/<bucket>/<key>\")",
"Type" : "String"
}
},
"Mappings" : {
"RegionMap" : {
"us-east-1" : {
"AMI" : "ami-744dff1c"
},
"us-west-1" : {
"AMI" : "ami-efbdb6aa"
},
"us-west-2" : {
"AMI" : "ami-db672aeb"
},
"eu-west-1" : {
"AMI" : "ami-46cd6f31"
},
"ap-southeast-1" : {
"AMI" : "ami-227d5b70"
},
"ap-southeast-2" : {
"AMI" : "ami-0798fa3d"
},
"ap-northeast-1" : {
"AMI" : "ami-c70b3ec6"
},
"sa-east-1" : {
"AMI" : "ami-a15feabc"
}
}
},
"Resources" : {
"MesosMasterStack" : {
"Type" : "AWS::CloudFormation::Stack",
"Properties" : {
"TemplateURL" : { "Ref" : "MesosMasterTemplateUrl" },
"TimeoutInMinutes" : "15",
"Parameters" : {
"InstanceAmi" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI"] },
"InstanceType" : { "Ref" : "MasterInstanceType" },
"KeyName" : { "Ref" : "KeyName" },
"ClusterId" : { "Ref" : "ClusterId" },
"ClusterSize" : { "Ref" : "MasterInstanceCount" },
"QuorumSize" : { "Ref" : "MasterQuorumCount" },
"DockerCredentials" : { "Ref" : "DockerCredentials" },
"LogstashConfig" : { "Ref" : "MasterLogstashConfig" },
"MarathonDockerImage" : { "Ref" : "MarathonDockerImage" },
"MarathonLoggerDockerImage" : { "Ref" : "MarathonLoggerDockerImage" },
"MarathonLoggerEventStore" : { "Ref" : "MarathonLoggerEventStore" },
"ExhibitorDiscoveryUrl" : { "Ref" : "ExhibitorDiscoveryUrl" },
"ZkClientSecurityGroup" : { "Ref" : "ZkClientSecurityGroup" },
"AdminSecurityGroup" : { "Ref" : "AdminSecurityGroup" },
"Subnets" : { "Ref" : "Subnets" },
"VpcId" : { "Ref" : "VpcId" },
"AvailabilityZones" : { "Ref" : "AvailabilityZones" }
}
}
},
"MesosSlaveStack" : {
"Type" : "AWS::CloudFormation::Stack",
"DependsOn" : "MesosMasterStack",
"Properties" : {
"TemplateURL" : { "Ref" : "MesosSlaveTemplateUrl" },
"TimeoutInMinutes" : "15",
"Parameters" : {
"InstanceAmi" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI"] },
"InstanceType" : { "Ref" : "SlaveInstanceType" },
"KeyName" : { "Ref" : "KeyName" },
"ClusterId" : { "Ref" : "ClusterId" },
"ClusterSize" : { "Ref" : "SlaveInstanceCount" },
"DockerCredentials" : { "Ref" : "DockerCredentials" },
"LogstashConfig" : { "Ref" : "SlaveLogstashConfig" },
"MesosResources" : { "Ref" : "SlaveResources" },
"ExhibitorDiscoveryUrl" : { "Ref" : "ExhibitorDiscoveryUrl" },
"ZkClientSecurityGroup" : { "Ref" : "ZkClientSecurityGroup" },
"MesosMasterSecurityGroup" : { "Fn::GetAtt" : [ "MesosMasterStack", "Outputs.MesosMasterSecurityGroup" ] },
"AdminSecurityGroup" : { "Ref" : "AdminSecurityGroup" },
"Subnets" : { "Ref" : "Subnets" },
"VpcId" : { "Ref" : "VpcId" },
"AvailabilityZones" : { "Ref" : "AvailabilityZones" }
}
}
}
}
}