GitHub Enterprise on AWS

Partner Solution Deployment Guide

QS

August 2023
Lee Faus, Daniel Hwang, Cory Vander Jagt, and Christian Weber, GitHub, Inc.
Erin McGill, Tony Vattathil, and Dave May, Amazon Web Services

Refer to the GitHub repository to view source files, report bugs, submit feature ideas, and post feedback about this Partner Solution. To comment on the documentation, refer to Feedback.

This Partner Solution was created by GitHub, Inc. in collaboration with Amazon Web Services (AWS). Partner Solutions are automated reference deployments that help people deploy popular technologies on AWS according to AWS best practices. If you’re unfamiliar with AWS Partner Solutions, refer to the AWS Partner Solution General Information Guide.

Overview

This guide provides instructions for deploying the GitHub Enterprise Partner Solution reference architecture on the AWS Cloud. Partner Solutions 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.

This Partner Solution is for system administrators and IT professionals who want to deploy GitHub Enterprise on a virtual machine hosted in the AWS Cloud. Deploying GitHub Enterprise on AWS provides a configurable infrastructure for your coding and deployment tasks. Additional details about GitHub Enterprise are available at https://github.com/business.

GitHub Enterprise is a development and collaboration platform that enables developers to build and share software easily and effectively. Development teams of all sizes, from small startups to teams of thousands, use GitHub Enterprise to facilitate their software development and deployment tasks.

GitHub Enterprise provides the following features:

  • The GitHub Flow: Developers can use the same asynchronous workflow created by the open source community to collaborate on projects. This workflow encourages a culture of experimentation without risk. For more information about the GitHub Flow, see the GitHub Enterprise website.

  • Integrated platform: At GitHub, we use GitHub Enterprise across the entire development process, which enables us to release and deploy our code dozens of times per day. This platform for continuous integration and deployment enables you to build and ship better software faster.

  • Transparent collaboration: Pull requests let developers interactively learn from one another during the development process. Whether they’re discussing the whole project or a single line of code, GitHub Enterprise displays the relevant information in a clean, timeline-style interface.

  • Advanced monitoring: You can use GitHub Pulse to see a snapshot of everything that’s happened in your project repository during the past week, or visit the Activity Dashboard to view graphs that illustrate work across projects. Advanced monitoring can include Simple Network Management Protocol (SNMP), collectd, and log forwarding on the appliance as well. For details, see the GitHub Enterprise documentation.

  • Auditing and compliance: Over time, your organization might have developed crucial policies around permissions and security auditing. You can use the Commit Amazon Web Services – GitHub Enterprise on the AWS Cloud June 2017 Status API in GitHub Enterprise to specify the unique merge conditions necessary for your organization’s compliance requirements. GitHub Enterprise also provides in-depth monitoring and auditing for administrators. For details, see the GitHub Enterprise documentation.

  • Smarter version control: GitHub Enterprise is built on Git, which is a distributed version control system that supports non-linear workflows on projects of all sizes.

Costs and licenses

There is no cost to use this Partner Solution, but you will be billed for any AWS services or resources that this Partner Solution deploys. For more information, refer to the AWS Partner Solution General Information Guide.

This Partner Solution requires a trial version of GitHub Enterprise, which is available for free from GitHub.

Architecture

Deploying this Partner Solution with default parameters builds the following GitHub Enterprise environment in the AWS Cloud.

Architecture
Figure 1. Partner Solution architecture for GitHub Enterprise on AWS

As shown in Figure 1, the Quick Start sets up the following:

  • A virtual private cloud (VPC) with a single Availability Zone and one public subnet.*

  • An Internet gateway to allow access to the Internet.*

  • In the public subnet, a GitHub Enterprise EC2 instance with an attached, customizable EBS volume.

  • An Amazon CloudWatch monitoring resource that will automatically restore the GitHub Enterprise EC2 instance if it becomes unresponsive.

  • An IAM role with the necessary permissions to manage access to resources.

  • A security group to enable communication within the VPC and to interact with the GitHub Enterprise EC2 instance.

  • A sample Github organization and repository you can use to test the deployment.

* The template that deploys this Partner Solution into an existing VPC skips the components marked by asterisks and prompts you for your existing VPC configuration.

Deployment options

This Partner Solution provides the following deployment options:

This Partner Solution provides separate templates for these options. It also lets you configure Classless Inter-Domain Routing (CIDR) blocks, instance types, and GitHub Enterprise settings.

Predeployment steps

This Partner Solution requires a license to use GitHub Enterprise. You can fill out the form at https://enterprise.github.com/sn-trial to sign up for a free, 45-day trial license for GitHub Enterprise.

