Skip to content

Commit d9faecd

Browse files
authored
Merge pull request docker-archive#469 from docker/aws-disk-size
Added ability to pick the size and type of the EBS volume for manager…
2 parents a5a0e06 + 34d463a commit d9faecd

File tree

1 file changed

+55
-3
lines changed

1 file changed

+55
-3
lines changed

aws/cloudformation/docker_for_aws.json

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,19 @@
3939
"MaxValue" : "1000",
4040
"Description" : "Number of worker nodes in the Swarm (1-1000)."
4141
},
42+
"WorkerDiskSize" : {
43+
"Type" : "Number",
44+
"Default" : "20",
45+
"MinValue" : "20",
46+
"MaxValue" : "1024",
47+
"Description" : "Size of Workers's ephemeral storage volume in GiB"
48+
},
49+
"WorkerDiskType" : {
50+
"Type" : "String",
51+
"Default" : "standard",
52+
"AllowedValues" : ["standard", "gp2"],
53+
"Description" : "Worker ephemeral storage volume type"
54+
},
4255
"ManagerSize" : {
4356
"Type" : "Number",
4457
"Default" : "3",
@@ -50,6 +63,19 @@
5063
"Default" : "no",
5164
"AllowedValues" : ["no", "yes"],
5265
"Description" : "Cleans up unused images, containers, networks and volumes"
66+
},
67+
"ManagerDiskSize" : {
68+
"Type" : "Number",
69+
"Default" : "20",
70+
"MinValue" : "20",
71+
"MaxValue" : "1024",
72+
"Description" : "Size of Manager's ephemeral storage volume in GiB"
73+
},
74+
"ManagerDiskType" : {
75+
"Type" : "String",
76+
"Default" : "standard",
77+
"AllowedValues" : ["standard", "gp2"],
78+
"Description" : "Manager ephemeral storage volume type"
5379
}
5480

5581
},
@@ -61,8 +87,16 @@
6187
"Parameters" : [ "ManagerSize", "ClusterSize" ]
6288
},
6389
{
64-
"Label" : { "default":"Swarm Properties" },
65-
"Parameters" : [ "ManagerInstanceType", "InstanceType", "KeyName", "EnableSystemPrune" ]
90+
"Label" : { "default" : "Swarm Properties" },
91+
"Parameters" : [ "KeyName", "EnableSystemPrune" ]
92+
},
93+
{
94+
"Label" : { "default":"Swarm Manager Properties" },
95+
"Parameters" : [ "ManagerInstanceType", "ManagerDiskSize", "ManagerDiskType" ]
96+
},
97+
{
98+
"Label" : { "default":"Swarm Worker Properties" },
99+
"Parameters" : [ "InstanceType", "WorkerDiskSize", "WorkerDiskType" ]
66100
}
67101
],
68102
"ParameterLabels" : {
@@ -71,7 +105,11 @@
71105
"InstanceType" : { "default" : "Agent worker instance type?" },
72106
"ManagerInstanceType" : { "default" : "Swarm manager instance type?" },
73107
"KeyName" : { "default" : "Which SSH key to use?" },
74-
"EnableSystemPrune": {"default" : "Enable daily resource cleanup?"}
108+
"EnableSystemPrune": {"default" : "Enable daily resource cleanup?"},
109+
"WorkerDiskSize" : { "default" : "Worker ephemeral storage volume size?" },
110+
"WorkerDiskType" : { "default" : "Worker ephemeral storage volume type" },
111+
"ManagerDiskSize" : { "default" : "Manager ephemeral storage volume size?" },
112+
"ManagerDiskType" : { "default" : "Manager ephemeral storage volume type" }
75113
}
76114
}
77115
},
@@ -545,6 +583,13 @@
545583
"Type": "AWS::AutoScaling::LaunchConfiguration",
546584
"Properties": {
547585
"InstanceType": {"Ref" : "ManagerInstanceType"},
586+
"BlockDeviceMappings" : [ {
587+
"DeviceName" : "/dev/xvdb",
588+
"Ebs" : {
589+
"VolumeSize" : { "Ref" : "ManagerDiskSize" },
590+
"VolumeType" : { "Ref" : "ManagerDiskType" }
591+
}
592+
}],
548593
"IamInstanceProfile" : { "Ref" : "ProxyInstanceProfile" },
549594
"KeyName": {
550595
"Ref": "KeyName"
@@ -697,6 +742,13 @@
697742
"Type": "AWS::AutoScaling::LaunchConfiguration",
698743
"Properties": {
699744
"InstanceType": {"Ref" : "InstanceType"},
745+
"BlockDeviceMappings" : [ {
746+
"DeviceName" : "/dev/xvdb",
747+
"Ebs" : {
748+
"VolumeSize" : { "Ref" : "WorkerDiskSize" },
749+
"VolumeType" : { "Ref" : "WorkerDiskType" }
750+
}
751+
}],
700752
"IamInstanceProfile" : { "Ref" : "ProxyInstanceProfile" },
701753
"KeyName": {
702754
"Ref": "KeyName"

0 commit comments

Comments
 (0)