Skip to content

Commit

Permalink
CID-2749: update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedlajmileanix committed Jul 8, 2024
1 parent 56b9cad commit 9c6e738
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<variable>` with your actual values:

```bash
docker run -p 8000:8080 \
-v $(pwd)/path/to/your/privateKey.pem:/privateKey.pem \
-e LEANIX_DOMAIN=<leanix_domain> \
-e LEANIX_API_TOKEN=<leanix_api_token> \
-e GITHUB_ENTERPRISE_BASE_URL=<github_enterprise_base_url> \
-e GITHUB_APP_ID=<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

Expand Down

0 comments on commit 9c6e738

Please sign in to comment.