Skip to content

Commit

Permalink
Merge pull request #55 from leanix/feature/CID-2910/proxy-support
Browse files Browse the repository at this point in the history
CID-2910: Proxy support
  • Loading branch information
mohamedlajmileanix authored Dec 2, 2024
2 parents 7e66997 + ce5a8db commit 3e56ad0
Showing 1 changed file with 48 additions and 2 deletions.
50 changes: 48 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterprise setups and communicates this information to an SAP LeanIX workspace.

## Prerequisites and Installation
## Prerequisites, Installation, and Troubleshooting

### Prerequisites

Expand All @@ -28,6 +28,7 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr
- `GITHUB_APP_ID`: The ID of your GitHub App.
- `PEM_FILE`: The path to your GitHub App's PEM file inside the Docker container.
- `WEBHOOK_SECRET`: The secret used to validate incoming webhook events from GitHub. (Optional, but recommended. [Needs to be set in the GitHub App settings first](https://docs.github.com/en/enterprise-server@3.8/webhooks/using-webhooks/validating-webhook-deliveries).)
- `JAVA_OPTS`: Java options for the agent. Use this to set proxy settings if required.

5. **Start the agent**: To start the agent, run the following Docker command. Replace the variables in angle brackets with your actual values.

Expand All @@ -38,7 +39,7 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr
-e GITHUB_APP_ID=<github_app_id> \
-e PEM_FILE=/privateKey.pem \
-e WEBHOOK_SECRET=<webhook_secret> \
leanix-github-agent
ghcr.io/leanix/leanix-github-agent:dev
```

This command starts the agent and exposes it on port 8000. The agent starts scanning your organizations and repositories.
Expand All @@ -49,6 +50,51 @@ The SAP LeanIX agent discovers self-built software in self-hosted GitHub Enterpr
**Note**: The Docker image for the agent is currently unavailable. It will become available for download once a new version is released. Please check the [Releases](https://github.com/leanix/leanix-github-agent/releases) page for updates.
### Troubleshooting
#### Using an HTTP Proxy System
Add the following properties to the command:
```console
docker run
...
-e JAVA_OPTS="-Dhttp.proxyHost=<HTTP_HOST> -Dhttp.proxyPort=<HTTP_PORT> -Dhttps.proxyHost=<HTTPS_HOST> -Dhttps.proxyPort=<HTTPS_PORT>" \
ghcr.io/leanix/leanix-github-agent:dev
```
> **Note:** Basic authentication is not currently supported.
#### Using an SSL Intercepting Proxy
Build your own Docker image by adding the certificate:
```console
FROM ghcr.io/leanix/leanix-github-agent:dev
USER root
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
COPY YOUR-CERTIFICATE-HERE /usr/local/share/ca-certificates/YOUR-CERTIFICATE-HERE
RUN update-ca-certificates
RUN keytool -import -trustcacerts -keystore $JAVA_HOME/lib/security/cacerts -storepass changeit -noprompt -alias YOUR-CERTIFICATE-HERE -file /usr/local/share/ca-certificates/YOUR-CERTIFICATE-HERE
```
> **Note:** For each certificate you need to insert into the image, add a `COPY` command and a final `RUN` command.
#### Using AMD64 Images on Apple M1
Run the container by providing the following command:
```console
docker run --platform linux/amd64 \
...
ghcr.io/leanix/leanix-github-agent:dev
```
## Support and Feedback
We welcome your feedback, feature suggestions, and bug reports via [GitHub issues](https://github.com/leanix/leanix-github-agent/issues).
Expand Down

0 comments on commit 3e56ad0

Please sign in to comment.