├── .gitignore ├── .gitmodules ├── .nojekyll ├── .taskcat.yml ├── LICENSE.txt ├── NOTICE.txt ├── README.md ├── ci ├── config.yml ├── github-enterprise-input.json └── taskcat.yml ├── docs ├── generated │ ├── parameters │ │ └── index.adoc │ ├── regions │ │ └── index.adoc │ └── services │ │ ├── index.adoc │ │ └── metadata.adoc ├── images │ ├── architecture_diagram.png │ ├── aws-quickstart-graphic.png │ ├── cfn_outputs.png │ ├── image1.png │ ├── image2.png │ ├── image3.png │ ├── image4.png │ ├── image5.png │ └── image6.png └── partner_editable │ ├── _settings.adoc │ ├── additional_info.adoc │ ├── architecture.adoc │ ├── deploy_steps.adoc │ ├── deployment_options.adoc │ ├── faq_troubleshooting.adoc │ ├── licenses.adoc │ ├── overview_target_and_usage.adoc │ ├── pre-reqs.adoc │ ├── product_description.adoc │ ├── regions.adoc │ ├── service_limits.adoc │ └── specialized_knowledge.adoc ├── images └── ghe.png ├── scripts ├── adminuser_org_repo.sh └── scripts_userdata.sh └── templates ├── quickstart-github-enterprise-master.template ├── quickstart-github-enterprise-single-az-vpc.template └── quickstart-github-enterprise.template /.gitignore: -------------------------------------------------------------------------------- 1 | /docs/index.html -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs/boilerplate"] 2 | path = docs/boilerplate 3 | url = https://github.com/aws-quickstart/quickstart-documentation-base-common.git 4 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/.nojekyll -------------------------------------------------------------------------------- /.taskcat.yml: -------------------------------------------------------------------------------- 1 | project: 2 | name: quickstart-github-enterprise 3 | owner: quickstart-eng@amazon.com 4 | package_lambda: false 5 | regions: 6 | - ap-northeast-1 7 | - ap-northeast-2 8 | - ap-south-1 9 | - ap-southeast-1 10 | - ap-southeast-2 11 | - eu-central-1 12 | - eu-west-1 13 | - sa-east-1 14 | - us-east-1 15 | - us-west-1 16 | - us-west-2 17 | s3_bucket: '' 18 | tests: 19 | github: 20 | parameters: 21 | AccessCIDR: 0.0.0.0/0 22 | GHELicense: github-enterprise.ghl 23 | InitialOrganization: quickstart-created-repo 24 | InitialRepository: repo1 25 | InstanceType: c4.2xlarge 26 | KeyPairName: tonynv 27 | LicenseLocation: quickstart-temp-lic 28 | ManagementPassword: $[taskcat_genpass_8] 29 | QSS3BucketName: $[taskcat_autobucket] 30 | QSS3BucketRegion: $[taskcat_current_region] 31 | QSS3KeyPrefix: quickstart-github-enterprise/ 32 | SiteAdminUserEmail: none@none.com 33 | SiteAdminUserPassword: $[taskcat_genpass_8] 34 | SiteAdminUsername: gitadmin 35 | VPCCIDR: 10.0.0.0/16 36 | VolumeType: io1 37 | ProvisionedIops: '1000' 38 | template: templates/quickstart-github-enterprise-master.template 39 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at 4 | 5 | http://aws.amazon.com/apache2.0/ 6 | 7 | or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # quickstart-github-enterprise 2 | ## Deprecation Notice 3 | 4 | :x: This repository is subject to deprecation in Q4 2024. For more details, [please review this announcement](https://github.com/aws-ia/.announcements/issues/1). 5 | 6 | ## This repository has been deprecated in favor of https://github.com/aws-ia/cfn-ps-github-enterprise. 7 | ***We will archive this repository and keep it publicly available until May 1, 2024.*** 8 | -------------------------------------------------------------------------------- /ci/config.yml: -------------------------------------------------------------------------------- 1 | global: 2 | marketplace-ami: false 3 | owner: quickstart-eng@amazon.com 4 | qsname: quickstart-github-enterprise 5 | regions: 6 | - us-east-1 7 | - us-west-1 8 | - us-west-2 9 | reporting: true 10 | tests: 11 | github: 12 | parameter_input: github-enterprise-input.json 13 | template_file: quickstart-github-enterprise-master.template 14 | -------------------------------------------------------------------------------- /ci/github-enterprise-input.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ParameterKey": "AccessCIDR", 4 | "ParameterValue": "0.0.0.0/0" 5 | }, 6 | { 7 | "ParameterKey": "GHELicense", 8 | "ParameterValue": "github-enterprise.ghl" 9 | }, 10 | { 11 | "ParameterKey": "InitialOrganization", 12 | "ParameterValue": "quickstart-created-repo" 13 | }, 14 | { 15 | "ParameterKey": "InitialRepository", 16 | "ParameterValue": "repo1" 17 | }, 18 | { 19 | "ParameterKey": "InstanceType", 20 | "ParameterValue": "c4.2xlarge" 21 | }, 22 | { 23 | "ParameterKey": "KeyPairName", 24 | "ParameterValue": "tonynv" 25 | }, 26 | { 27 | "ParameterKey": "LicenseLocation", 28 | "ParameterValue": "quickstart-temp-lic" 29 | }, 30 | { 31 | "ParameterKey": "ManagementPassword", 32 | "ParameterValue": "$[taskcat_genpass_8]" 33 | }, 34 | { 35 | "ParameterKey": "QSS3BucketName", 36 | "ParameterValue": "$[taskcat_autobucket]" 37 | }, 38 | { 39 | "ParameterKey": "QSS3BucketRegion", 40 | "ParameterValue": "$[taskcat_current_region]" 41 | }, 42 | { 43 | "ParameterKey": "QSS3KeyPrefix", 44 | "ParameterValue": "quickstart-github-enterprise/" 45 | }, 46 | { 47 | "ParameterKey": "SiteAdminUserEmail", 48 | "ParameterValue": "none@none.com" 49 | }, 50 | { 51 | "ParameterKey": "SiteAdminUserPassword", 52 | "ParameterValue": "$[taskcat_genpass_8]" 53 | }, 54 | { 55 | "ParameterKey": "SiteAdminUsername", 56 | "ParameterValue": "gitadmin" 57 | }, 58 | { 59 | "ParameterKey": "VPCCIDR", 60 | "ParameterValue": "10.0.0.0/16" 61 | }, 62 | { 63 | "ParameterKey": "VolumeType", 64 | "ParameterValue": "io1" 65 | }, 66 | { 67 | "ParameterKey": "ProvisionedIops", 68 | "ParameterValue": "1000" 69 | } 70 | ] 71 | -------------------------------------------------------------------------------- /ci/taskcat.yml: -------------------------------------------------------------------------------- 1 | global: 2 | marketplace-ami: false 3 | owner: quickstart-eng@amazon.com 4 | qsname: quickstart-github-enterprise 5 | regions: 6 | - ap-northeast-1 7 | - ap-northeast-2 8 | - ap-south-1 9 | - ap-southeast-1 10 | - ap-southeast-2 11 | - eu-central-1 12 | - eu-west-1 13 | - sa-east-1 14 | - us-east-1 15 | - us-west-1 16 | - us-west-2 17 | reporting: true 18 | tests: 19 | github: 20 | parameter_input: github-enterprise-input.json 21 | template_file: quickstart-github-enterprise-master.template 22 | regions: 23 | - us-east-1 24 | -------------------------------------------------------------------------------- /docs/generated/parameters/index.adoc: -------------------------------------------------------------------------------- 1 | // placeholder 2 | -------------------------------------------------------------------------------- /docs/generated/regions/index.adoc: -------------------------------------------------------------------------------- 1 | // placeholder 2 | -------------------------------------------------------------------------------- /docs/generated/services/index.adoc: -------------------------------------------------------------------------------- 1 | // placeholder 2 | -------------------------------------------------------------------------------- /docs/generated/services/metadata.adoc: -------------------------------------------------------------------------------- 1 | // placeholder 2 | -------------------------------------------------------------------------------- /docs/images/architecture_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/architecture_diagram.png -------------------------------------------------------------------------------- /docs/images/aws-quickstart-graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/aws-quickstart-graphic.png -------------------------------------------------------------------------------- /docs/images/cfn_outputs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/cfn_outputs.png -------------------------------------------------------------------------------- /docs/images/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/image1.png -------------------------------------------------------------------------------- /docs/images/image2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/image2.png -------------------------------------------------------------------------------- /docs/images/image3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/image3.png -------------------------------------------------------------------------------- /docs/images/image4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/image4.png -------------------------------------------------------------------------------- /docs/images/image5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/image5.png -------------------------------------------------------------------------------- /docs/images/image6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/docs/images/image6.png -------------------------------------------------------------------------------- /docs/partner_editable/_settings.adoc: -------------------------------------------------------------------------------- 1 | // Change the following attributes. 2 | :quickstart-project-name: quickstart-github-enterprise 3 | :partner-product-name: GitHub Enterprise 4 | // For the following attribute, if you have no short name, enter the same name as partner-product-name. 5 | :partner-product-short-name: GitHub Enterprise 6 | // If there's no partner, comment partner-company-name and partner-contributors. 7 | :partner-company-name: GitHub, Inc. 8 | :doc-month: March 9 | :doc-year: 2021 10 | // For the following "contributor" attributes, if the partner agrees to include names in the byline, 11 | // enter names for everyone (partner-contributors and aws- or quickstart-contributors). 12 | // If partner doesn't want to include names, delete all placeholder names and keep only 13 | // "{partner-company-name}" and "AWS Quick Start team." 14 | :partner-contributors: Lee Faus, Daniel Hwang, Cory Vander Jagt, and Christian Weber, {partner-company-name} 15 | //:aws-contributors: Janine Singh, AWS IoT Partner team 16 | :quickstart-contributors: Erin McGill, Tony Vattathil, and Dave May, Amazon Web Services 17 | // For deployment_time, use minutes if deployment takes an hour or less, 18 | // for example, 30 minutes or 60 minutes. 19 | // Use hours for deployment times greater than 60 minutes (rounded to a quarter hour), 20 | // for example, 1.25 hours, 2 hours, 2.5 hours. 21 | :deployment_time: 15 minutes 22 | :default_deployment_region: us-west-2 23 | :parameters_as_appendix: 24 | // Uncomment the following two attributes if you are using an AWS Marketplace listing. 25 | // Additional content will be generated automatically based on these attributes. 26 | // :marketplace_subscription: 27 | // :marketplace_listing_url: https://example.com/ 28 | -------------------------------------------------------------------------------- /docs/partner_editable/additional_info.adoc: -------------------------------------------------------------------------------- 1 | // Add steps as necessary for accessing the software, post-configuration, and testing. Don’t include full usage instructions for your software, but add links to your product documentation for that information. 2 | //Should any sections not be applicable, remove them 3 | 4 | == Test the deployment 5 | 6 | The Quick Start sets up a sample organization and repository during the deployment 7 | process. You can test the deployment by accessing the GitHub Enterprise EC2 instance, 8 | accessing the sample repository, and cloning it. 9 | 10 | 1. Use the URL of the primary instance displayed in the Outputs tab for the stack to view the resources that were created. 11 | 2. Log in to GitHub Enterprise. Enter the site administrator user name and password you provided in the Quick Start parameters. 12 | 13 | [#additional1] 14 | .GitHub Enterprise login 15 | image::../images/image1.png[Architecture,width=50%,height=50%] 16 | 17 | [start=3] 18 | 3. Upload a deploy key. This is an SSH key that gives you access to the sample GitHubrepository. 19 | 20 | * Navigate to http:///setting/keys. 21 | * In the sidebar, choose *SSH and GPG keys*. 22 | * Choose *New SSH key*. 23 | ** For *Title*, give your key a descriptive name. 24 | ** In the *Key* field, paste your public key. This key is typically found in~/.ssh/id_rsa.pub. 25 | ** Choose *Add SSH key* 26 | 27 | [#additional2] 28 | .Adding an SSH key 29 | image::../images/image2.png[Architecture,width=75%,height=75%] 30 | 31 | [start=4] 32 | 4. Clone your GitHub repository. 33 | 34 | * Navigate back to the main page by choosing the GitHub Enterprise logoon the navigation bar. 35 | * Switch dashboard context by selecting the organization name. This is the organization you specified in the Quick Start parameters. 36 | 37 | [#additional3] 38 | .Finding the GitHub repository created by the Quick Start 39 | image::../images/image3.png[Architecture,width=75%,height=75%] 40 | 41 | [start=5] 42 | 5. Select the repository name. This is the repository you specified in the Quick Start parameters in step 3 (*repo1* in the following figure). 43 | 44 | [#additional4] 45 | .Choosing the sample repository 46 | image::../images/image4.png[Architecture,width=75%,height=75%] 47 | 48 | [start=6] 49 | 6. Choose *Clone or download*, and then copy the Git URL that’s displayed by choosing the Clipboard icon 50 | 51 | [#additional5] 52 | .Cloning the repository 53 | image::../images/image5.png[Architecture,width=75%,height=75%] 54 | 55 | [start=7] 56 | 7. Open a terminal shell. (This requires that you install https://git-scm.com/[Git] on your workstation, as instructed in the Prerequisites section.) 57 | 8. Use the Git CLI to clone your repository: 58 | 59 | ---- 60 | git clone git@13.58.62.155:quickstart-created-repo/repo1.git 61 | ---- 62 | 63 | [#additional6] 64 | .Successfully cloned repository 65 | image::../images/image6.png[Architecture,width=75%,height=75%] 66 | 67 | To try out additional GitHub Enterprise features, follow the instructions in the https://help.github.com/enterprise/2.9/[GitHub Enterprise documentation]. 68 | -------------------------------------------------------------------------------- /docs/partner_editable/architecture.adoc: -------------------------------------------------------------------------------- 1 | Deploying this Quick Start for a new virtual private cloud (VPC) with 2 | default parameters builds the following {partner-product-short-name} environment in the 3 | AWS Cloud. 4 | 5 | // Replace this example diagram with your own. Send us your source PowerPoint file. Be sure to follow our guidelines here : http://(we should include these points on our contributors giude) 6 | :xrefstyle: short 7 | [#architecture1] 8 | .Quick Start architecture for {partner-product-short-name} on AWS 9 | image::../images/architecture_diagram.png[Architecture,width=100%,height=100%] 10 | 11 | As shown in <>, the Quick Start sets up the following: 12 | 13 | * A virtual private cloud (VPC) with a single Availability Zone and one public subnet.* 14 | * An Internet gateway to allow access to the Internet.* 15 | * In the public subnet, a GitHub Enterprise EC2 instance with an attached, customizable 16 | EBS volume. 17 | * An Amazon CloudWatch monitoring resource that will automatically restore the GitHub 18 | Enterprise EC2 instance if it becomes unresponsive. 19 | * An IAM role with the necessary permissions to manage access to resources. 20 | * A security group to enable communication within the VPC and to interact with the 21 | GitHub Enterprise EC2 instance. 22 | * A sample Github organization and repository you can use to test the deployment. 23 | 24 | [.small]#*The template that deploys the Quick Start into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.# 25 | -------------------------------------------------------------------------------- /docs/partner_editable/deploy_steps.adoc: -------------------------------------------------------------------------------- 1 | // We need to work around Step numbers here if we are going to potentially exclude the AMI subscription 2 | === Sign in to your AWS account 3 | 4 | . Sign in to your AWS account at https://aws.amazon.com with an IAM user role that has the necessary permissions. For details, see link:#_planning_the_deployment[Planning the deployment] earlier in this guide. 5 | . Make sure that your AWS account is configured correctly, as discussed in the link:#_technical_requirements[Technical requirements] section. 6 | 7 | // Optional based on Marketplace listing. Not to be edited 8 | ifdef::marketplace_subscription[] 9 | === Subscribe to the {partner-product-short-name} AMI 10 | 11 | This Quick Start requires a subscription to the AMI for {partner-product-short-name} in AWS Marketplace. 12 | 13 | . Sign in to your AWS account. 14 | . Open the page for the {marketplace_listing_url}[{partner-product-short-name} AMI in AWS Marketplace^], and then choose *Continue to Subscribe*. 15 | . Review the terms and conditions for software usage, and then choose *Accept Terms*. + 16 | A confirmation page loads, and an email confirmation is sent to the account owner. For detailed subscription instructions, see the https://aws.amazon.com/marketplace/help/200799470[AWS Marketplace documentation^]. 17 | 18 | . When the subscription process is complete, exit out of AWS Marketplace without further action. *Do not* provision the software from AWS Marketplace—the Quick Start deploys the AMI for you. 19 | endif::marketplace_subscription[] 20 | // \Not to be edited 21 | 22 | === Launch the Quick Start 23 | // Adapt the following warning to your Quick Start. 24 | WARNING: If you’re deploying {partner-product-short-name} into an existing VPC, make sure that your VPC has two private subnets in different Availability Zones for the workload instances and that the subnets aren’t shared. This Quick Start doesn’t support https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html[shared subnets^]. These subnets require https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html[NAT gateways^] in their route tables to allow the instances to download packages and software without exposing them to the internet. Also make sure that the domain name option in the DHCP options is configured as explained in http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html[DHCP options sets^]. You provide your VPC settings when you launch the Quick Start. 25 | 26 | Each deployment takes about {deployment_time} to complete. 27 | 28 | . Sign in to your AWS account, and choose one of the following options to launch the AWS CloudFormation template. For help with choosing an option, see link:#_deployment_options[Deployment options] earlier in this guide. 29 | 30 | [cols="3,1"] 31 | |=== 32 | ^|https://fwd.aws/mb4qM[Deploy {partner-product-short-name} into a new VPC on AWS^] 33 | ^|https://github.com/aws-quickstart/quickstart-github-enterprise/blob/main/templates/quickstart-github-enterprise-master.template[View template^] 34 | 35 | ^|https://fwd.aws/9RWeQ[Deploy {partner-product-short-name} into an existing VPC on AWS^] 36 | ^|https://github.com/aws-quickstart/quickstart-github-enterprise/blob/main/templates/quickstart-github-enterprise.template[View template^] 37 | |=== 38 | 39 | [start=2] 40 | . Check the AWS Region that’s displayed in the upper-right corner of the navigation bar, and change it if necessary. This Region is where the network infrastructure for {partner-product-short-name} is built. The template is launched in the {default_deployment_region} Region by default. For other choices, see link:#_supported_regions[Supported Regions] earlier in this guide. 41 | 42 | [start=3] 43 | . On the *Create stack* page, keep the default setting for the template URL, and then choose *Next*. 44 | . On the *Specify stack details* page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. For details on each parameter, see the link:#_parameter_reference[Parameter reference] section of this guide. When you finish reviewing and customizing the parameters, choose *Next*. 45 | -------------------------------------------------------------------------------- /docs/partner_editable/deployment_options.adoc: -------------------------------------------------------------------------------- 1 | // Edit this placeholder text to accurately describe your architecture. 2 | 3 | This Quick Start provides two deployment options: 4 | 5 | * *Deploy {partner-product-short-name} into a new VPC*. This option builds a new AWS environment consisting of the VPC, subnets, NAT gateways, security groups, bastion hosts, and other infrastructure components. It then deploys {partner-product-short-name} into this new VPC. 6 | * *Deploy {partner-product-short-name} into an existing VPC*. This option provisions {partner-product-short-name} in your existing AWS infrastructure. 7 | 8 | The Quick Start provides separate templates for these options. It also lets you configure Classless Inter-Domain Routing (CIDR) blocks, instance types, and {partner-product-short-name} settings, as discussed later in this guide. 9 | -------------------------------------------------------------------------------- /docs/partner_editable/faq_troubleshooting.adoc: -------------------------------------------------------------------------------- 1 | // Add any tips or answers to anticipated questions. 2 | 3 | == FAQ 4 | 5 | *Q.* I encountered a *CREATE_FAILED* error when I launched the Quick Start. 6 | 7 | *A.* If AWS CloudFormation fails to create the stack, relaunch the template with *Rollback on failure* set to *Disabled*. This setting is under *Advanced* in the AWS CloudFormation console on the *Configure stack options* page. With this setting, the stack’s state is retained, and the instance keeps running so that you can troubleshoot the issue. (For Windows, look at the log files in `%ProgramFiles%\Amazon\EC2ConfigService` and `C:\cfn\log`.) 8 | // Customize this answer if needed. For example, if you’re deploying on Linux instances, either provide the location for log files on Linux or omit the final sentence. If the Quick Start has no EC2 instances, revise accordingly (something like "and the assets keep running"). 9 | 10 | WARNING: When you set *Rollback on failure* to *Disabled*, you continue to incur AWS charges for this stack. Delete the stack when you finish troubleshooting. 11 | 12 | For more information, see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html[Troubleshooting AWS CloudFormation^]. 13 | 14 | *Q.* I encountered a size-limitation error when I deployed the AWS CloudFormation templates. 15 | 16 | *A.* Launch the Quick Start templates from the links in this guide or from another S3 bucket. If you deploy the templates from a local copy on your computer or from a location other than an S3 bucket, you might encounter template-size limitations. For more information, see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html[AWS CloudFormation quotas^]. 17 | 18 | 19 | == Additional Resources 20 | 21 | === GitHub Enterprise 22 | 23 | * GitHub Enterprise: https://github.com/business[https://github.com/business] 24 | * GitHub Enterprise trial: https://enterprise.github.com/sn-trial[https://enterprise.github.com/sn-trial] 25 | * GitHub Enterprise documentation: https://help.github.com/enterprise/2.9/[https://help.github.com/enterprise/2.9/] 26 | -------------------------------------------------------------------------------- /docs/partner_editable/licenses.adoc: -------------------------------------------------------------------------------- 1 | This Quick Start requires a trial version of GitHub Enterprise, which is available for free from https://enterprise.github.com/sn-trial[GitHub]. 2 | -------------------------------------------------------------------------------- /docs/partner_editable/overview_target_and_usage.adoc: -------------------------------------------------------------------------------- 1 | // Replace the content in <> 2 | // Identify your target audience and explain how/why they would use this Quick Start. 3 | //Avoid borrowing text from third-party websites (copying text from AWS service documentation is fine). Also, avoid marketing-speak, focusing instead on the technical aspect. 4 | 5 | This guide provides instructions for deploying the {partner-product-short-name} Quick Start reference architecture on the AWS Cloud. http://aws.amazon.com/quickstart/[Quick Starts] are automated reference deployments that use AWS CloudFormation templates to launch, configure, and run the AWS compute, network, storage, and other services required to deploy a specific workload on AWS. 6 | 7 | This Quick Start is for system administrators and IT professionals who want to deploy 8 | GitHub Enterprise on a virtual machine hosted in the AWS Cloud. Deploying GitHub 9 | Enterprise on AWS provides a configurable infrastructure for your coding and deployment 10 | tasks. Additional details about GitHub Enterprise are available at 11 | https://github.com/business[https://github.com/business]. 12 | -------------------------------------------------------------------------------- /docs/partner_editable/pre-reqs.adoc: -------------------------------------------------------------------------------- 1 | // If no preperation is required, remove all content from here 2 | 3 | This Quick Start requires a license to use GitHub Enterprise. You can fill out the form at 4 | https://enterprise.github.com/sn-trial[https://enterprise.github.com/sn-trial] to sign up for a free, 45-day trial license for GitHub 5 | Enterprise. 6 | 7 | The Quick Start also requires https://git-scm.com/[Git], which is the open source version control system 8 | underlying GitHub Enterprise. Please install Git from https://git-scm.com/[https://git-scm.com/] before you 9 | deploy the Quick Start. 10 | 11 | ==== Prepare your AWS account 12 | 13 | 1. If you don’t already have an AWS account, create one at https://aws.amazon.com[https://aws.amazon.com] by following the on-screen instructions. 14 | 2. Use the region selector in the navigation bar to choose the AWS Region where you want to deploy GitHub Enterprise on AWS. 15 | 3. Create a https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html[key pair] in your preferred Region. 16 | 4. If necessary, request a https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-[service limit increase] for the Amazon EC2 m3.xlarge instance type. You might need to do this if you already have an existing deployment that uses this instance type, and you think you might exceed the http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html[default limit] with this reference deployment. 17 | 18 | ==== Request a GitHub Enterprise Trial License 19 | 20 | 1. Fill out the form at https://enterprise.github.com/sn-trial[https://enterprise.github.com/sn-trial] to sign up for a free, 45-day trial license for GitHub Enterprise. 21 | 2. Upload the trial license to Amazon S3 and note its URL. You’ll need to supply the location and file name of the license file when you launch the AWS CloudFormation template in the next step. 22 | -------------------------------------------------------------------------------- /docs/partner_editable/product_description.adoc: -------------------------------------------------------------------------------- 1 | // Replace the content in <> 2 | // Briefly describe the software. Use consistent and clear branding. 3 | // Include the benefits of using the software on AWS, and provide details on usage scenarios. 4 | 5 | GitHub Enterprise is a development and collaboration platform that enables developers to 6 | build and share software easily and effectively. Development teams of all sizes, from small 7 | startups to teams of thousands, use GitHub Enterprise to facilitate their software 8 | development and deployment tasks. 9 | 10 | GitHub Enterprise provides the following features: 11 | 12 | * *The GitHub Flow*: Developers can use the same asynchronous workflow created by 13 | the open source community to collaborate on projects. This workflow encourages a 14 | culture of experimentation without risk. For more information about the GitHub 15 | Flow, see the GitHub Enterprise website. 16 | * *Integrated platform*: At GitHub, we use GitHub Enterprise across the entire 17 | development process, which enables us to release and deploy our code dozens of 18 | times per day. This platform for continuous integration and deployment enables you 19 | to build and ship better software faster. 20 | * *Transparent collaboration*: Pull requests let developers interactively learn from 21 | one another during the development process. Whether they’re discussing the whole 22 | project or a single line of code, GitHub Enterprise displays the relevant information 23 | in a clean, timeline-style interface. 24 | * *Advanced monitoring*: You can use GitHub Pulse to see a snapshot of everything 25 | that’s happened in your project repository during the past week, or visit the Activity 26 | Dashboard to view graphs that illustrate work across projects. Advanced monitoring 27 | can include Simple Network Management Protocol (SNMP), collectd, and log 28 | forwarding on the appliance as well. For details, see the GitHub Enterprise 29 | documentation. 30 | * *Auditing and compliance*: Over time, your organization might have developed 31 | crucial policies around permissions and security auditing. You can use the Commit 32 | Amazon Web Services – GitHub Enterprise on the AWS Cloud June 2017 33 | Status API in GitHub Enterprise to specify the unique merge conditions necessary 34 | for your organization’s compliance requirements. GitHub Enterprise also provides 35 | in-depth monitoring and auditing for administrators. For details, see the GitHub 36 | Enterprise documentation. 37 | * *Smarter version control*: GitHub Enterprise is built on Git, which is a distributed 38 | version control system that supports non-linear workflows on projects of all sizes. 39 | -------------------------------------------------------------------------------- /docs/partner_editable/regions.adoc: -------------------------------------------------------------------------------- 1 | This Quick Start supports the following Regions: 2 | 3 | - us-east-1 (N. Virginia) 4 | - us-east-2 (Ohio) 5 | - us-west-1 (N. California) 6 | - us-west-2 (Oregon) 7 | - ca-central-1 (Canada Central) 8 | - eu-central-1 (Frankfurt) 9 | - eu-west-1 (Ireland) 10 | - eu-west-2 (London) 11 | - eu-west-3 (Paris) 12 | - ap-southeast-1 (Singapore) 13 | - ap-southeast-2 (Sydney) 14 | - ap-south-1 (Mumbai) 15 | - ap-northeast-1 (Tokyo) 16 | - ap-northeast-2 (Seoul) 17 | - sa-east-1 (South America) 18 | - eu-north-1 (Stockholm) 19 | - ap-east-1 (Hong Kong) 20 | - me-south-1 (Bahrain) 21 | - af-south-1 (Cape Town) 22 | - eu-south-1 (Milan) 23 | 24 | //Full list: https://docs.aws.amazon.com/general/latest/gr/rande.html 25 | -------------------------------------------------------------------------------- /docs/partner_editable/service_limits.adoc: -------------------------------------------------------------------------------- 1 | // Replace the in each row to specify the number of resources used in this deployment. Remove the rows for resources that aren’t used. 2 | |=== 3 | |Resource |This deployment uses 4 | 5 | // Space needed to maintain table headers 6 | |VPCs |1 7 | |CloudWatch alarms |1 8 | |Elastic IP addresses |1 9 | |Security groups |1 10 | |m3.xlarge instances |1 11 | |=== 12 | -------------------------------------------------------------------------------- /docs/partner_editable/specialized_knowledge.adoc: -------------------------------------------------------------------------------- 1 | // Replace the content in <> 2 | // For example: “familiarity with basic concepts in networking, database operations, and data encryption” or “familiarity with .” 3 | // Include links if helpful. 4 | // You don't need to list AWS services or point to general info about AWS; the boilerplate already covers this. 5 | 6 | Before you deploy this Quick Start, we recommend that you become familiar with the following AWS services. (If you are new to AWS, see https://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/intro.html[Getting Started with AWS].) 7 | 8 | * https://aws.amazon.com/documentation/vpc/[Amazon VPC] 9 | * https://aws.amazon.com/documentation/ec2/[Amazon EC2] 10 | * https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html[Amazon EBS] 11 | * http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html[Amazon CloudWatch] 12 | -------------------------------------------------------------------------------- /images/ghe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-quickstart/quickstart-github-enterprise/077329d4ad9a6b6a4d8be9ac2f021aa1a512ec0b/images/ghe.png -------------------------------------------------------------------------------- /scripts/adminuser_org_repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # GitHub Enterprise 3 | # date: Nov,3,2016 4 | 5 | # ARGS for script 6 | # 1: GHE_ADMINUSER_NAME 7 | # 2: GHE_ADMINUSER_EMAIL 8 | # 3: GHE_ADMINUSER_PASSWD 9 | # 4: GHE_ORG 10 | # 5: GHE_REPO 11 | 12 | ORG=\"$4\" 13 | ADMIN_USER=\"$1\" 14 | 15 | EC2_IP=`curl http://169.254.169.254/latest/meta-data/public-ipv4` 16 | 17 | 18 | ########################################## 19 | # Check status function 20 | ########################################## 21 | function chkstatus () { 22 | if [ $1 -eq 201 ] 23 | then 24 | echo "Script $0 [PASS]" 25 | else 26 | echo "Script $0 [FAILED]" >&2 27 | exit 1 28 | fi 29 | } 30 | 31 | echo "Creating first GitHub Enterprise administrator account" 32 | TEMPDIR=`mktemp -d /tmp/XXXXXXXXXXXXX` 33 | echo $TEMPDIR 34 | curl -iskL https://$EC2_IP/join | grep 'Status: 200 OK' 35 | curl -k -v -L -c $TEMPDIR/cookies https://$EC2_IP/login > $TEMPDIR/github-curl.out 36 | authenticity_token=$(grep 'name="authenticity_token"' $TEMPDIR/github-curl.out | head -1 | sed -e 's/.*value="\([^"]*\)".*/\1/') 37 | curl -X POST -k -v -b $TEMPDIR/cookies -c -L $TEMPDIR/cookies \ 38 | -F "authenticity_token=$authenticity_token" \ 39 | -F "user[login]=$1" \ 40 | -F "user[email]=$2" \ 41 | -F "user[password]=$3" \ 42 | -F "user[password_confirmation]=$3" \ 43 | -F "source_label=Detail Form" \ 44 | https://$EC2_IP/join >$TEMPDIR/github-curl.out 2>&1 45 | cat $TEMPDIR/github-curl.out 46 | grep "< Set-Cookie: logged_in=yes;" $TEMPDIR/github-curl.out 47 | rm -rf $TEMPDIR 48 | 49 | MAKE_ORG=$(curl -i -k -L -H "Content-Type: application/json" --write-out '%{http_code}' --silent -d "{\"login\": ${ORG}, \"admin\": ${ADMIN_USER}}" -X POST https://$1:$3@${EC2_IP}/api/v3/admin/organizations) 50 | 51 | RETURN_MAKE_ORG=`echo ${MAKE_ORG} | awk -F' ' '{print $NF}'` 52 | echo "The Make Org HTTP status code: " ${RETURN_MAKE_ORG} 53 | 54 | # Checking status, creation of an Organization should return a 201 on success 55 | chkstatus $RETURN_MAKE_ORG 56 | echo $? 57 | 58 | MAKE_REPO=$(curl -i -k -L -H "Content-Type: application/json" --write-out '%{http_code}' --silent -d "{\"name\": \"$5\", \"private\": \"true\", \"auto_init\": \"true\"}" -X POST https://$1:$3@${EC2_IP}/api/v3/orgs/$4/repos) 59 | # The above is supposed to return a 201 60 | RETURN_MAKE_REPO=`echo ${MAKE_REPO} | awk -F' ' '{print $NF}'` 61 | echo "The Make Repo HTTP status code: " ${RETURN_MAKE_REPO} 62 | 63 | # Checking status, creation of an Organization should return a 201 on success 64 | chkstatus $RETURN_MAKE_REPO 65 | echo "The below is the exit code" 66 | echo $? 67 | 68 | #rm -f ${ADMININFO} 69 | echo "Finished AWSQuickStart Bootstraping" 70 | -------------------------------------------------------------------------------- /scripts/scripts_userdata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # GitHub Enterprise Bootstraping 3 | # date: Nov,3,2016 4 | # purpose: UserData and or scripts should be stored here, but only for source code revision purposes and CloudFormation templates should always refer to 'quickstart-reference' S3 bucket 5 | 6 | # Configuring the GitHub Enterprise server 7 | DATE=`date +%d-%m-%Y` 8 | date >/root/install_date 9 | 10 | ########################################## 11 | # Check status function 12 | ########################################## 13 | function chkstatus () { 14 | if [ $1 -eq $2 ] 15 | then 16 | echo "Script $0 [PASS]" 17 | else 18 | echo "Script $0 [FAILED]" >&2 19 | exit 1 20 | fi 21 | } 22 | 23 | ########################################### 24 | # Configure the GitHub Enterprise server 25 | ########################################### 26 | 27 | AWS_CMD='/usr/local/bin/aws' 28 | EC2_IP=`curl http://169.254.169.254/latest/meta-data/public-ipv4` 29 | 30 | # ARGS for script 31 | # 1: GHE_CONSOLE_PASSWORD 32 | # 2: GHE_S3_BUCKET 33 | # 3: GHE_LICENSE 34 | 35 | 36 | # Copy down the license file from the S3 Bucket 37 | ${AWS_CMD} s3 cp s3://$2/$3 /tmp/github-enterprise.ghl 38 | 39 | sleep 25 40 | #Upload the license and set the GitHub Enterprise Admin password 41 | START_SETUP=`curl -o /dev/null -i -k -L --write-out '%{http_code}' -F license=@/tmp/github-enterprise.ghl -F password=$1 -X POST https://${EC2_IP}:8443/setup/api/start` 42 | RETURN_START=`echo ${START_SETUP} | awk -F' ' '{print $NF}'` 43 | echo "HTTP status code for start setup: " ${RETURN_START} 44 | chkstatus ${RETURN_START} 202 45 | echo "Return from chkstatus:" $? 46 | [[ $? -ne 0 ]] && exit 1 47 | 48 | # Initiate the configuration process 49 | INITIATE_CONFIG=$(curl -i -k -L --write-out '%{http_code}' --silent -X POST https://api_key:$1@localhost:8443/setup/api/configure) 50 | RETURN_INITIATE=`echo ${INITIATE_CONFIG} | awk -F' ' '{print $NF}'` 51 | echo "HTTP status code for initiate config: " ${RETURN_INITIATE} 52 | chkstatus ${RETURN_INITIATE} 202 53 | echo "Return from chkstatus:" $? 54 | [[ $? -ne 0 ]] && exit 1 55 | 56 | # Check the configuration status and continue to check until the configuration is complete 57 | CONFIG_STATUS=`curl -k -L https://api_key:$1@localhost:8443/setup/api/configcheck | awk -F, '{print $NF}' | awk -F: '{print $NF}' |tail -n1 ` 58 | while [[ ${CONFIG_STATUS} != *'DONE'* ]]; do 59 | sleep 2 60 | echo date 61 | echo 'Waiting for config status to contain done for Reloading application services' 62 | echo ${CONFIG_STATUS} 63 | CONFIG_STATUS=`curl -k -L https://api_key:$1@localhost:8443/setup/api/configcheck | awk -F, '{print $NF}' | awk -F: '{print $NF}' |tail -n1 ` 64 | done 65 | 66 | echo "The exit code for this script:" $? 67 | 68 | -------------------------------------------------------------------------------- /templates/quickstart-github-enterprise-master.template: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion: '2010-09-09' 2 | Description: '(qs-1nae5pfk9) GitHub Enterprise+VPC Quickstart License: Apache 2.0 3 | (Please do not remove) May,08,2018' 4 | Transform: AWS::LanguageExtensions 5 | Mappings: 6 | SupportedRegionMap: 7 | ap-northeast-1: 8 | GHE: True 9 | ap-northeast-2: 10 | GHE: True 11 | ap-northeast-3: 12 | GHE: True 13 | ap-south-1: 14 | GHE: True 15 | ap-southeast-1: 16 | GHE: True 17 | ap-southeast-2: 18 | GHE: True 19 | ca-central-1: 20 | GHE: True 21 | eu-central-1: 22 | GHE: True 23 | eu-west-1: 24 | GHE: True 25 | eu-west-2: 26 | GHE: True 27 | sa-east-1: 28 | GHE: True 29 | us-east-1: 30 | GHE: True 31 | us-east-2: 32 | GHE: True 33 | us-west-1: 34 | GHE: True 35 | us-west-2: 36 | GHE: True 37 | Conditions: 38 | GovCloudCondition: !Equals 39 | - !Ref 'AWS::Region' 40 | - us-gov-west-1 41 | UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] 42 | IsNotSupportedRegion: !Equals [ !FindInMap [ SupportedRegionMap, !Ref AWS::Region, GHE, DefaultValue: 'False' ], 'False' ] 43 | UnSupportedDeployment: !And [!Condition UsingDefaultBucket, !Condition IsNotSupportedRegion] 44 | SupportedDeployment: !Not [!Condition UnSupportedDeployment] 45 | Metadata: 46 | QuickStartDocumentation: 47 | EntrypointName: "Launch into a new VPC" 48 | Order: "1" 49 | AWS::CloudFormation::Interface: 50 | ParameterGroups: 51 | - Label: 52 | default: ' VPC Network Configuration' 53 | Parameters: 54 | - VPCCIDR 55 | - AccessCIDR 56 | - Label: 57 | default: GitHubEnterprise License 58 | Parameters: 59 | - LicenseLocation 60 | - GHELicense 61 | - Label: 62 | default: GitHub Enterprise Organization and Repository 63 | Parameters: 64 | - InitialOrganization 65 | - InitialRepository 66 | - Label: 67 | default: Site Admin User Information 68 | Parameters: 69 | - ManagementPassword 70 | - SiteAdminUsername 71 | - SiteAdminUserEmail 72 | - SiteAdminUserPassword 73 | - Label: 74 | default: Server Configuration 75 | Parameters: 76 | - InstanceType 77 | - KeyPairName 78 | - VolumeType 79 | - ProvisionedIops 80 | - VolumeSize 81 | - Label: 82 | default: AWS Quick Start Configuration 83 | Parameters: 84 | - QSS3BucketName 85 | - QSS3BucketRegion 86 | - QSS3KeyPrefix 87 | ParameterLabels: 88 | AccessCIDR: 89 | default: Permitted IP range 90 | GHELicense: 91 | default: GitHub License Filename 92 | InitialOrganization: 93 | default: Initial Organization 94 | InitialRepository: 95 | default: Initial Repository 96 | InstanceType: 97 | default: Instance Type 98 | KeyPairName: 99 | default: Key Pair Name 100 | LicenseLocation: 101 | default: GitHub License Location 102 | ManagementPassword: 103 | default: Management Password 104 | ProvisionedIops: 105 | default: Provisioned IOPS 106 | QSS3BucketName: 107 | default: Quick Start S3 Bucket Name 108 | QSS3BucketRegion: 109 | default: Quick Start S3 bucket region 110 | QSS3KeyPrefix: 111 | default: Quick Start S3 Key Prefix 112 | SiteAdminUserEmail: 113 | default: Site Admin User Email 114 | SiteAdminUserPassword: 115 | default: Site Admin User Password 116 | SiteAdminUsername: 117 | default: Site Admin Username 118 | VPCCIDR: 119 | default: VPC CIDR 120 | VolumeSize: 121 | default: Volume Size 122 | VolumeType: 123 | default: Volume Type 124 | Parameters: 125 | AccessCIDR: 126 | AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}) 127 | ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x. 128 | Description: The IP address range that can be used to access to the EC2 instance 129 | MaxLength: '18' 130 | MinLength: '9' 131 | Type: String 132 | GHELicense: 133 | Description: 'GitHub Enterprise License file that is uploaded to the License S3 134 | bucket. Sign up for a trial license here: https://enterprise.github.com/trial' 135 | Type: String 136 | InitialOrganization: 137 | Description: The initial organization to hold the GitHub Enterprise repository 138 | Default: initial-organization 139 | Type: String 140 | InitialRepository: 141 | Description: The initial repository to create 142 | Default: initial-repository 143 | Type: String 144 | InstanceType: 145 | AllowedValues: 146 | - m3.xlarge 147 | - m3.2xlarge 148 | - m4.xlarge 149 | - m4.2xlarge 150 | - c3.2xlarge 151 | - c3.4xlarge 152 | - c3.8xlarge 153 | - c4.2xlarge 154 | - c4.4xlarge 155 | - c4.8xlarge 156 | - r3.large 157 | - r3.xlarge 158 | - r3.2xlarge 159 | - r3.4xlarge 160 | - r3.8xlarge 161 | ConstraintDescription: >- 162 | must be a valid EC2 instance type for GitHub Enterprise: m3.xlarge, m3.2xlarge, 163 | m4.xlarge, m4.2xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.2xlarge, c4.4xlarge, 164 | c4.8xlarge, r3.large, r3.xlarge, r3.xlarge, r3.2xlarge, r3.4xlarge, or r3.8xlarge. 165 | Default: m3.xlarge 166 | Description: WebServer EC2 instance type 167 | Type: String 168 | KeyPairName: 169 | Description: Public/private key pairs allow you to securely connect to your instance 170 | after it launches 171 | Type: AWS::EC2::KeyPair::KeyName 172 | LicenseLocation: 173 | Description: Name of S3 bucket containing GitHub Enterprise license 174 | Type: String 175 | ManagementPassword: 176 | AllowedPattern: (?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]* 177 | ConstraintDescription: Passwords must be at least 7 characters long and include 178 | at least one number and one upper case letter. 179 | Description: Set the Management password for Github Enterprise (Passwords must 180 | be at least 7 characters long and include at least one number and one upper 181 | case letter) 182 | MinLength: '7' 183 | NoEcho: 'True' 184 | Type: String 185 | ProvisionedIops: 186 | ConstraintDescription: Range is 100 to 20000 for Provisioned IOPS SSD volumes 187 | Description: Set the provisioned IOPs between 100 and 20000. Only set if you are 188 | choosing io1 for your volume type 189 | Type: String 190 | QSS3BucketName: 191 | AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ 192 | ConstraintDescription: Quick Start bucket name can include numbers, lowercase 193 | letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen 194 | (-). 195 | Default: aws-quickstart 196 | Description: S3 bucket name for the Quick Start assets. Quick Start bucket name 197 | can include numbers, lowercase letters, uppercase letters, and hyphens (-). 198 | It cannot start or end with a hyphen (-). 199 | Type: String 200 | QSS3BucketRegion: 201 | Default: 'us-east-1' 202 | Description: 'The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' 203 | Type: String 204 | QSS3KeyPrefix: 205 | AllowedPattern: ^[0-9a-zA-Z-]+(/[0-9a-zA-Z-]+)*/ 206 | ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, 207 | uppercase letters, hyphens (-), and forward slash (/). It cannot start with 208 | forward slash (/) because it is automatically added. 209 | Default: quickstart-github-enterprise/ 210 | Description: >- 211 | S3 key prefix for the Quick Start assets. Quick Start key prefix can include 212 | numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash 213 | (/). It cannot start with forward slash (/) because it is automatically added 214 | Type: String 215 | SiteAdminUserEmail: 216 | Description: Site Admin Email address 217 | Type: String 218 | SiteAdminUserPassword: 219 | AllowedPattern: (?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]* 220 | ConstraintDescription: Passwords must be at least 7 characters long and include 221 | at least one number and one upper case letter. 222 | Description: Set the Site Admin password for Github Enterprise (Passwords must 223 | be at least 7 characters long and include at least one number and one upper 224 | case letter) 225 | MinLength: '7' 226 | NoEcho: 'True' 227 | Type: String 228 | SiteAdminUsername: 229 | Description: Set the Site Admin Username 230 | Type: String 231 | VPCCIDR: 232 | 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]))$ 233 | Default: 10.0.0.0/16 234 | Description: CIDR Block for the VPC 235 | Type: String 236 | VolumeSize: 237 | Default: '100' 238 | Description: The size of the EBS attached volume 239 | Type: String 240 | VolumeType: 241 | AllowedValues: 242 | - gp2 243 | - io1 244 | Description: Choose either GP2 or IO1. IO1 is recommended for more than 500 users 245 | Default: gp2 246 | Type: String 247 | Resources: 248 | GHEStack: 249 | DependsOn: GHEVPCStack 250 | Condition: SupportedDeployment 251 | Properties: 252 | Parameters: 253 | AccessCIDR: !Ref 'AccessCIDR' 254 | GHELicense: !Ref 'GHELicense' 255 | InitialOrganization: !Ref 'InitialOrganization' 256 | InitialRepository: !Ref 'InitialRepository' 257 | InstanceType: !Ref 'InstanceType' 258 | KeyPairName: !Ref 'KeyPairName' 259 | LicenseLocation: !Ref 'LicenseLocation' 260 | ManagementPassword: !Ref 'ManagementPassword' 261 | ProvisionedIops: !Ref 'ProvisionedIops' 262 | QSS3BucketName: !Ref 'QSS3BucketName' 263 | QSS3BucketRegion: !Ref 'QSS3BucketRegion' 264 | QSS3KeyPrefix: !Ref 'QSS3KeyPrefix' 265 | SiteAdminUserEmail: !Ref 'SiteAdminUserEmail' 266 | SiteAdminUserPassword: !Ref 'SiteAdminUserPassword' 267 | SiteAdminUsername: !Ref 'SiteAdminUsername' 268 | SubnetId: !GetAtt 'GHEVPCStack.Outputs.SubnetId' 269 | VPCID: !GetAtt 'GHEVPCStack.Outputs.VPCID' 270 | VolumeSize: !Ref 'VolumeSize' 271 | VolumeType: !Ref 'VolumeType' 272 | TemplateURL: 273 | !Sub 274 | - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-github-enterprise.template' 275 | - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] 276 | S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] 277 | Type: AWS::CloudFormation::Stack 278 | GHEVPCStack: 279 | Condition: SupportedDeployment 280 | Properties: 281 | Parameters: 282 | KeyPairName: !Ref 'KeyPairName' 283 | VPCCIDR: !Ref 'VPCCIDR' 284 | TemplateURL: 285 | !Sub 286 | - 'https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/quickstart-github-enterprise-single-az-vpc.template' 287 | - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] 288 | S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] 289 | Type: AWS::CloudFormation::Stack 290 | -------------------------------------------------------------------------------- /templates/quickstart-github-enterprise-single-az-vpc.template: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion: '2010-09-09' 2 | Description: Create the Amazon VPC for the GitHub Quick Start. 3 | Parameters: 4 | KeyPairName: 5 | Description: Public/private key pair 6 | Type: AWS::EC2::KeyPair::KeyName 7 | SubnetCIDR: 8 | Description: CIDR Block for the Public Subnet 9 | Type: String 10 | Default: 10.0.0.0/19 11 | AllowedPattern: '[a-zA-Z0-9]+\..+' 12 | VPCCIDR: 13 | Description: CIDR Block for the VPC 14 | Type: String 15 | Default: 10.0.0.0/16 16 | AllowedPattern: '[a-zA-Z0-9]+\..+' 17 | Resources: 18 | VPC: 19 | Type: AWS::EC2::VPC 20 | Properties: 21 | CidrBlock: !Ref 'VPCCIDR' 22 | EnableDnsHostnames: 'true' 23 | Tags: 24 | - Key: Application 25 | Value: !Ref 'AWS::StackName' 26 | - Key: Network 27 | Value: Public 28 | PublicSubnet: 29 | Type: AWS::EC2::Subnet 30 | Properties: 31 | VpcId: !Ref 'VPC' 32 | CidrBlock: !Ref 'SubnetCIDR' 33 | MapPublicIpOnLaunch: 'true' 34 | AvailabilityZone: !Select 35 | - 1 36 | - !GetAZs '' 37 | Tags: 38 | - Key: Application 39 | Value: !Ref 'AWS::StackName' 40 | - Key: Network 41 | Value: Public 42 | - Key: Role 43 | Value: Public Subnet 44 | InternetGateway: 45 | Type: AWS::EC2::InternetGateway 46 | Properties: 47 | Tags: 48 | - Key: Application 49 | Value: !Ref 'AWS::StackName' 50 | - Key: Network 51 | Value: Public 52 | AttachGateway: 53 | Type: AWS::EC2::VPCGatewayAttachment 54 | Properties: 55 | VpcId: !Ref 'VPC' 56 | InternetGatewayId: !Ref 'InternetGateway' 57 | PublicRouteTable: 58 | Type: AWS::EC2::RouteTable 59 | Properties: 60 | VpcId: !Ref 'VPC' 61 | Tags: 62 | - Key: Application 63 | Value: !Ref 'AWS::StackName' 64 | - Key: Network 65 | Value: Public Subnet 66 | PublicRoute: 67 | Type: AWS::EC2::Route 68 | Properties: 69 | RouteTableId: !Ref 'PublicRouteTable' 70 | DestinationCidrBlock: '0.0.0.0/0' 71 | GatewayId: !Ref 'InternetGateway' 72 | PublicSubnetRouteTableAssociation: 73 | Type: AWS::EC2::SubnetRouteTableAssociation 74 | Properties: 75 | SubnetId: !Ref 'PublicSubnet' 76 | RouteTableId: !Ref 'PublicRouteTable' 77 | Outputs: 78 | VPCID: 79 | Value: !Ref 'VPC' 80 | Description: VPCID 81 | SubnetId: 82 | Value: !Ref 'PublicSubnet' 83 | Description: Subnet ID for the public subnet 84 | -------------------------------------------------------------------------------- /templates/quickstart-github-enterprise.template: -------------------------------------------------------------------------------- 1 | AWSTemplateFormatVersion: '2010-09-09' 2 | Description: '(qs-1nae5pfk3) Git Hub Enterprise Quickstart License: Apache 2.0 (Please 3 | do not remove) May,08,2018' 4 | Metadata: 5 | QuickStartDocumentation: 6 | EntrypointName: "Launch into an existing VPC" 7 | Order: "2" 8 | AWS::CloudFormation::Interface: 9 | ParameterGroups: 10 | - Label: 11 | default: ' VPC Network Configuration' 12 | Parameters: 13 | - AccessCIDR 14 | - SubnetId 15 | - VPCID 16 | - Label: 17 | default: GitHubEnterprise License 18 | Parameters: 19 | - LicenseLocation 20 | - GHELicense 21 | - Label: 22 | default: GitHub Enterprise Organization and Repository 23 | Parameters: 24 | - InitialOrganization 25 | - InitialRepository 26 | - Label: 27 | default: Site Admin User Information 28 | Parameters: 29 | - ManagementPassword 30 | - SiteAdminUsername 31 | - SiteAdminUserEmail 32 | - SiteAdminUserPassword 33 | - Label: 34 | default: Server Configuration 35 | Parameters: 36 | - InstanceType 37 | - KeyPairName 38 | - VolumeType 39 | - ProvisionedIops 40 | - VolumeSize 41 | - Label: 42 | default: AWS Quick Start Configuration 43 | Parameters: 44 | - QSS3BucketName 45 | - QSS3BucketRegion 46 | - QSS3KeyPrefix 47 | ParameterLabels: 48 | KeyPairName: 49 | default: Key Pair Name 50 | QSS3BucketName: 51 | default: Quick Start S3 Bucket Name 52 | QSS3BucketRegion: 53 | default: Quick Start S3 bucket region 54 | QSS3KeyPrefix: 55 | default: Quick Start S3 Key Prefix 56 | AccessCIDR: 57 | default: Permitted IP range 58 | LicenseLocation: 59 | default: GitHub License Location 60 | GHELicense: 61 | default: GitHub License Filename 62 | InitialOrganization: 63 | default: Initial Organization 64 | InitialRepository: 65 | default: Initial Repository 66 | ManagementPassword: 67 | default: Management Password 68 | SiteAdminUsername: 69 | default: Site Admin Username 70 | SiteAdminUserPassword: 71 | default: Site Admin User Password 72 | SiteAdminUserEmail: 73 | default: Site Admin User Email 74 | VolumeType: 75 | default: Volume Type 76 | InstanceType: 77 | default: Instance Type 78 | ProvisionedIops: 79 | default: Provisioned IOPS 80 | VolumeSize: 81 | default: Volume Size 82 | SubnetId: 83 | default: Subnet Id 84 | VPCID: 85 | default: VPC ID 86 | Conditions: 87 | GovCloudCondition: !Equals 88 | - !Ref 'AWS::Region' 89 | - us-gov-west-1 90 | Io1Set: !Equals 91 | - !Ref 'VolumeType' 92 | - io1 93 | UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] 94 | Mappings: 95 | AWSAMIRegionMap: 96 | AMI: 97 | GHE: GitHub Enterprise Server 3.8.5 98 | ap-northeast-1: 99 | GHE: ami-012ab4feca5d3ef1e 100 | ap-northeast-2: 101 | GHE: ami-0518dd81bc98f7977 102 | ap-northeast-3: 103 | GHE: ami-0518dd81bc98f7977 104 | ap-south-1: 105 | GHE: ami-0236b8ba8751ded3d 106 | ap-southeast-1: 107 | GHE: ami-02568b74f24f1224a 108 | ap-southeast-2: 109 | GHE: ami-02170121ccb823cea 110 | ca-central-1: 111 | GHE: ami-004f792b02ad40411 112 | eu-central-1: 113 | GHE: ami-092ea07812f83727c 114 | eu-west-1: 115 | GHE: ami-001b47277f48b5d64 116 | eu-west-2: 117 | GHE: ami-0fd15952c99ee0c59 118 | sa-east-1: 119 | GHE: ami-04fab7b0f73f78d1f 120 | us-east-1: 121 | GHE: ami-058eafc7ee2581fb6 122 | us-east-2: 123 | GHE: ami-0bc8e3b94c1153260 124 | us-west-1: 125 | GHE: ami-00f9531493726d577 126 | us-west-2: 127 | GHE: ami-06f43a42ec4e01030 128 | Outputs: 129 | AvailabilityZone: 130 | Description: Availability Zone of the newly created EC2 instance 131 | Value: !GetAtt 'EC2Instance.AvailabilityZone' 132 | EC2InstanceId: 133 | Description: InstanceId of the newly created EC2 instance 134 | Value: !Ref 'EC2Instance' 135 | EC2InstanceProfileId: 136 | Description: ID of the Instance Profile for Elastic Beanstalk 137 | Value: !Ref 'EC2InstanceProfile' 138 | EC2RoleId: 139 | Description: ID of the Role for Elastic Beanstalk 140 | Value: !Ref 'EC2InstanceRole' 141 | GHEURL: 142 | Description: URL of the primary instance 143 | Value: !Join 144 | - '' 145 | - - http:// 146 | - !GetAtt 'EC2Instance.PublicIp' 147 | PublicDNS: 148 | Description: Public DNSName of the newly created EC2 instance 149 | Value: !GetAtt 'EC2Instance.PublicDnsName' 150 | PublicIP: 151 | Description: Public IP address of the newly created EC2 instance 152 | Value: !GetAtt 'EC2Instance.PublicIp' 153 | Parameters: 154 | AccessCIDR: 155 | AllowedPattern: (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}) 156 | ConstraintDescription: must be a valid IP CIDR range of the form x.x.x.x/x. 157 | Description: The IP address range that can be used to access to the EC2 instance 158 | MaxLength: '18' 159 | MinLength: '9' 160 | Type: String 161 | GHELicense: 162 | Description: 'GitHub Enterprise License file that is uploaded to the License S3 163 | bucket. Sign up for a trial license here: https://enterprise.github.com/trial' 164 | Type: String 165 | InitialOrganization: 166 | Description: The initial organization to hold the GitHub Enterprise repository 167 | Default: initial-organization 168 | Type: String 169 | InitialRepository: 170 | Description: The initial repository to create 171 | Default: initial-repository 172 | Type: String 173 | InstanceType: 174 | AllowedValues: 175 | - m3.xlarge 176 | - m3.2xlarge 177 | - m4.xlarge 178 | - m4.2xlarge 179 | - c3.2xlarge 180 | - c3.4xlarge 181 | - c3.8xlarge 182 | - c4.2xlarge 183 | - c4.4xlarge 184 | - c4.8xlarge 185 | - r3.large 186 | - r3.xlarge 187 | - r3.2xlarge 188 | - r3.4xlarge 189 | - r3.8xlarge 190 | ConstraintDescription: >- 191 | must be a valid EC2 instance type for GitHub Enterprise: m3.xlarge, m3.2xlarge, 192 | m4.xlarge, m4.2xlarge, c3.2xlarge, c3.4xlarge, c3.8xlarge, c4.2xlarge, c4.4xlarge, 193 | c4.8xlarge, r3.large, r3.xlarge, r3.xlarge, r3.2xlarge, r3.4xlarge, or r3.8xlarge. 194 | Default: m3.xlarge 195 | Description: WebServer EC2 instance type 196 | Type: String 197 | KeyPairName: 198 | ConstraintDescription: must be the name of an existing EC2 KeyPair. 199 | Description: Name of an existing EC2 KeyPair to enable SSH access to the instance 200 | Type: AWS::EC2::KeyPair::KeyName 201 | LicenseLocation: 202 | Description: Name of S3 bucket containing GitHub Enterprise license 203 | Type: String 204 | ManagementPassword: 205 | AllowedPattern: (?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]* 206 | ConstraintDescription: Passwords must be at least 7 characters long and include 207 | at least one number and one upper case letter. 208 | Description: Set the Console password for Github Enterprise (Passwords must be 209 | at least 7 characters long and include at least one number and one upper case 210 | letter) 211 | MinLength: '7' 212 | NoEcho: 'True' 213 | Type: String 214 | ProvisionedIops: 215 | ConstraintDescription: Range is 100 to 20000 for Provisioned IOPS SSD volumes 216 | Description: Set the provisioned IOPs between 100 and 20000. Only set if you are 217 | choosing io1 for your volume type 218 | Type: String 219 | QSS3BucketName: 220 | AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$ 221 | ConstraintDescription: Quick Start bucket name can include numbers, lowercase 222 | letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen 223 | (-). 224 | Default: aws-quickstart 225 | Description: S3 bucket name for the Quick Start assets. Quick Start bucket name 226 | can include numbers, lowercase letters, uppercase letters, and hyphens (-). 227 | It cannot start or end with a hyphen (-). 228 | Type: String 229 | QSS3BucketRegion: 230 | Default: 'us-east-1' 231 | Description: 'The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is hosted. When using your own bucket, you must specify this value.' 232 | Type: String 233 | QSS3KeyPrefix: 234 | AllowedPattern: ^[0-9a-zA-Z-]+(/[0-9a-zA-Z-]+)*/ 235 | ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters, 236 | uppercase letters, hyphens (-), and forward slash (/). It cannot start with 237 | forward slash (/) because is it automatically added. 238 | Default: quickstart-github-enterprise/ 239 | Description: >- 240 | S3 key prefix for the Quick Start assets. Quick Start key prefix can include 241 | numbers, lowercase letters, uppercase letters, hyphens (-), and forward slash 242 | (/). It cannot start with forward slash (/) because it is automatically added. 243 | Type: String 244 | SiteAdminUserEmail: 245 | Description: Site Admin Email address 246 | Type: String 247 | SiteAdminUserPassword: 248 | AllowedPattern: (?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]* 249 | ConstraintDescription: Passwords must be at least 7 characters long and include 250 | at least one number and one upper case letter. 251 | Description: Set the Console password for Github Enterprise (Passwords must be 252 | at least 7 characters long and include at least one number and one upper case 253 | letter) 254 | MinLength: '7' 255 | NoEcho: 'True' 256 | Type: String 257 | SiteAdminUsername: 258 | Description: Set the Site Admin Username 259 | Type: String 260 | SubnetId: 261 | Description: The Public subnet where the GitHub Enterprise instance will be launched 262 | Type: AWS::EC2::Subnet::Id 263 | VPCID: 264 | Description: The VPC to launch the GitHub Enterprise server 265 | Type: AWS::EC2::VPC::Id 266 | VolumeSize: 267 | Default: '100' 268 | Description: The size of the EBS attached volume 269 | Type: String 270 | VolumeType: 271 | AllowedValues: 272 | - gp2 273 | - io1 274 | Description: Choose either GP2 or IO1. IO1 is recommended for more than 500 users 275 | Default: gp2 276 | Type: String 277 | Resources: 278 | GHECloudWatchAlarmInstanceRecovery: 279 | Type: AWS::CloudWatch::Alarm 280 | Properties: 281 | AlarmDescription: Trigger a recovery when instance status check fails for 10 282 | consecutive minutes. 283 | Namespace: AWS/EC2 284 | MetricName: StatusCheckFailed_System 285 | Statistic: Minimum 286 | Period: 60 287 | EvaluationPeriods: 10 288 | ComparisonOperator: GreaterThanThreshold 289 | Threshold: 0 290 | AlarmActions: 291 | - !Join 292 | - '' 293 | - - 'arn:aws:automate:' 294 | - !Ref 'AWS::Region' 295 | - :ec2:recover 296 | Dimensions: 297 | - Name: InstanceId 298 | Value: !Ref 'EC2Instance' 299 | EC2Instance: 300 | Metadata: 301 | AWS::CloudFormation::Init: 302 | config: 303 | files: 304 | /etc/gheadmin.conf: 305 | content: !Join 306 | - '' 307 | - - 'github_console_password:' 308 | - !Ref 'ManagementPassword' 309 | - "\n" 310 | - 'github_s3_bucket:' 311 | - !Ref 'LicenseLocation' 312 | - "\n" 313 | - 'github_adminuser_name:' 314 | - !Ref 'SiteAdminUsername' 315 | - "\n" 316 | - 'github_adminuser_email:' 317 | - !Ref 'SiteAdminUserEmail' 318 | - "\n" 319 | - 'github_adminuser_password:' 320 | - !Ref 'SiteAdminUserPassword' 321 | - "\n" 322 | - 'github_organization:' 323 | - !Ref 'InitialOrganization' 324 | - "\n" 325 | - 'github_repository:' 326 | - !Ref 'InitialRepository' 327 | - "\n" 328 | - 'github_license_file:' 329 | - !Ref 'GHELicense' 330 | - "\n" 331 | group: root 332 | mode: '000400' 333 | user: root 334 | Properties: 335 | BlockDeviceMappings: 336 | - DeviceName: /dev/xvdf 337 | Ebs: 338 | Encrypted: true 339 | Iops: !If 340 | - Io1Set 341 | - !Ref 'ProvisionedIops' 342 | - !Ref 'AWS::NoValue' 343 | VolumeSize: !Ref 'VolumeSize' 344 | VolumeType: !Ref 'VolumeType' 345 | EbsOptimized: true 346 | IamInstanceProfile: !Ref 'EC2InstanceProfile' 347 | ImageId: !FindInMap 348 | - AWSAMIRegionMap 349 | - !Ref 'AWS::Region' 350 | - GHE 351 | InstanceType: !Ref 'InstanceType' 352 | KeyName: !Ref 'KeyPairName' 353 | SecurityGroupIds: 354 | - !Ref 'InstanceSecurityGroup' 355 | SubnetId: !Ref 'SubnetId' 356 | Tags: 357 | - Key: Name 358 | Value: GitHub Enterprise 359 | UserData: !Base64 360 | Fn::Join: 361 | - '' 362 | - - "#!/bin/bash\n" 363 | - "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\ 364 | \ \n" 365 | - "wget https://bootstrap.pypa.io/get-pip.py\n" 366 | - "sudo python get-pip.py\n" 367 | - "sudo pip install awscli\n" 368 | - "sleep 5\n" 369 | - '/usr/local/bin/cfn-init ' 370 | - ' --stack ' 371 | - !Ref 'AWS::StackName' 372 | - ' --resource EC2Instance ' 373 | - ' --region ' 374 | - !Ref 'AWS::Region' 375 | - "\n" 376 | - SRC= 377 | - !Sub 378 | - https://${S3Bucket}.s3.${S3Region}.amazonaws.com/${QSS3KeyPrefix} 379 | - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] 380 | S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] 381 | - "scripts/scripts_userdata.sh \n" 382 | - "ADMININFO='/etc/gheadmin.conf'\n" 383 | - 'curl -L $SRC | bash -s $(cat $ADMININFO| grep github_console_password 384 | | awk -F: ''{print $2}'') ' 385 | - '$(cat $ADMININFO| grep github_s3_bucket | awk -F: ''{print $2}'') ' 386 | - "$(cat $ADMININFO| grep github_license_file | awk -F: '{print $2}');\ 387 | \ \n" 388 | - SetUp= 389 | - !Sub 390 | - https://${S3Bucket}.s3.${S3Region}.amazonaws.com/${QSS3KeyPrefix} 391 | - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] 392 | S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] 393 | - "scripts/adminuser_org_repo.sh \n" 394 | - 'curl -L $SetUp | bash -s $(cat $ADMININFO| grep github_adminuser_name 395 | | awk -F'':'' ''{print $2}'') ' 396 | - '$(cat $ADMININFO| grep github_adminuser_email | awk -F'':'' ''{print 397 | $2}'') ' 398 | - '$(cat $ADMININFO| grep github_adminuser_password | awk -F'':'' ''{print 399 | $2}'') ' 400 | - '$(cat $ADMININFO| grep github_organization | awk -F'':'' ''{print $2}'') ' 401 | - "$(cat $ADMININFO| grep github_repository | awk -F':' '{print $2}');\ 402 | \ \n" 403 | - "echo \"exit code \"$? \n" 404 | - '/usr/local/bin/cfn-signal -e $? ' 405 | - ' ''' 406 | - !Ref 'WaitforGitHubEnterpriseInstall' 407 | - "'\n" 408 | - " rm -f $ADMINNIFO\n" 409 | Type: AWS::EC2::Instance 410 | EC2InstanceProfile: 411 | Properties: 412 | Path: / 413 | Roles: 414 | - !Ref 'EC2InstanceRole' 415 | Type: AWS::IAM::InstanceProfile 416 | EC2InstanceRole: 417 | Properties: 418 | AssumeRolePolicyDocument: 419 | Statement: 420 | - Action: 421 | - sts:AssumeRole 422 | Effect: Allow 423 | Principal: 424 | Service: 425 | - ec2.amazonaws.com 426 | Version: '2012-10-17' 427 | ManagedPolicyArns: 428 | - arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess 429 | Path: / 430 | Type: AWS::IAM::Role 431 | ElasticIP: 432 | Properties: 433 | Domain: vpc 434 | InstanceId: !Ref 'EC2Instance' 435 | Type: AWS::EC2::EIP 436 | GitHubWaitCondition: 437 | DependsOn: EC2Instance 438 | Properties: 439 | Handle: !Ref 'WaitforGitHubEnterpriseInstall' 440 | Timeout: '500' 441 | Type: AWS::CloudFormation::WaitCondition 442 | InstanceSecurityGroup: 443 | Properties: 444 | GroupDescription: Ports needed for GitHub Enterprise 445 | SecurityGroupIngress: 446 | - CidrIp: !Ref 'AccessCIDR' 447 | FromPort: 22 448 | IpProtocol: tcp 449 | ToPort: 22 450 | - CidrIp: !Ref 'AccessCIDR' 451 | FromPort: 8080 452 | IpProtocol: tcp 453 | ToPort: 8080 454 | - CidrIp: !Ref 'AccessCIDR' 455 | FromPort: 122 456 | IpProtocol: tcp 457 | ToPort: 122 458 | - CidrIp: !Ref 'AccessCIDR' 459 | FromPort: 1194 460 | IpProtocol: udp 461 | ToPort: 1194 462 | - CidrIp: !Ref 'AccessCIDR' 463 | FromPort: 161 464 | IpProtocol: udp 465 | ToPort: 161 466 | - CidrIp: !Ref 'AccessCIDR' 467 | FromPort: 443 468 | IpProtocol: tcp 469 | ToPort: 443 470 | - CidrIp: !Ref 'AccessCIDR' 471 | FromPort: 80 472 | IpProtocol: tcp 473 | ToPort: 80 474 | - CidrIp: !Ref 'AccessCIDR' 475 | FromPort: 9418 476 | IpProtocol: tcp 477 | ToPort: 9418 478 | - CidrIp: !Ref 'AccessCIDR' 479 | FromPort: 25 480 | IpProtocol: tcp 481 | ToPort: 25 482 | - CidrIp: !Ref 'AccessCIDR' 483 | FromPort: 8443 484 | IpProtocol: tcp 485 | ToPort: 8443 486 | VpcId: !Ref 'VPCID' 487 | Type: AWS::EC2::SecurityGroup 488 | WaitforGitHubEnterpriseInstall: 489 | Type: AWS::CloudFormation::WaitConditionHandle 490 | --------------------------------------------------------------------------------