To install GitHub Enterprise on Azure, you must deploy onto a DS-series instance and use Premium-LRS storage.

In this guide

Prerequisites

  • You must have a GitHub Enterprise license file. To download an existing license file or request a trial license, visit enterprise.github.com. For more information, see "License files."

  • You must have an Azure account capable of provisioning new machines. For more information, see the Microsoft Azure website.

  • Most actions needed to launch your VM may also be performed using the Azure Portal, however we recommend installing the Azure command line interface (CLI) for initial setup. Examples using the Azure CLI 2.0 are included below. For more information, see Azure's guide "Install Azure CLI 2.0."

Hardware considerations

GitHub Enterprise requires a persistent data disk separate from the root disk. For more information, see "System overview."

Based on your seat count, we recommend this hardware configuration:

Seats vCPUs Memory Attached Storage Root Storage
10-500 2 16 GB 100 GB 200 GB
500-3000 4 32 GB 250 GB 200 GB
3000-5000 8 64 GB 500 GB 200 GB
5000-8000 12 72 GB 750 GB 200 GB
8000-10000+ 16 128 GB 1000 GB 200 GB

These are minimum recommendations. More resources may be required depending on your usage, such as user activity and selected integrations.

Note: The root disk can be resized by building a new appliance. For more information, see "Increasing storage capacity."

Warning: We recommend you use webhooks to fetch repository changes for continuous integration (CI) or similar systems. Regular automatic checks, or polling, will significantly reduce the scalability of your instance. For more information, see "About webhooks"

Determining the VM type

Before launching your GitHub Enterprise instance on Azure, you'll need to determine the type of virtual machine (VM) that best fits the needs of your organization.

Supported VM types and regions

The GitHub Enterprise appliance requires a premium storage data disk, and is supported on any Azure VM that supports premium storage. For more information, see "Supported VMs" in the Azure documentation. For general information about available VMs, see the Azure virtual machines overview page.

GitHub Enterprise supports any region that supports your VM type. For more information about the supported regions for each VM, see Azure's "Products available by region."

Recommended VM types

You can use any supported VM type, however we recommend these types based on your seat count:

Seat Range Recommended Type
10 - 500 Standard_DS3_v2
500 - 3000 Standard_DS12_v2
3000 - 8000 Standard_DS14_v2
8000 - 10000+ Standard_DS15_v2

Note: You can always scale up your CPU or memory by resizing your instance. However, because resizing your CPU or memory requires downtime for your users, we recommend over-provisioning resources to account for scale.

Creating the GitHub Enterprise VM

To create the instance, you'll need to import the GitHub Enterprise image to your virtual machine and attach an additional storage volume for your instance data. For more information, see "Hardware considerations."

Note: You can encrypt the data disk to gain an extra level of security and ensure that any data you write to your instance is protected. There is a slight peformance impact when using encrypted disks. If you decide to encrypt your volume, we strongly recommend doing so before starting your instance for the first time. For more information, see Azure's guide on Disk Encryption for Windows and Linux IaaS VMs.

Warning: If you decide to enable encryption after you've configured your instance, you will need to migrate your data to the encrypted volume, which will incur some downtime for your users.

  1. Find the most recent GitHub Enterprise appliance image. For more information about the vm image list command, see "az vm image list" in the Microsoft documentation.

    az vm image list --all -f GitHub-Enterprise | grep '"urn":' | sort -V
    
  2. Create a new VM using the appliance image you found. For more information, see "az vm create" in the Microsoft documentation.

    Pass in options for the name of your VM, the resource group, the size of your VM, the name of your preferred Azure region, the name of the appliance image VM you listed in the previous step, and the storage SKU for premium storage. For more information about resource groups, see "Resource groups" in the Microsoft documentation.

    az vm create -n VM_NAME -g RESOURCE_GROUP --size VM_SIZE -l REGION --image APPLIANCE_IMAGE_NAME --storage-sku Premium_LRS
    
  3. Configure the security settings on your VM to open up required ports. For more information, see "az vm open-port" in the Microsoft documentation. See the table below for a description of each port to determine what ports you need to open.

    az vm open-port -n VM_NAME -g RESOURCE_GROUP --port PORT_NUMBER
    

    This table identifies what each port is used for:

    Port Service Description
    22 SSH Git over SSH access. Clone, fetch, and push operations to public/private repositories supported.
    25 SMTP SMTP with encryption (STARTTLS) support.
    80 HTTP Web application access. All requests are redirected to the HTTPS port when SSL is enabled.
    122 SSH Instance shell access. The default SSH port (22) is dedicated to application git+ssh network traffic.
    161/UDP SNMP Required for network monitoring protocol operation.
    443 HTTPS Web application and Git over HTTPS access.
    1194/UDP VPN Secure replication network tunnel in High Availability configuration.
    8080 HTTP Plain-text web based Management Console. Not required unless SSL is disabled manually
    8443 HTTPS Secure web based Management Console. Required for basic installation and configuration.
    9418 Git Simple Git protocol port. Clone and fetch operations to public repositories only. Unencrypted network communication.
  4. Create and attach a new unencrypted data disk to the VM, and configure the size based on your seat count. For more information, see "az vm disk attach" in the Microsoft documentation.

    Pass in options for the name of your VM (for example, ghe-acme-corp), the resource group, the premium storage SKU, the size of the disk (for example, 100), and a name for the resulting VHD.

    az vm disk attach --vm-name VM_NAME -g RESOURCE_GROUP --sku Premium_LRS --new -z SIZE_IN_GB --disk ghe-data.vhd
    

Configuring the GitHub Enterprise VM

  1. Before configuring the VM, you must wait for it to enter ReadyRole status. Check the status of the VM with the vm list command. For more information, see "az vm list" in the Microsoft documentation.

    az vm list -d VM_NAME
    info:    Executing command vm list
    + Getting virtual machines
    data:    Name      Status     Location   DNS Name               IP Address
    data:    --------  ---------  ---------  ---------------------  ------------
    data:    VM_NAME   ReadyRole  West US    VM NAME.DOMAIN         111.222.111.222
    info:    vm list command OK
    
  2. Copy the VM's public DNS name, and paste it into a web browser.

  3. At the prompt, upload your license file and set a management console password. For more information, see "License files."

  4. In the the web-based management console, configure and save your desired settings. For more information, see "Configuring the GitHub Enterprise appliance."

  5. The instance will restart automatically.

  6. Click Visit your instance.

Further reading