Skip to content

Commit fa50b29

Browse files
committed
Add jac-scale deployment config and CI workflow
- Add [plugins.scale.kubernetes] section to jac.toml with app_name and namespace - Add GitHub Actions workflow for deploying to jaseci-cluster EKS via jac-scale
1 parent e9fbfea commit fa50b29

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Deploy jac-mcp-playground with jac-scale
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
id-token: write
10+
contents: read
11+
12+
jobs:
13+
deploy-jac-mcp-playground:
14+
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/jac-mcp-playground-') || startsWith(github.ref, 'refs/tags/v')
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
id-token: write
19+
contents: read
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Configure AWS Credentials
26+
uses: aws-actions/configure-aws-credentials@v4.2.0
27+
with:
28+
aws-region: us-east-2
29+
role-to-assume: arn:aws:iam::776241927220:role/GitHubActionsJaseciDeployRole
30+
role-session-name: GitHubActions-JacMcpPlayground
31+
audience: sts.amazonaws.com
32+
33+
- name: Update kubeconfig for EKS
34+
run: |
35+
aws eks update-kubeconfig --region us-east-2 --name jaseci-cluster
36+
kubectl config current-context
37+
38+
- name: Set up Python 3.12
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: '3.12'
42+
43+
- name: Install Jaseci packages
44+
run: |
45+
pip install --upgrade pip
46+
pip install jaclang jac-client jac-scale
47+
48+
- name: Deploy jac-mcp-playground with jac-scale
49+
run: |
50+
jac start main.jac --scale
51+
52+
- name: Verify deployment
53+
run: |
54+
echo "Checking deployment status..."
55+
kubectl get deployments -n jac-mcp-playground
56+
kubectl get services -n jac-mcp-playground
57+
kubectl get pods -n jac-mcp-playground
58+
59+
- name: Deployment Summary
60+
if: always()
61+
run: |
62+
echo "## jac-mcp-playground Deployment Summary" >> $GITHUB_STEP_SUMMARY
63+
echo "### Configuration" >> $GITHUB_STEP_SUMMARY
64+
echo "- **App Name**: jac-mcp-playground" >> $GITHUB_STEP_SUMMARY
65+
echo "- **Namespace**: jac-mcp-playground" >> $GITHUB_STEP_SUMMARY
66+
echo "- **Cluster**: jaseci-cluster" >> $GITHUB_STEP_SUMMARY
67+
echo "- **Region**: us-east-2" >> $GITHUB_STEP_SUMMARY
68+
echo "- **Triggered By**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
69+
if [[ "${{ github.event_name }}" == "release" ]]; then
70+
echo "- **Release Tag**: ${{ github.event.release.tag_name }}" >> $GITHUB_STEP_SUMMARY
71+
fi
72+
echo "" >> $GITHUB_STEP_SUMMARY
73+
echo "### Deployment Status" >> $GITHUB_STEP_SUMMARY
74+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
75+
kubectl get all -n jac-mcp-playground 2>&1 >> $GITHUB_STEP_SUMMARY || echo "Unable to fetch deployment status" >> $GITHUB_STEP_SUMMARY
76+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

jac.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ zod = "^3.23.0"
3838

3939
[dev-dependencies]
4040
watchdog = ">=3.0.0"
41+
42+
[plugins.scale.kubernetes]
43+
app_name = "jac-mcp-playground"
44+
namespace = "jac-mcp-playground"

0 commit comments

Comments
 (0)