This article explains how to install the Drone server for GitHub Enterprise. The server is packaged as a minimal Docker image distributed on DockerHub.
Preparation
Create an OAuth Application
Create a GitHub OAuth application. The Consumer Key and Consumer Secret are used to authorize access to GitHub resources.
Create a Shared Secret
Create a shared secret to authenticate communication between runners and your central Drone server.
You can use openssl to generate a shared secret:
$ openssl rand -hex 16
bea26a2221fd8090ea38720fc445eca6
Download
The Drone server is distributed as a lightweight Docker image. The image is self-contained and does not have any external dependencies. The latest tag will ensure the latest version of Drone.
$ docker pull drone/drone:2
Configuration
The Drone server is configured using environment variables. This article references a subset of configuration options, defined below. See Configuration for a complete list of configuration options.
-
- DRONE_GITHUB_CLIENT_ID
- Required string value provides your GitHub oauth Client ID.
-
- DRONE_GITHUB_CLIENT_SECRET
- Required string value provides your GitHub oauth Client Secret.
-
- DRONE_GITHUB_SERVER
- Required url value provides your GitHub Enterprise server address. For example
https://github.commpany.com
.
-
- DRONE_GIT_ALWAYS_AUTH
- Optional boolean value configures Drone to authenticate when cloning public repositories. This should only be enabled when using GitHub Enterprise with private mode enable.
-
- DRONE_RPC_SECRET
- Required string value provides the shared secret generated in the previous step. This is used to authenticate the rpc connection between the server and runners. The server and runner must be provided the same secret value.
-
- DRONE_SERVER_HOST
- Required string value provides your external hostname or IP address. If using an IP address you may include the port. For example
drone.company.com
.
-
- DRONE_SERVER_PROTO
- Required string value provides your external protocol scheme. This value should be set to http or https. This field defaults to https if you configure ssl or acme.
Start the Server
The server container can be started with the below command. The container is configured through environment variables. For a full list of configuration parameters, please see the configuration reference.
|
|
Install Runners
Once your server is up and running you will need to install runners to execute your build pipelines. See our runner installation documentation for detailed installation instructions.
Install Runners