Create a host - Developer Tools console

Create a host

You can use the AWS Management Console or the AWS Command Line Interface (AWS CLI) to create a connection to a third-party code repository that is installed on your infrastructure. For example, you might have GitHub Enterprise Server running as a virtual machine on an Amazon EC2 instance. Before you create a connection to GitHub Enterprise Server, you create a host to use for the connection.

Before you begin:

  • You must have already created a network or virtual private cloud (VPC).

  • You must have already created your instance and, if you plan to connect with your VPC, launched your instance into your VPC.

For more information about network configuration for your host resource, see Troubleshooting VPC configuration for your host.

To use the console to create a host, use the host and connection creation steps for GitHub Enterprise Server in Create a host for a connection (console).

Important

AWS CodeStar Connections does not support GitHub Enterprise Server version 2.22.0 due to a known issue in the release. For more information, see the release notes Known Issues list at https://enterprise.github.com/releases/series/2.22.

Create a host for a connection (console)

For connections to GitHub Enterprise Server, you use a host to represent the endpoint for the infrastructure where your third-party provider is installed. After you finish creating the host, you return to the Create a connection flow.

Note

You only create a host once per GitHub Enterprise Server account. All of your connections to a specific GitHub Enterprise Server account will use the same host.

To create a host

  1. Sign in to the AWS Management Console, and open the AWS Developer Tools console at https://console.aws.amazon.com/codesuite/settings/connections.

  2. On the Hosts tab, choose Create host.

  3. In Host name, enter the name you want to use for your host.

  4. In Select a provider, choose GitHub Enterprise Server.

  5. In Endpoint, enter the endpoint for the infrastructure where your provider is installed.

  6. If you launched your instance into an Amazon VPC and you want to connect with your VPC, choose Use a VPC. Otherwise, choose No VPC.

    
                Console screenshot showing Create host settings page with no
                    VPC.
  7. If you have launched your instance into an Amazon VPC and you want to connect with your VPC, choose Use a VPC and complete the following.

    1. In VPC ID, choose your VPC ID. Make sure to choose the VPC for the infrastructure where your GitHub Enterprise Server instance is installed or a VPC with access to your GitHub Enterprise Server instance through VPN or Direct Connect.

    2. Under Subnet ID, choose Add. In the field, choose the subnet ID you want to use for your host. You can choose up to 10 subnets.

      Make sure to choose the subnet for the infrastructure where your GitHub Enterprise Server instance is installed or a subnet with access to your installed GitHub Enterprise Server instance through VPN or Direct Connect.

    3. Under Security group IDs, choose Add. In the field, choose the security group you want to use for your host. You can choose up to 10 security groups.

      Make sure to choose the security group for the infrastructure where your GitHub Enterprise Server instance is installed or a security group with access to your installed GitHub Enterprise Server instance through VPN or Direct Connect.

    4. If you have a private VPC configured, and you have configured your GitHub Enterprise Server instance to perform TLS validation using a non-public certificate authority, in TLS certificate, enter your certificate ID. The TLS Certificate value should be the public key of the certificate.

      
                        Console screenshot showing Create host settings page for VPC
                            options.
  8. Choose Create host.

  9. After the host details page displays, the host status changes as the host is created.

    Note

    If your host setup includes a VPC configuration, allow several minutes for provisioning of host network components.

    Wait for your host to reach a Pending status, and then complete the setup. For more information, see Set up a pending host.

    
                Console screenshot showing host details with the host in Pending
                    status.

Create a host (CLI)

You can use the AWS Command Line Interface (AWS CLI) to create a host for installed connections.

Note

You only create a host once per GitHub Enterprise Server account. All of your connections to a specific GitHub Enterprise Server account will use the same host.

You use a host to represent the endpoint for the infrastructure where your third-party provider is installed. After you complete the host creation with the CLI, the host is in Pending status. You then set up, or register, the host to move it to an Available status. After the host is available, you complete the steps to create a connection.

To do this, use the create-host command.

Important

A host created through the AWS CLI is in Pending status by default. After you create a host with the CLI, use the console or the CLI to set up the host to make its status Available.

To create a host

  1. Open a terminal (Linux, macOS, or Unix) or command prompt (Windows). Use the AWS CLI to run the create-host command, specifying the --name, --provider-type, and --provider-endpoint for your connection. In this example, the third-party provider name is GitHubEnterpriseServer and the endpoint is my-instance.dev.

    aws codestar-connections create-host --name MyHost --provider-type GitHubEnterpriseServer --provider-endpoint "https://my-instance.dev"

    If successful, this command returns the host Amazon Resource Name (ARN) information similar to the following.

    { "HostArn": "arn:aws:codestar-connections:us-west-2:account_id:host/My-Host-28aef605" }

    After this step, the host is in PENDING status.

  2. Use the console to complete the host setup and move the host to an Available status. For more information, see Set up a pending host.