LinearB On-Prem Agent Post-Deployment Configuration Guide
This guide provides detailed instructions for post-deployment configuration of the LinearB On-Prem Agent. Follow these steps to configure the agent, set up integrations, and enable webhook processing.
Table of Contents
- Prerequisites
- Step 1: Launch Shell in
agent-cliPod - Step 2: Set Up a New Integration
- Step 3: Register Git Repositories
- Step 4: Installing a Git Provider Webhook
Prerequisites
Ensure you have the following before proceeding:
- Access to the Kubernetes cluster with the LinearB On-Prem Agent deployed.
kubectlinstalled and configured for your cluster.- Access to the required credentials and tokens for Git and Jira integrations.
Step 1: Launch Shell in agent-cli Pod
Enter the Pod
The following steps involve configuration after the cluster is up and running. Ensure your kubectl command points to the relevant cluster by running:
To launch a shell inside the agent-cli pod, run:
kubectl exec -n linearb -it $(kubectl get pod -n linearb -l app.kubernetes.io/name=agent-cli -o jsonpath="{.items[0].metadata.name}") -- /bin/bash
Run Basic Health Checks
Once inside the pod shell, verify the agent's connectivity to LinearB Cloud by running:
Expected output:
Running health check for 'LinearB agent API connectivity'...
...
Health check tests summary:
---------------------------------------
LinearB agent API connectivity: True
Step 2: Set Up a New Integration
The following commands should be executed inside the agent-cli pod.
Add a Git Integration
To add a new Git integration, run:
python agent-cli.py add-git-integration \
--provider <provider> \
--token <PAT_token> \
--self_hosted_uri <self_hosted_git_uri> \
--account_id <admin_account_id> \
--token_username <token_username>
- Replace
<provider>withgithub,gitlab, orbitbucket_server. --token_usernameis required forbitbucket_serveronly.- For GitHub, ensure you use a Personal Access Token (classic), as fine-grained tokens are unsupported.
- Use
--git_ssl_no_verify=truefor self-signed certificates, or add the custom root certificate in local-values.yaml.
Test the integration setup by running:
Expected output:
Add a Jira Integration
To add a Jira integration, follow these steps:
-
Create a new application link in Jira:
- Go to Jira Administration > Applications > Application Links.
- Use the following redirect URL:
https://app.linearb.io/public/jira/challenge_callback. - Configure as External application with Read permission.
-
Run the CLI command:
-
Follow the CLI wizard to complete the setup.
Expected response:
Save the <integration id> for later use.
Note you may retrieve the integration id by running:
Step 3: Register Git Repositories
To register repositories with the LinearB agent, use one of the following commands:
-
Single Repository Registration:
-
Multiple Repositories Registration:
Step 4: Installing a Git Provider Webhook
The On-Prem Agent provides an HTTP endpoint to receive real-time webhooks from your Git provider. The endpoint is accessible at <webhook_endpoint> as defined below for K3D and cloud deployments, respectively.
- For K3D a health check endpoint is available at
http://<k3d host address>:8081/health. - For Cloud deployments, the endpoint is accessible at
http://<load-balancer-address>:80/health.
GitHub Organization-Level Webhook
If using GitHub Enterprise, set up an organization-level webhook:
- Refer to the GitHub Organization-Level Webhook Guide.
- Replace the URL with
<webhook_endpoint>/hooks/github?integration_id=<integration_id>and leave the secret empty. - Verify the webhook by checking for a green checkmark.
GitLab Group-Level Webhook
For GitLab, set up a group-level webhook:
- Use the URL
<webhook_endpoint>/hooks/gitlab?integration_id=<integration_id>. - Required triggers: Push Events, Tag Push Events, Comments, and Merge Request Events.
- SSL verification is optional, based on the
.
Bitbucket Webhook Note
Bitbucket Server does not support server-level webhooks. A webhook is automatically created for each repository when added to the LinearB agent.