This guide covers using setup-predator-github.sh to populate your GitHub repository with the Predator Helm chart, prd/applications, and configs/services without creating any Kubernetes cluster or ArgoCD. You can optionally add the repository to an existing ArgoCD using a server URL and token.
See also: PREDATOR_SETUP.md for full local development setup (cluster, ArgoCD, Docker Compose).
- Prerequisites
- Create a GitHub App
- Run the Script
- Add Repository to ArgoCD (Optional)
- Manual ArgoCD Repo Add with URL and Token
- Git installed
- jq (e.g.
brew install jqorapt install jq) - openssl (usually pre-installed)
- This repository (BharatMLStack) cloned locally; run the script from
quick-start/ - A GitHub repository (empty or existing) where you want the Predator chart and configs
- A GitHub App with access to that repository (see below)
You must create a GitHub App and install it on your repository so the script can clone and push via an installation token. The steps below are based on PREDATOR_SETUP.md Step 2–5.
- Go to https://github.com/settings/apps
- Click New GitHub App (top right)
- GitHub App name: e.g.
horizon-bot - Homepage URL:
https://github.com(required) - User authorization callback URL: Leave empty
- Webhook URL / secret: Leave empty (optional)
- Repository permissions
- Contents: Read and write (required for clone/push)
- Metadata: Read-only (auto)
- Account permissions: No access
- Only on this account or Any account, as needed
Click Create GitHub App. Note the App ID on the app’s settings page.
- In the app settings, go to Install App
- Click Install for your user/org
- Select the repository that will hold the Helm chart
- After installation, the URL will look like:
https://github.com/settings/installations/100732634
The number at the end is your Installation ID.
- In the app settings, under Private keys, click Generate a private key
- Save the downloaded
.pemfile (e.g.github.pemorhorizon/configs/github.pem)
You now have:
- App ID
- Installation ID
- Private key file path
From the BharatMLStack repo, inside quick-start/:
cd quick-start
./setup-predator-github.shThe script runs interactively (like setup-predator-k8s.sh): it prompts for each value one by one:
- Repository URL (e.g.
https://github.com/username/repo.git) - GitHub App ID
- GitHub App Installation ID
- GitHub App Private Key path (e.g.
horizon/configs/github.pem) - Branch to push to (default:
main) - After pushing, Add this repository to ArgoCD? (y/n) — if yes, then ArgoCD server URL and ArgoCD auth token
You can still pass options on the command line to pre-fill or skip prompts: --repo-url, --app-id, --installation-id, --private-key, --branch, --repo-name, --argocd-server, --argocd-token. See ./setup-predator-github.sh --help.
The script will:
- Obtain a GitHub App installation token
- Clone your repository (specified branch or default)
- Copy into the repo:
predator/1.0.0→1.0.0/prd/applications/(with.gitkeep)horizon/configs/services→configs/services/
- Commit and push
No Docker, Kubernetes, or ArgoCD are required for this step.
If you have an existing ArgoCD and want the script to register the repository there, pass the ArgoCD server URL and an auth token. The script will use the ArgoCD CLI to add the repo with the same GitHub App credentials.
Requirements:
- ArgoCD CLI installed (e.g.
brew install argocdor Argo CD CLI install) - ArgoCD server reachable (e.g. port-forward:
kubectl port-forward svc/argocd-server -n argocd 8087:443) - An ArgoCD token (from ArgoCD UI: User Info → Generate New Token, or
argocd account generate-token)
Example:
./setup-predator-github.sh \
--repo-url https://github.com/myorg/my-repo.git \
--app-id 123 \
--installation-id 456 \
--private-key ./github.pem \
--argocd-server https://localhost:8087 \
--argocd-token <YOUR_ARGOCD_TOKEN>The script will:
- Populate the GitHub repo (as above)
- Log in to ArgoCD with
argocd login <server> --auth-token <token> --insecure - Run
argocd repo add <repo> --name <name> --type git --github-app-id ... --github-app-installation-id ... --github-app-private-key-path ... --insecure
So yes, you can create (register) a repository in ArgoCD at a given ArgoCD URL and token in the same way: use --argocd-server and --argocd-token. The repo is added with GitHub App auth (no need to store a PAT in ArgoCD).
If you prefer not to use the script for ArgoCD, or the script’s ArgoCD step failed:
-
Log in with token:
argocd login <ARGOCD_SERVER> --auth-token <YOUR_TOKEN> --insecure
Example:
argocd login localhost:8087 --auth-token eyJ... --insecure -
Add the repository (GitHub App):
argocd repo add https://github.com/<USER>/<REPO>.git \ --name <REPO_NAME> \ --type git \ --github-app-id <GITHUB_APP_ID> \ --github-app-installation-id <GITHUB_INSTALLATION_ID> \ --github-app-private-key-path <PATH_TO_PEM> \ --insecure
-
Verify:
argocd repo list argocd repo get https://github.com/<USER>/<REPO>.git --insecure
| Goal | Command / step |
|---|---|
| Populate GitHub repo only | ./setup-predator-github.sh --repo-url ... --app-id ... --installation-id ... --private-key ... |
| Same + add repo to ArgoCD | Add --argocd-server <URL> and --argocd-token <TOKEN> |
| ArgoCD repo add by hand | Use Manual ArgoCD Repo Add with your ArgoCD URL and token |
Prerequisites for the script: GitHub App (Steps 2–5 in this doc), jq, and (for ArgoCD step) ArgoCD CLI and token.