Skip to content

Commit 026e368

Browse files
authored
Merge pull request #124 from IBM/deployment-scripts
Initial terraform and ansible scripts, wip
2 parents 338e1e7 + 8f121de commit 026e368

28 files changed

+590
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# .github/workflows/release-chart.yml
2+
name: Release Helm Chart
3+
on:
4+
release:
5+
types: [published] # tag repo, ex: v0.1.1 to trigger
6+
permissions:
7+
contents: read
8+
packages: write
9+
jobs:
10+
chart:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: azure/setup-helm@v4
15+
- name: Login to GHCR
16+
run: echo "${{ secrets.CR_PAT }}" | \
17+
helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
18+
- name: Package & push chart
19+
run: |
20+
helm package charts/mcp-stack
21+
helm push mcp-context-forge-chart-*.tgz \
22+
oci://ghcr.io/ibm/mcp-context-forge

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
*.tgz
2+
*.gz
3+
*.bz
4+
*.bz2
5+
*.tar
16
TODO.md
27
minikube-*
38
.htpasswd

deployment/CHARTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Publishing the Helm chart for MCP Context-Forge
2+
3+
## Lint & package:
4+
5+
```bash
6+
helm lint .
7+
helm package . # → mcp-context-forge-chart-0.1.1.tgz
8+
```
9+
10+
## Log in to GHCR:
11+
12+
```bash
13+
echo "${CR_PAT}" | \
14+
helm registry login ghcr.io -u <your-github-user> --password-stdin
15+
# Login Succeeded
16+
```
17+
18+
## Push the chart (separate package path)
19+
20+
```bash
21+
helm push mcp-*-0.1.1.tgz oci://ghcr.io/ibm/mcp-context-forge
22+
```
23+
24+
## Link the package to this repo (once)
25+
26+
1. In GitHub → **Packages**`mcp-context-forge-chart`
27+
2. **Package Settings****Manage package**
28+
3. "**Add repository**" → pick the current repo and save
29+
30+
This lets others see the chart in the repo's **Packages** sidebar.
31+
32+
---
33+
34+
## Verify & use
35+
36+
```bash
37+
helm pull oci://ghcr.io/ibm/mcp-context-forge-chart --version 0.1.1
38+
```

deployment/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Deployment scripts
2+
3+
This directory will host charts, k8s, ansible and terraform scripts.
4+
5+
The charts will be published here:
6+
7+
https://github.com/orgs/IBM/packages/container/package/mcp-context-forge%2Fmcp-stack

deployment/WORK_IN_PROGRESS

Whitespace-only changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# MCP Context-Forge – Ansible Deployment
2+
3+
This folder spins up:
4+
5+
1. A resource-group + VPC IKS cluster
6+
2. Databases-for-PostgreSQL & Databases-for-Redis
7+
3. Service-keys → Kubernetes Secrets
8+
4. The container `ghcr.io/ibm/mcp-context-forge:v0.1.1` behind an Ingress URL
9+
10+
## Prerequisites
11+
12+
* **IBM Cloud CLI** authenticated (`ibmcloud login …`)
13+
* Ansible ≥ 2.12 with the Galaxy collections in `requirements.yml`
14+
* `helm`, `kubectl`, and `ibmcloud ks` binaries in `$PATH`
15+
16+
## One-liner
17+
18+
```bash
19+
cd ansible
20+
ansible-playbook site.yml \
21+
-e region=eu-gb \
22+
-e prefix=demo
23+
```
24+
25+
The play will finish with the public URL:
26+
27+
```
28+
https://gateway.<prefix>.apps.<region>.containers.appdomain.cloud
29+
```
30+
31+
---
32+
33+
### Using the playbook
34+
35+
```bash
36+
# Bootstrap collections & run
37+
ansible-galaxy install -r ansible/requirements.yml
38+
ansible-playbook ansible/site.yml
39+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[defaults]
2+
inventory = ./inventory.yml
3+
stdout_callback = yaml
4+
retry_files_enabled = False
5+
host_key_checking = False
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# IBM Cloud
2+
region: eu-gb
3+
prefix: mcpgw
4+
k8s_workers: 1
5+
cluster_flavor: bx2.4x16
6+
kube_version: "1.29"
7+
8+
# Databases
9+
postgres_version: "14"
10+
redis_version: "7"
11+
12+
# Application
13+
gateway_image: "ghcr.io/ibm/mcp-context-forge:v0.1.1"
14+
gateway_replicas: 2
15+
ingress_class: public-iks-k8s-nginx
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
all:
2+
hosts:
3+
localhost:
4+
ansible_connection: local
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
collections:
2+
- name: ibm.cloudcollection # IBM Cloud wrapper modules
3+
version: ">=1.0.0"
4+
- name: kubernetes.core # k8s + helm modules
5+
version: ">=5.3.0"
6+
- name: community.kubernetes # alternative helm/k8s helpers
7+
version: ">=1.2.1"
8+
- name: community.general # random-password lookup
9+
version: ">=8.0.0"

0 commit comments

Comments
 (0)