Skip to content

Instantly share code, notes, and snippets.

@thefotios
Created June 14, 2016 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thefotios/91e5172f60553a417981d8c24354534a to your computer and use it in GitHub Desktop.
Save thefotios/91e5172f60553a417981d8c24354534a to your computer and use it in GitHub Desktop.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"PublicSubnet": {
"Description": "Subnet ID for use by all public agent nodes",
"MaxLength": "18",
"ConstraintDescription": "must be a valid CIDR.",
"Default": "0.0.0.0/0",
"AllowedPattern": "^([0-9]+\\.){3}[0-9]+\\/[0-9]+$",
"MinLength": "9",
"Type": "String"
},
"PrivateAgentInstanceCount": {
"Description": "Specify the number of private agent nodes or accept the default.",
"Default": "5",
"Type": "Number"
},
"PrivateSubnet": {
"Description": "Subnet ID for use by all private agent nodes",
"MaxLength": "18",
"ConstraintDescription": "must be a valid CIDR.",
"Default": "0.0.0.0/0",
"AllowedPattern": "^([0-9]+\\.){3}[0-9]+\\/[0-9]+$",
"MinLength": "9",
"Type": "String"
},
"MasterInstanceType": {
"Description": "Region-specific instance type. E.g. m3.xlarge",
"Default": "m3.xlarge",
"Type": "String"
},
"PublicAgentInstanceType": {
"Description": "Region-specific instance type. E.g. m3.xlarge",
"Default": "m3.xlarge",
"Type": "String"
},
"PublicAgentInstanceCount": {
"Description": "Specify the number of public agent nodes or accept the default.",
"Default": "5",
"Type": "Number"
},
"KeyName": {
"Description": "Specify your AWS EC2 Key Pair.",
"Type": "AWS::EC2::KeyPair::KeyName"
},
"PrivateAgentInstanceType": {
"Description": "Region-specific instance type. E.g. m3.xlarge",
"Default": "m3.xlarge",
"Type": "String"
},
"Vpc": {
"Description": "Existing VPC to use. Nodes will be launched using subnets and Internet Gateway under this VPC",
"Type": "AWS::EC2::VPC::Id"
},
"InternetGateway": {
"Description": "Internet Gateway ID, must be attached to the 'Vpc'. Used by all nodes for outgoing Internet access.",
"Type": "String"
}
},
"Resources": {
"PublicSubnetInstance": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": { "Ref": "PublicSubnet" },
"VpcId": { "Ref": "Vpc" }
}
},
"PrivateSubnetInstance": {
"Type": "AWS::EC2::Subnet",
"Properties": {
"CidrBlock": { "Ref": "PrivateSubnet" },
"VpcId": { "Ref": "Vpc" }
}
},
"DCOS": {
"Type": "AWS::CloudFormation::Stack",
"Properties": {
"TemplateURL": "https://s3-us-west-2.amazonaws.com/downloads.dcos.io/dcos/EarlyAccess/cloudformation/zen-3.json",
"Parameters" : {
"PublicSubnet": {
"Ref": "PublicSubnetInstance"
},
"PrivateSubnet": {
"Ref": "PrivateSubnetInstance"
},
"PrivateAgentInstanceCount": { "Ref": "PrivateAgentInstanceCount" },
"MasterInstanceType": { "Ref": "MasterInstanceType" },
"PublicAgentInstanceType": { "Ref": "PublicAgentInstanceType" },
"PublicAgentInstanceCount": { "Ref": "PublicAgentInstanceCount" },
"KeyName": { "Ref": "KeyName" },
"PrivateAgentInstanceType": { "Ref": "PrivateAgentInstanceType" },
"Vpc": { "Ref": "Vpc" },
"InternetGateway": { "Ref": "InternetGateway" }
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment