Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit 3dbf802

Browse files
authored
Merge pull request #3 from avattathil/develop
GitHub Enterprise + VPC (Single AZ)
2 parents 3fcd3ea + 9ea3ada commit 3dbf802

3 files changed

Lines changed: 615 additions & 190 deletions

File tree

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,323 @@
1+
{
2+
"AWSTemplateFormatVersion": "2010-09-09",
3+
"Description": "GitHub Enterprise with VPC, License: Apache 2.0 (Please do not remove) Jan,17,2016",
4+
"Metadata": {
5+
"AWS::CloudFormation::Interface": {
6+
"ParameterGroups": [{
7+
"Label": {
8+
"default": " VPC Network Configuration"
9+
},
10+
"Parameters": [
11+
"VPCCIDR",
12+
"AccessCIDR"
13+
14+
]
15+
}, {
16+
"Label": {
17+
"default": "GitHubEnterprise License"
18+
},
19+
"Parameters": [
20+
"LicenseLocation",
21+
"GHELicense"
22+
]
23+
}, {
24+
"Label": {
25+
"default": "GitHub Enterprise Organization and Repository"
26+
},
27+
"Parameters": [
28+
"InitialOrganization",
29+
"InitialRepository",
30+
"ConsolePassword"
31+
]
32+
}, {
33+
"Label": {
34+
"default": "Site Admin User Information"
35+
},
36+
"Parameters": [
37+
"AdminUsername",
38+
"AdminUserEmail",
39+
"AdminUserPassword"
40+
]
41+
}, {
42+
"Label": {
43+
"default": "Server Configuration"
44+
},
45+
"Parameters": [
46+
"InstanceType",
47+
"KeyPairName",
48+
"VolumeSize"
49+
]
50+
}, {
51+
"Label": {
52+
"default": "AWS Quick Start Configuration"
53+
},
54+
"Parameters": [
55+
"QSS3BucketName",
56+
"QSS3KeyPrefix"
57+
]
58+
}]
59+
60+
61+
}
62+
},
63+
"Parameters": {
64+
"KeyPairName": {
65+
"Description": "Public/private key pairs allow you to securely connect to your instance after it launches",
66+
"Type": "AWS::EC2::KeyPair::KeyName"
67+
},
68+
"AccessCIDR": {
69+
"AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
70+
"ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x.",
71+
"Description": "The IP address range that can be used to access to the EC2 instance",
72+
"MaxLength": "18",
73+
"MinLength": "9",
74+
"Type": "String"
75+
},
76+
"AdminUserEmail": {
77+
"Description": "Site Admin Email address",
78+
"Type": "String"
79+
},
80+
"AdminUserPassword": {
81+
"AllowedPattern": "(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]*",
82+
"ConstraintDescription": "Passwords must be at least 7 characters long and include at least one number and one upper case letter.",
83+
"Description": "Set the Console password for Github Enterprise (Passwords must be at least 7 characters long and include at least one number and one upper case letter)",
84+
"MinLength": "7",
85+
"NoEcho": "True",
86+
"Type": "String"
87+
},
88+
"AdminUsername": {
89+
"Description": "Set the Site Admin Username",
90+
"Type": "String"
91+
},
92+
"ConsolePassword": {
93+
"AllowedPattern": "(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]*",
94+
"ConstraintDescription": "Passwords must be at least 7 characters long and include at least one number and one upper case letter.",
95+
"Description": "Set the Console password for Github Enterprise (Passwords must be at least 7 characters long and include at least one number and one upper case letter)",
96+
"MinLength": "7",
97+
"NoEcho": "True",
98+
"Type": "String"
99+
},
100+
"InitialOrganization": {
101+
"Description": "The initial organization to hold the GitHub Enterprise repository",
102+
"Type": "String"
103+
},
104+
"InitialRepository": {
105+
"Description": "The initial repository to create",
106+
"Type": "String"
107+
},
108+
"InstanceType": {
109+
"AllowedValues": [
110+
"m3.xlarge",
111+
"m3.2xlarge",
112+
"m4.xlarge",
113+
"m4.2xlarge",
114+
"c3.2xlarge",
115+
"c3.4xlarge",
116+
"c3.8xlarge",
117+
"c4.2xlarge",
118+
"c4.4xlarge",
119+
"c4.8xlarge",
120+
"r3.large",
121+
"r3.xlarge",
122+
"r3.2xlarge",
123+
"r3.4xlarge",
124+
"r3.8xlarge"
125+
],
126+
"ConstraintDescription": "must be a valid EC2 instance type for GitHub Enterprise: m3.xlarge, m3.2xlarge, m4.xlarge, m4.2xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.2xlarge, c4.4xlarge, c4.8xlarge, r3.large, r3.xlarge, r3.xlarge, r3.2xlarge, r3.4xlarge, or r3.8xlarge.",
127+
"Default": "m3.xlarge",
128+
"Description": "WebServer EC2 instance type",
129+
"Type": "String"
130+
},
131+
"QSS3BucketName": {
132+
"AllowedPattern": "^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$",
133+
"ConstraintDescription": "Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).",
134+
"Default": "quickstart-reference",
135+
"Description": "S3 bucket name for the Quick Start assets. Quick Start bucket name can include numbers, lowercase letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen (-).",
136+
"Type": "String"
137+
},
138+
"QSS3KeyPrefix": {
139+
"AllowedPattern": "^[0-9a-zA-Z-]+(/[0-9a-zA-Z-]+)*$",
140+
"ConstraintDescription": "Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). It cannot start or end with forward slash (/) because they are automatically appended.",
141+
"Default": "github/enterprise/latest/scripts",
142+
"Description": "S3 key prefix for the Quick Start assets. Quick Start key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash (/). It cannot start or end with forward slash (/) because they are automatically appended.",
143+
"Type": "String"
144+
},
145+
"GHELicense": {
146+
"Description": "GitHub Enterprise License file that is uploaded to the License S3 bucket. Sign up for a trial license here: https://enterprise.github.com/trial",
147+
"Type": "String"
148+
},
149+
"LicenseLocation": {
150+
"Description": "Name of S3 bucket containing GitHub Enterprise license",
151+
"Type": "String"
152+
},
153+
"VPCCIDR": {
154+
"AllowedPattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$",
155+
"Default": "10.0.0.0/16",
156+
"Description": "CIDR Block for the VPC",
157+
"Type": "String"
158+
},
159+
"VolumeSize": {
160+
"Default": "100",
161+
"Description": "The size of the EBS attached volume",
162+
"Type": "String"
163+
}
164+
165+
},
166+
"Mappings": {
167+
"AWSInfoRegionMap": {
168+
"ap-northeast-1": {
169+
"Partition": "aws",
170+
"QuickStartS3URL": "https://s3.amazonaws.com"
171+
},
172+
"ap-northeast-2": {
173+
"Partition": "aws",
174+
"QuickStartS3URL": "https://s3.amazonaws.com"
175+
},
176+
"ap-south-1": {
177+
"Partition": "aws",
178+
"QuickStartS3URL": "https://s3.amazonaws.com"
179+
},
180+
"ap-southeast-1": {
181+
"Partition": "aws",
182+
"QuickStartS3URL": "https://s3.amazonaws.com"
183+
},
184+
"ap-southeast-2": {
185+
"Partition": "aws",
186+
"QuickStartS3URL": "https://s3.amazonaws.com"
187+
},
188+
"eu-central-1": {
189+
"Partition": "aws",
190+
"QuickStartS3URL": "https://s3.amazonaws.com"
191+
},
192+
"eu-west-1": {
193+
"Partition": "aws",
194+
"QuickStartS3URL": "https://s3.amazonaws.com"
195+
},
196+
"sa-east-1": {
197+
"Partition": "aws",
198+
"QuickStartS3URL": "https://s3.amazonaws.com"
199+
},
200+
"us-east-1": {
201+
"Partition": "aws",
202+
"QuickStartS3URL": "https://s3.amazonaws.com"
203+
},
204+
"us-east-2": {
205+
"Partition": "aws",
206+
"QuickStartS3URL": "https://s3.amazonaws.com"
207+
},
208+
"us-gov-west-1": {
209+
"Partition": "aws-us-gov",
210+
"QuickStartS3URL": "https://s3-us-gov-west-1.amazonaws.com"
211+
},
212+
"us-west-1": {
213+
"Partition": "aws",
214+
"QuickStartS3URL": "https://s3.amazonaws.com"
215+
},
216+
"us-west-2": {
217+
"Partition": "aws",
218+
"QuickStartS3URL": "https://s3.amazonaws.com"
219+
}
220+
}
221+
},
222+
"Resources": {
223+
"GHEVPCStack": {
224+
"Type": "AWS::CloudFormation::Stack",
225+
"Properties": {
226+
"TemplateURL": {
227+
"Fn::Join": [
228+
"/", [{
229+
"Fn::FindInMap": [
230+
"AWSInfoRegionMap", {
231+
"Ref": "AWS::Region"
232+
},
233+
"QuickStartS3URL"
234+
]
235+
}, {
236+
"Ref": "QSS3BucketName"
237+
}, {
238+
"Ref": "QSS3KeyPrefix"
239+
},
240+
"templates/quickstart-github-enterprise-vpc.template"
241+
]
242+
]
243+
},
244+
"Parameters": {
245+
"KeyPairName": {
246+
"Ref": "KeyPairName"
247+
},
248+
"VPCCIDR": {
249+
"Ref": "VPCCIDR"
250+
}
251+
}
252+
}
253+
},
254+
"GHEStack": {
255+
"DependsOn": "GHEVPCStack",
256+
"Type": "AWS::CloudFormation::Stack",
257+
"Properties": {
258+
"TemplateURL": {
259+
"Fn::Join": [
260+
"/", [{
261+
"Fn::FindInMap": [
262+
"AWSInfoRegionMap", {
263+
"Ref": "AWS::Region"
264+
},
265+
"QuickStartS3URL"
266+
]
267+
}, {
268+
"Ref": "QSS3BucketName"
269+
}, {
270+
"Ref": "QSS3KeyPrefix"
271+
},
272+
"templates/quickstart-github-enterprise.template"
273+
]
274+
]
275+
},
276+
"Parameters": {
277+
"VPCID": {
278+
"Fn::GetAtt": [
279+
"GHEVPCStack",
280+
"Outputs.VPCID"
281+
]
282+
},
283+
"GHELicense": {
284+
"Ref": "GHELicense"
285+
},
286+
"LicenseLocation": {
287+
"Ref": "LicenseLocation"
288+
},
289+
"AdminUsername": {
290+
"Ref": "AdminUsername"
291+
},
292+
"AdminUserPassword": {
293+
"Ref": "AdminUserPassword"
294+
},
295+
"AdminUserEmail": {
296+
"Ref": "AdminUserEmail"
297+
},
298+
"InitialOrganization": {
299+
"Ref": "InitialOrganization"
300+
},
301+
"InitialRepository": {
302+
"Ref": "InitialRepository"
303+
},
304+
"ConsolePassword": {
305+
"Ref": "ConsolePassword"
306+
},
307+
"KeyPairName": {
308+
"Ref": "KeyPairName"
309+
},
310+
"AccessCIDR": {
311+
"Ref": "AccessCIDR"
312+
},
313+
"SubnetId": {
314+
"Fn::GetAtt": [
315+
"GHEVPCStack",
316+
"Outputs.SubnetId"
317+
]
318+
}
319+
}
320+
}
321+
}
322+
}
323+
}

0 commit comments

Comments
 (0)