deploy
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"package": "a2a-pack",
|
|
||||||
"requested_at": "2026-05-27T18:32:42.811435+00:00",
|
|
||||||
"target_version": "0.1.31"
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
__pycache__
|
|
||||||
*.pyc
|
|
||||||
.venv
|
|
||||||
.git
|
|
||||||
.pytest_cache
|
|
||||||
node_modules
|
|
||||||
.a2a
|
|
||||||
.env
|
|
||||||
.env.local
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
name: build
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths-ignore:
|
|
||||||
- 'deploy/**'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: build image
|
|
||||||
run: |
|
|
||||||
IMG=registry.a2acloud.io/agents/blog-openapi-agent
|
|
||||||
docker build --pull -t "$IMG:$GITHUB_SHA" -t "$IMG:latest" .
|
|
||||||
docker push "$IMG:$GITHUB_SHA"
|
|
||||||
docker push "$IMG:latest"
|
|
||||||
|
|
||||||
- name: bump deploy manifest
|
|
||||||
run: |
|
|
||||||
IMG=registry.a2acloud.io/agents/blog-openapi-agent
|
|
||||||
sed -i "s|image: $IMG:.*|image: $IMG:$GITHUB_SHA|" deploy/20-deployment.yaml
|
|
||||||
sed -i "s|value: $IMG:.*|value: $IMG:$GITHUB_SHA|" deploy/20-deployment.yaml
|
|
||||||
git config user.email "ci@a2a.local"
|
|
||||||
git config user.name "ci"
|
|
||||||
git add deploy/20-deployment.yaml
|
|
||||||
if git diff --staged --quiet; then
|
|
||||||
echo "no manifest changes"
|
|
||||||
else
|
|
||||||
git commit -m "ci: bump image to $GITHUB_SHA"
|
|
||||||
git push origin HEAD:main
|
|
||||||
fi
|
|
||||||
15
Dockerfile
15
Dockerfile
@@ -1,15 +0,0 @@
|
|||||||
FROM registry.a2acloud.io/a2a/a2a-pack-base:latest
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY requirements.txt .
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
|
|
||||||
ENV A2A_ENTRYPOINT=agent:BlogOpenapiAgent
|
|
||||||
ENV PORT=8000
|
|
||||||
EXPOSE 8000
|
|
||||||
|
|
||||||
CMD a2a run --entrypoint "$A2A_ENTRYPOINT" --host 0.0.0.0 --port 8000
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
apiVersion: serving.knative.dev/v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: blog-openapi-agent
|
|
||||||
namespace: agents
|
|
||||||
labels:
|
|
||||||
app: blog-openapi-agent
|
|
||||||
a2a/managed-by: control-plane
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: blog-openapi-agent
|
|
||||||
annotations:
|
|
||||||
autoscaling.knative.dev/minScale: "0"
|
|
||||||
autoscaling.knative.dev/maxScale: "1"
|
|
||||||
autoscaling.knative.dev/metric: concurrency
|
|
||||||
autoscaling.knative.dev/target: "1"
|
|
||||||
spec:
|
|
||||||
containerConcurrency: 1
|
|
||||||
enableServiceLinks: false
|
|
||||||
responseStartTimeoutSeconds: 600
|
|
||||||
timeoutSeconds: 600
|
|
||||||
containers:
|
|
||||||
- name: agent
|
|
||||||
image: registry.a2acloud.io/agents/blog-openapi-agent:fdb7b08b10fc763cee0d020e051f32e13cb6b33d
|
|
||||||
imagePullPolicy: Always
|
|
||||||
env:
|
|
||||||
- name: A2A_AGENT_IMAGE
|
|
||||||
value: registry.a2acloud.io/agents/blog-openapi-agent:fdb7b08b10fc763cee0d020e051f32e13cb6b33d
|
|
||||||
- name: A2A_RENDER_IMAGE
|
|
||||||
value: registry.a2acloud.io/agents/blog-openapi-agent:fdb7b08b10fc763cee0d020e051f32e13cb6b33d
|
|
||||||
- name: A2A_CP_URL
|
|
||||||
value: "http://control-plane.control-plane.svc.cluster.local"
|
|
||||||
- name: A2A_LOGIN_URL
|
|
||||||
value: "https://app.a2acloud.io"
|
|
||||||
- name: A2A_SESSION_COOKIE_NAME
|
|
||||||
value: "a2a_session"
|
|
||||||
- name: A2A_GRANT_VERIFYING_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef: {name: platform-secrets, key: grant_verifying_key}
|
|
||||||
- name: A2A_SANDBOX_URL
|
|
||||||
value: http://sandbox.sandbox.svc.cluster.local:8000
|
|
||||||
- name: A2A_SANDBOX_TIMEOUT_S
|
|
||||||
value: "180"
|
|
||||||
envFrom:
|
|
||||||
- secretRef:
|
|
||||||
name: blog-openapi-agent-agent-secrets
|
|
||||||
optional: true
|
|
||||||
ports:
|
|
||||||
- containerPort: 8000
|
|
||||||
name: http1
|
|
||||||
protocol: TCP
|
|
||||||
readinessProbe:
|
|
||||||
httpGet: {path: /healthz, port: 8000}
|
|
||||||
initialDelaySeconds: 2
|
|
||||||
periodSeconds: 5
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 6
|
|
||||||
successThreshold: 1
|
|
||||||
livenessProbe:
|
|
||||||
httpGet: {path: /healthz, port: 8000}
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 15
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 6
|
|
||||||
resources:
|
|
||||||
requests: {cpu: "200m", memory: "512Mi"}
|
|
||||||
limits: {cpu: "200m", memory: "512Mi"}
|
|
||||||
traffic:
|
|
||||||
- latestRevision: true
|
|
||||||
percent: 100
|
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: blog-openapi-agent
|
|
||||||
namespace: agents
|
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: web,websecure
|
|
||||||
spec:
|
|
||||||
tls:
|
|
||||||
- hosts: [blog-openapi-agent.a2acloud.io]
|
|
||||||
secretName: blog-openapi-agent-a2acloud-io-tls
|
|
||||||
rules:
|
|
||||||
- host: blog-openapi-agent.a2acloud.io
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: blog-openapi-agent
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
Reference in New Issue
Block a user