The Partner Solution also requires Git, which is the open source version control system underlying GitHub Enterprise. Please install Git from https://git-scm.com/ before you deploy the Partner Solution.

Prepare your AWS account

  1. If you don’t already have an AWS account, create one at https://aws.amazon.com by following the on-screen instructions.

  2. Use the region selector in the navigation bar to choose the AWS Region where you want to deploy GitHub Enterprise on AWS.

  3. Create a key pair in your preferred Region.

  4. If necessary, request a 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 default limit with this reference deployment.

Request a GitHub Enterprise Trial License

  1. Fill out the form at https://enterprise.github.com/sn-trial to sign up for a free, 45-day trial license for GitHub Enterprise.

  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.

Deployment steps

  1. Sign in to your AWS account, and launch this Partner Solution, as described under Deployment options. The AWS CloudFormation console opens with a prepopulated template.

  2. Choose the correct AWS Region, and then choose Next.

  3. On the Create stack page, keep the default setting for the template URL, and then choose Next.

  4. 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. When you finish reviewing and customizing the parameters, choose Next.

    Unless you’re customizing the Partner Solution templates or are instructed otherwise in this guide’s Predeployment section, don’t change the default settings for the following parameters: QSS3BucketName, QSS3BucketRegion, and QSS3KeyPrefix. Changing the values of these parameters will modify code references that point to the Amazon Simple Storage Service (Amazon S3) bucket name and key prefix. For more information, refer to the AWS Partner Solutions Contributor’s Guide.
  5. On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you finish, choose Next.

  6. On the Review page, review and confirm the template settings. Under Capabilities, select all of the check boxes to acknowledge that the template creates AWS Identity and Access Management (IAM) resources that might require the ability to automatically expand macros.

  7. Choose Create stack. The stack takes about 15 minutes to deploy.

  8. Monitor the stack’s status, and when the status is CREATE_COMPLETE, the GitHub Enterprise deployment is ready.

  9. To view the created resources, choose the Outputs tab.

Postdeployment steps

Test the deployment

The Partner Solution sets up a sample organization and repository during the deployment process. You can test the deployment by accessing the GitHub Enterprise EC2 instance, accessing the sample repository, and cloning it.

  1. Use the URL of the primary instance displayed in the Outputs tab for the stack to view the resources that were created.

  2. Log in to GitHub Enterprise. Enter the site administrator user name and password you provided in the Partner Solution parameters.

Architecture
Figure 2. GitHub Enterprise login
  1. Upload a deploy key. This is an SSH key that gives you access to the sample GitHubrepository.

    • Navigate to http://<githuburl>/setting/keys.

    • In the sidebar, choose SSH and GPG keys.

    • Choose New SSH key.

      • For Title, give your key a descriptive name.

      • In the Key field, paste your public key. This key is typically found in~/.ssh/id_rsa.pub.

      • Choose Add SSH key

Architecture
Figure 3. Adding an SSH key
  1. Clone your GitHub repository.

    • Navigate back to the main page by choosing the GitHub Enterprise logoon the navigation bar.

    • Switch dashboard context by selecting the organization name. This is the organization you specified in the Partner Solution parameters.

Architecture
Figure 4. Finding the GitHub repository created by the Partner Solution
  1. Select the repository name. This is the repository you specified in the Partner Solution parameters in step 3 (repo1 in the following figure).

Architecture
Figure 5. Choosing the sample repository
  1. Choose Clone or download, and then copy the Git URL that’s displayed by choosing the Clipboard icon

Architecture
Figure 6. Cloning the repository
  1. Open a terminal shell. (This requires that you install Git on your workstation, as instructed in the Prerequisites section.)

  2. Use the Git CLI to clone your repository:

git clone git@13.58.62.155:quickstart-created-repo/repo1.git
Architecture
Figure 7. Successfully cloned repository

To try out additional GitHub Enterprise features, follow the instructions in the GitHub Enterprise documentation.

Troubleshooting

For troubleshooting common Partner Solution issues, refer to the AWS Partner Solution General Information Guide and Troubleshooting CloudFormation.

Additional Resources

GitHub Enterprise

Customer responsibility

After you deploy a Partner Solution, confirm that your resources and services are updated and configured—including any required patches—to meet your security and other needs. For more information, refer to the Shared Responsibility Model.

Feedback

To submit feature ideas and report bugs, use the Issues section of the GitHub repository for this Partner Solution. To submit code, refer to the Partner Solution Contributor’s Guide. To submit feedback on this deployment guide, use the following GitHub links:

Notices

This document is provided for informational purposes only. It represents current AWS product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS products or services, each of which is provided "as is" without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.

The software included with this paper is 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 https://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "as is" basis, without warranties or conditions of any kind, either expressed or implied. Refer to the License for specific language governing permissions and limitations.