|
44 | 44 | "Default" : "3",
|
45 | 45 | "AllowedValues" : ["1", "3", "5"],
|
46 | 46 | "Description" : "Number of Swarm manager nodes (1, 3, 5)"
|
| 47 | + }, |
| 48 | + "EnableSystemPrune" : { |
| 49 | + "Type" : "String", |
| 50 | + "Default" : "no", |
| 51 | + "AllowedValues" : ["no", "yes"], |
| 52 | + "Description" : "Cleans up unused images, containers, networks and volumes" |
47 | 53 | }
|
| 54 | + |
48 | 55 | },
|
49 | 56 | "Metadata" : {
|
50 | 57 | "AWS::CloudFormation::Interface" : {
|
|
55 | 62 | },
|
56 | 63 | {
|
57 | 64 | "Label" : { "default":"Swarm Properties" },
|
58 |
| - "Parameters" : [ "ManagerInstanceType", "InstanceType", "KeyName" ] |
| 65 | + "Parameters" : [ "ManagerInstanceType", "InstanceType", "KeyName", "EnableSystemPrune" ] |
59 | 66 | }
|
60 | 67 | ],
|
61 | 68 | "ParameterLabels" : {
|
62 | 69 | "ManagerSize" : { "default" : "Number of Swarm managers?" },
|
63 | 70 | "ClusterSize" : { "default" : "Number of Swarm worker nodes?" },
|
64 | 71 | "InstanceType" : { "default" : "Agent worker instance type?" },
|
65 | 72 | "ManagerInstanceType" : { "default" : "Swarm manager instance type?" },
|
66 |
| - "KeyName" : { "default" : "Which SSH key to use?" } |
| 73 | + "KeyName" : { "default" : "Which SSH key to use?" }, |
| 74 | + "EnableSystemPrune": {"default" : "Enable daily resource cleanup?"} |
67 | 75 | }
|
68 | 76 | }
|
69 | 77 | },
|
|
602 | 610 | "-e ACCOUNT_ID='",{ "Ref" : "AWS::AccountId" }, "' ",
|
603 | 611 | "-e SWARM_QUEUE='",{ "Ref" : "SwarmSQS" }, "' ",
|
604 | 612 | "-e CLEANUP_QUEUE='",{ "Ref" : "SwarmSQSCleanup" }, "' ",
|
| 613 | + "-e RUN_VACUUM='",{ "Ref" : "EnableSystemPrune" }, "' ", |
605 | 614 | "-e DOCKER_FOR_IAAS_VERSION=$DOCKER_FOR_IAAS_VERSION ",
|
606 | 615 | "-v /var/run/docker.sock:/var/run/docker.sock ",
|
607 | 616 | "-v /usr/bin/docker:/usr/bin/docker ",
|
|
739 | 748 | "-e ACCOUNT_ID='",{ "Ref" : "AWS::AccountId" }, "' ",
|
740 | 749 | "-e SWARM_QUEUE='",{ "Ref" : "SwarmSQS" }, "' ",
|
741 | 750 | "-e CLEANUP_QUEUE='",{ "Ref" : "SwarmSQSCleanup" }, "' ",
|
| 751 | + "-e RUN_VACUUM='",{ "Ref" : "EnableSystemPrune" }, "' ", |
742 | 752 | "-e DOCKER_FOR_IAAS_VERSION=$DOCKER_FOR_IAAS_VERSION ",
|
743 | 753 | "-v /var/run/docker.sock:/var/run/docker.sock ",
|
744 | 754 | "-v /usr/bin/docker:/usr/bin/docker ",
|
|
0 commit comments