|
1 | 1 | { |
2 | 2 | "AWSTemplateFormatVersion" : "2010-09-09", |
3 | | - "Description" : "AWS CloudFormation Sample Template cfncluster.cfn.json: Sample template showing an framework for deploying master + compute type clusters on AWS. **WARNING** This template creates AWS resources. You will be billed for the AWS resources used if you create a stack from this template. Version: ami-201602120030 cfncluster-1.0.0", |
| 3 | + "Description" : "AWS CloudFormation Sample Template cfncluster.cfn.json: Sample template showing an framework for deploying master + compute type clusters on AWS. **WARNING** This template creates AWS resources. You will be billed for the AWS resources used if you create a stack from this template. Version: ami-201602192042 cfncluster-1.1.0", |
4 | 4 | "Parameters" : { |
5 | 5 | "KeyName" : { |
6 | 6 | "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances", |
|
804 | 804 | }, |
805 | 805 | "NONE" |
806 | 806 | ] |
| 807 | + }, |
| 808 | + "CreatePlacementGroup" : { |
| 809 | + "Fn::And" : [ |
| 810 | + { |
| 811 | + "Fn::Equals" : [ |
| 812 | + { |
| 813 | + "Ref" : "PlacementGroup" |
| 814 | + }, |
| 815 | + "DYNAMIC" |
| 816 | + ] |
| 817 | + }, |
| 818 | + { |
| 819 | + "Condition" : "UsePlacementGroup" |
| 820 | + } |
| 821 | + ] |
807 | 822 | } |
808 | 823 | }, |
809 | 824 | "Mappings" : { |
|
983 | 998 | }, |
984 | 999 | "AWSRegionOS2AMI" : { |
985 | 1000 | "eu-west-1" : { |
986 | | - "centos6" : "ami-b9e95aca", |
987 | | - "centos7" : "ami-25d56656", |
988 | | - "alinux" : "ami-88d360fb", |
989 | | - "ubuntu1404" : "ami-c5d261b6" |
| 1001 | + "centos6" : "ami-6aba0719", |
| 1002 | + "centos7" : "ami-b5bb06c6", |
| 1003 | + "alinux" : "ami-0ab70a79", |
| 1004 | + "ubuntu1404" : "ami-1cb70a6f" |
990 | 1005 | }, |
991 | 1006 | "us-west-2" : { |
992 | | - "centos6" : "ami-46ec0c26", |
993 | | - "centos7" : "ami-04f11164", |
994 | | - "alinux" : "ami-31f01051", |
995 | | - "ubuntu1404" : "ami-72f31312" |
| 1007 | + "centos6" : "ami-6c46a50c", |
| 1008 | + "centos7" : "ami-5447a434", |
| 1009 | + "alinux" : "ami-b347a4d3", |
| 1010 | + "ubuntu1404" : "ami-534ba833" |
996 | 1011 | }, |
997 | 1012 | "eu-central-1" : { |
998 | | - "centos6" : "ami-3fc4df53", |
999 | | - "centos7" : "ami-e7fbe08b", |
1000 | | - "alinux" : "ami-79c4df15", |
1001 | | - "ubuntu1404" : "ami-17fbe07b" |
| 1013 | + "centos6" : "ami-e53d2789", |
| 1014 | + "centos7" : "ami-45302a29", |
| 1015 | + "alinux" : "ami-a6302aca", |
| 1016 | + "ubuntu1404" : "ami-a8302ac4" |
1002 | 1017 | }, |
1003 | 1018 | "sa-east-1" : { |
1004 | | - "centos6" : "ami-87890aeb", |
1005 | | - "centos7" : "ami-e48d0e88", |
1006 | | - "alinux" : "ami-af9211c3", |
1007 | | - "ubuntu1404" : "ami-998d0ef5" |
| 1019 | + "centos6" : "ami-192fac75", |
| 1020 | + "centos7" : "ami-162caf7a", |
| 1021 | + "alinux" : "ami-472caf2b", |
| 1022 | + "ubuntu1404" : "ami-1632b17a" |
1008 | 1023 | }, |
1009 | 1024 | "ap-northeast-1" : { |
1010 | | - "centos6" : "ami-37060159", |
1011 | | - "centos7" : "ami-b40304da", |
1012 | | - "alinux" : "ami-5503043b", |
1013 | | - "ubuntu1404" : "ami-ba0106d4" |
| 1025 | + "centos6" : "ami-4540402b", |
| 1026 | + "centos7" : "ami-2c424242", |
| 1027 | + "alinux" : "ami-824646ec", |
| 1028 | + "ubuntu1404" : "ami-5245453c" |
1014 | 1029 | }, |
1015 | 1030 | "us-east-1" : { |
1016 | | - "centos6" : "ami-a22114c8", |
1017 | | - "centos7" : "ami-682e1b02", |
1018 | | - "alinux" : "ami-0b2b1e61", |
1019 | | - "ubuntu1404" : "ami-5114213b" |
| 1031 | + "centos6" : "ami-ac7343c6", |
| 1032 | + "centos7" : "ami-d77343bd", |
| 1033 | + "alinux" : "ami-9c7646f6", |
| 1034 | + "ubuntu1404" : "ami-f3764699" |
1020 | 1035 | }, |
1021 | 1036 | "us-west-1" : { |
1022 | | - "centos6" : "ami-cdd4a2ad", |
1023 | | - "centos7" : "ami-1ad7a17a", |
1024 | | - "alinux" : "ami-3bd6a05b", |
1025 | | - "ubuntu1404" : "ami-3be99f5b" |
| 1037 | + "centos6" : "ami-3f8ffe5f", |
| 1038 | + "centos7" : "ami-128ffe72", |
| 1039 | + "alinux" : "ami-898ffee9", |
| 1040 | + "ubuntu1404" : "ami-bf8effdf" |
1026 | 1041 | }, |
1027 | 1042 | "ap-southeast-2" : { |
1028 | | - "centos6" : "ami-d91e39ba", |
1029 | | - "centos7" : "ami-801c3be3", |
1030 | | - "alinux" : "ami-8a1c3be9", |
1031 | | - "ubuntu1404" : "ami-ab1a3dc8" |
| 1043 | + "centos6" : "ami-d17c5ab2", |
| 1044 | + "centos7" : "ami-b17b5dd2", |
| 1045 | + "alinux" : "ami-cb7d5ba8", |
| 1046 | + "ubuntu1404" : "ami-f97b5d9a" |
1032 | 1047 | }, |
1033 | 1048 | "ap-southeast-1" : { |
1034 | | - "centos6" : "ami-3a2ee059", |
1035 | | - "centos7" : "ami-1b2ae478", |
1036 | | - "alinux" : "ami-b42ee0d7", |
1037 | | - "ubuntu1404" : "ami-832fe1e0" |
| 1049 | + "centos6" : "ami-00ce0763", |
| 1050 | + "centos7" : "ami-4cc0092f", |
| 1051 | + "alinux" : "ami-b0ce07d3", |
| 1052 | + "ubuntu1404" : "ami-cdc20bae" |
1038 | 1053 | }, |
1039 | 1054 | "us-gov-west-1" : { |
1040 | | - "centos6" : "ami-1dc27e7c", |
1041 | | - "centos7" : "ami-3cbe025d", |
1042 | | - "alinux" : "ami-6eb8040f", |
1043 | | - "ubuntu1404" : "ami-a0ba06c1" |
| 1055 | + "centos6" : "NA", |
| 1056 | + "centos7" : "NA", |
| 1057 | + "alinux" : "NA", |
| 1058 | + "ubuntu1404" : "NA" |
1044 | 1059 | }, |
1045 | 1060 | "ap-northeast-2" : { |
1046 | | - "centos6" : "ami-0e1ad460", |
1047 | | - "centos7" : "ami-991fd1f7", |
1048 | | - "alinux" : "ami-591fd137", |
1049 | | - "ubuntu1404" : "ami-581fd136" |
| 1061 | + "centos6" : "ami-bb29e7d5", |
| 1062 | + "centos7" : "ami-df27e9b1", |
| 1063 | + "alinux" : "ami-ec2be582", |
| 1064 | + "ubuntu1404" : "ami-5c2ae432" |
1050 | 1065 | } |
1051 | 1066 | }, |
1052 | 1067 | "OSFeatures" : { |
|
1069 | 1084 | }, |
1070 | 1085 | "CfnClusterVersions" : { |
1071 | 1086 | "default" : { |
1072 | | - "cfncluster" : "cfncluster-1.0.0", |
| 1087 | + "cfncluster" : "cfncluster-1.1.0", |
1073 | 1088 | "cookbook" : "cfncluster-cookbook-1.0.0", |
1074 | 1089 | "chef" : "12.4.3", |
1075 | 1090 | "ridley" : "4.3.2", |
1076 | 1091 | "berkshelf" : "4.0.1", |
1077 | | - "ami" : "201602120030" |
| 1092 | + "ami" : "201602192042" |
1078 | 1093 | } |
1079 | 1094 | }, |
1080 | 1095 | "AWSRegion2Capabilites" : { |
|
1635 | 1650 | "Fn::If" : [ |
1636 | 1651 | "UseClusterPlacement", |
1637 | 1652 | { |
1638 | | - "Ref" : "PlacementGroup" |
| 1653 | + "Fn::If" : [ |
| 1654 | + "CreatePlacementGroup", |
| 1655 | + { |
| 1656 | + "Ref" : "DynamicPlacementGroup" |
| 1657 | + }, |
| 1658 | + { |
| 1659 | + "Ref" : "PlacementGroup" |
| 1660 | + } |
| 1661 | + ] |
1639 | 1662 | }, |
1640 | 1663 | { |
1641 | 1664 | "Ref" : "AWS::NoValue" |
|
1952 | 1975 | "command" : "touch /etc/chef/ohai/hints/ec2.json" |
1953 | 1976 | }, |
1954 | 1977 | "jq" : { |
1955 | | - "command" : "/usr/local/bin/jq --argfile f1 /tmp/dna.json --argfile f2 /tmp/extra.json -n '$f1 + $f2 | .cfncluster = $f1.cfncluster + $f2.cfncluster' > /etc/chef/dna.json || echo \"jq not installed\"; cp /tmp/dna.json /etc/chef/dna.json" |
| 1978 | + "command" : "/usr/local/bin/jq --argfile f1 /tmp/dna.json --argfile f2 /tmp/extra.json -n '$f1 + $f2 | .cfncluster = $f1.cfncluster + $f2.cfncluster' > /etc/chef/dna.json || ( echo \"jq not installed\"; cp /tmp/dna.json /etc/chef/dna.json )" |
1956 | 1979 | } |
1957 | 1980 | } |
1958 | 1981 | }, |
|
2079 | 2102 | "Fn::If" : [ |
2080 | 2103 | "UsePlacementGroup", |
2081 | 2104 | { |
2082 | | - "Ref" : "PlacementGroup" |
| 2105 | + "Fn::If" : [ |
| 2106 | + "CreatePlacementGroup", |
| 2107 | + { |
| 2108 | + "Ref" : "DynamicPlacementGroup" |
| 2109 | + }, |
| 2110 | + { |
| 2111 | + "Ref" : "PlacementGroup" |
| 2112 | + } |
| 2113 | + ] |
2083 | 2114 | }, |
2084 | 2115 | { |
2085 | 2116 | "Ref" : "AWS::NoValue" |
|
2613 | 2644 | "command" : "touch /etc/chef/ohai/hints/ec2.json" |
2614 | 2645 | }, |
2615 | 2646 | "jq" : { |
2616 | | - "command" : "/usr/local/bin/jq --argfile f1 /tmp/dna.json --argfile f2 /tmp/extra.json -n '$f1 + $f2 | .cfncluster = $f1.cfncluster + $f2.cfncluster' > /etc/chef/dna.json || echo \"jq not installed\"; cp /tmp/dna.json /etc/chef/dna.json" |
| 2647 | + "command" : "/usr/local/bin/jq --argfile f1 /tmp/dna.json --argfile f2 /tmp/extra.json -n '$f1 + $f2 | .cfncluster = $f1.cfncluster + $f2.cfncluster' > /etc/chef/dna.json || ( echo \"jq not installed\"; cp /tmp/dna.json /etc/chef/dna.json )" |
2617 | 2648 | } |
2618 | 2649 | } |
2619 | 2650 | }, |
|
3038 | 3069 | } |
3039 | 3070 | }, |
3040 | 3071 | "Condition" : "MasterPublicIp" |
| 3072 | + }, |
| 3073 | + "DynamicPlacementGroup" : { |
| 3074 | + "Type" : "AWS::EC2::PlacementGroup", |
| 3075 | + "Properties" : { |
| 3076 | + "Strategy" : "cluster" |
| 3077 | + }, |
| 3078 | + "Condition" : "CreatePlacementGroup" |
3041 | 3079 | } |
3042 | 3080 | }, |
3043 | 3081 | "Outputs" : { |
|
0 commit comments