From 9c6e738349256d19ae7603a7929a466b2cbc1855 Mon Sep 17 00:00:00 2001 From: mohamedlajmileanix Date: Mon, 8 Jul 2024 09:13:55 +0200 Subject: [PATCH] CID-2749: update readme file --- README.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c26b95..cb3e407 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,45 @@ SAP LeanIX agent to discover self built software in self-hosted GitHub Enterpris ## Requirements and Setup -*Insert a short description what is required to get your project running...* +### Requirements + +- Docker: The agent is packaged as a Docker image and requires Docker to run. +- GitHub Enterprise Server: The agent is designed to interact with GitHub Enterprise Server. You need access to a GitHub Enterprise Server instance. +- GitHub App: The agent operates as a GitHub App. You need to create a GitHub App in your GitHub Enterprise Server instance. + +### Setup + +1. **Create a GitHub App**: Follow the instructions provided by GitHub to create a new GitHub App in your GitHub Enterprise Server instance. + +2. **Generate a Private Key**: In your GitHub App settings, generate a private key. This will download a PEM file, which the agent will use to authenticate to the GitHub Enterprise environment. + +3. **Install the App**: Install the app on all organizations you want the agent to have access to. + +4. **Configure the Agent**: The agent requires several environment variables to run. These could be passed to the Docker command when starting the agent. The required variables are: + + - `LEANIX_DOMAIN`: Your LeanIX domain. + - `LEANIX_API_TOKEN`: Your LeanIX API token. + - `GITHUB_ENTERPRISE_BASE_URL`: The base URL of your GitHub Enterprise Server instance. + - `GITHUB_APP_ID`: The ID of your GitHub App. + - `PEM_FILE`: The path to your GitHub App's PEM file inside the Docker container. + +5. **Start the Agent**: Run the Docker command to start the agent. Replace `` with your actual values: + + ```bash + docker run -p 8000:8080 \ + -v $(pwd)/path/to/your/privateKey.pem:/privateKey.pem \ + -e LEANIX_DOMAIN= \ + -e LEANIX_API_TOKEN= \ + -e GITHUB_ENTERPRISE_BASE_URL= \ + -e GITHUB_APP_ID= \ + -e PEM_FILE=/privateKey.pem \ + trc-github-enterprise-broker + ``` + + This command starts the agent and exposes it on port 8000. The agent will start scanning your for organisations and repositories. + +**Disclaimer**: The Docker image for the agent is not yet available. It will be available for pulling once a new version is published. Please check the [releases](https://github.com/your-repo/your-project/releases) page for updates. + ## Support, Feedback, Contributing