Installing GitHub Insights
You can install GitHub Insights and connect the standalone application to GitHub Enterprise.
GitHub Insights is available with GitHub One. Para obtener más información, consulta "Productos de GitHub".
En este artículo
Prerrequisitos
- You must have a GitHub Enterprise license file that has been updated to include GitHub Insights. GitHub will provide the license file when you purchase GitHub Insights.
- GitHub Insights requires a minimum of two machines hosted either in the cloud or locally. For more information, see "System overview for GitHub Insights."
Crear una App GitHub
To connect GitHub Insights to GitHub Enterprise, you must create a App GitHub in an organization on GitHub Enterprise. A slugged version of your app's name will be shown on GitHub Enterprise when your integration takes an action.
-
Sign in to tu instancia de servidor de GitHub Enterprise at
http(s)://HOSTNAME/login
. -
Navigate to the organization you'd like to connect to GitHub Insights.
-
Under your organization name, click Settings.
-
En la barra lateral izquierda, haz clic en App GitHubs.
-
Click New App GitHub.
-
Under "App GitHub name", type a name for the app. Your app cannot have the same name as an existing user or organization, unless the name is your own user or organization name.
-
Under "Homepage URL", type the URL of the machine you will use as the application server for GitHub Insights. For more information, see "System overview for GitHub Insights."
-
Under "User authorization callback URL", type the following, replacing
<application-server-url>
with the URL of the machine you will use as the application server for GitHub Insights and<company-name>
with the name of your company.<application-server-url>/public/applogin/<company-name>
-
Under "Webhook URL", type
<application-server-url>/webhooks/<company-name>
. -
Under "Webhook secret", type a secret, then record the secret for later reference.
-
Under "Permissions", use the drop-down menus and configure the following permissions for the app.
- Repository contents: Read-only
- Repository metadata: Read-only
- Pull requests: Read-only
- Commit statuses: Read-only
- Organization members: Read-only
- Organization projects: Read-only
-
Under "Subscribe to events", select:
- Solicitud de extracción
- Subir
- Repository
-
To enable the App GitHub to access data from any user or organization in tu instancia de servidor de GitHub Enterprise, under "Where can this App GitHub be installed?", select Any account.
-
Click Create App GitHub.
-
Review your app's configuration.
-
Under "Private keys", click Generate a private key.
-
Save the resulting PEM file for later reference.
-
Make note of the following information about your app for later reference.
- App ID
- Client ID
- Client secret
- Private key
- Webhook secret
Instalar GitHub Insights
Installing GitHub Insights requires Docker. The installation script will install Docker if able. If the script is not able to install Docker, the script will attempt to use an existing installation of Docker. If there is no existing installation of Docker on the host machines, the installation will fail.
-
Navigate to the latest release of GitHub Insights on the Releases page for
github/insights-releases
. -
To download the latest release, under "Assets", click
installation.tgz
. -
Unzip the directory.
-
To configure the installation, run the shell script
configure.sh
. The script can be run from any machine that can SSH into the application and import servers and does not need to be run from either host machine. -
Enter the same URL you used for the application server when creating the App GitHub.
-
Enter the SSH user for connecting to the application server.
-
Enter the URL for the machine you will use as the import server for GitHub Insights. For more information, see "System overview for GitHub Insights."
-
Enter the SSH user for connecting to the import server.
-
Enter the path to the PEM key for SSH authentication with the application server.
-
If you want to use a different PEM key for SSH authentication to the import server, enter the path to the PEM key. Otherwise, leave blank.
-
If using a bastion host, enter the path to the public key (
.pub
). Otherwise, leave blank. -
To enable SSL, enter the SSL Cert (
.crt
). If you don't want to enable SSL, leave blank. -
If you chose to enable SSL, enter the SSL Key (
.key
). Otherwise, leave blank. -
If using a bastion host, enter the user and URL in the form of
user@my.bastion.address
. Otherwise, leave blank. -
If users will access GitHub Insights through a gateway or proxy, enter the base URL including the protocol in the form of
protocol://host
. -
The installation configuration is now saved. You will see a message printed to the terminal.
Saving configured settings to /Users/octocat/Projects/insights/install/0.2.9/install_data/.env
-
To start the installation, run the shell script
release-assets/insights.sh
. -
The installation will take a few minutes to run. When complete, you will see a message printed to the terminal.
PLAY RECAP ******************************************** application: ok=20 changed=7 unreachable=0 failed=0 import : ok=29 changed=9 unreachable=0 failed=0
Configurar GitHub Insights
To configure GitHub Insights to connect to Servidor de GitHub Enterprise, you must provide the information you recorded in previous steps.
-
In your browser, navigate to
<application-server-url>/setup
. -
Under "Company Name", type the same company name you used when creating the App GitHub.
-
Under "GitHub API URL", type the URL you use to access GitHub Enterprise.
-
Under "GitHub Insights License", click "Choose Files", then upload your GitHub Enterprise license file.
-
Under "App ID", type the App ID of your App GitHub, which you recorded when creating the app.
-
Under "Client ID", type the client ID of your App GitHub, which you recorded when creating the app.
-
Under "Client Secret", type the client secret of your App GitHub, which you recorded when creating the app.
-
Under "Private Key", type in the private key of your App GitHub, which is contained in the PEM file you downloaded while creating the app.
-
Under "Webhook Secret", type the webhook secret of your App GitHub, which you recorded when creating the app.
-
If you did not provide a SSL certificate during installation, select Skip SSL Certificate Check.
-
Haz clic en Submit (Enviar).
-
Click Log in with GitHub.
-
To authorize the App GitHub and access GitHub Insights, click Authorize App GitHub.