aiven_application_deploy
Deploy a Dockerized application to Aiven. Creates an Aiven app service that pulls, builds, and runs the Docker image.
Mandatory pre-deploy verification (read-only checks — do NOT create, push, or modify anything)
Inspect the local project files and confirm each applicable item. Report findings to the user. Do not call this tool until the user confirms all checks pass.
repository_urlvisibility → fetch repository metadata and check theprivatefield. Do not infer from file access — being able to read files tells you nothing about visibility. If you cannot determine it, ask the user.- VCS credentials (private repos only) → if the repo is private, call
aiven_vcs_integration_list(project), then for each integration callaiven_vcs_integration_repository_listand find the repo whosesource_urlmatches (strip trailing.git, lowercase both sides). If matched, use the resolvedvcs_integration_idandremote_repository_id— do NOT ask the user for these. If no match found, continue remaining checks but do NOT call this tool; after all checks, tell the user: "⚠️ This repository is private but is not connected to Aiven. Please connect your GitHub account via the Aiven Console and grant access to this repo, then try again." build_path→ verify Dockerfile exists, containsEXPOSEmatchingportparam, hasCMD/ENTRYPOINTport→ verify app source binds to0.0.0.0, notlocalhost/127.0.0.1service_integrations→ for each entry, verify the source service is RUNNING (aiven_service_get); verify app reads the configured env var names- PostgreSQL/Valkey SSL → the deploy tool injects
PROJECT_CA_CERT(base64-encoded Aiven CA cert). App code MUST stripsslmodefrom the connection URL (pg v8 ignores thessloption whensslmodeis in the URL) and use the CA cert for proper TLS. Required pattern for Node.js pg client:
const url = new URL(process.env.DATABASE_URL);
url.searchParams.delete('sslmode');
const pool = new pg.Pool({
connectionString: url.toString(),
ssl: { ca: Buffer.from(process.env.PROJECT_CA_CERT, 'base64').toString() },
});Verify this pattern exists in the source before deploying. If missing, add it and push before calling this tool.
- OpenSearch SSL → Aiven OpenSearch uses a publicly-trusted TLS certificate. No
PROJECT_CA_CERTis injected and none is needed. App code should connect using theOPENSEARCH_URLdirectly without any custom CA cert (the default system trust store is sufficient). app_service_name→ verify target app is RUNNING (aiven_service_get); source readsapp_env_keyenv varrepository_url→ ask the user to provide the repo URL and confirm code is pushed tobranch.gitignore→ verifynode_modules/anddist/are listed so they are not pushed to the repo- Dockerfile → use
npm install(notnpm ci) and onlyCOPY package.json— lockfiles may not be in the repo project_vpc_id→ only when the user explicitly asks to deploy into a VPC. Callaiven_project_vpc_list, show options, and pass the chosen ID. Do NOT set this unless the user requested VPC — default deploys omit it and the tool sendsproject_vpc_id: nullto avoid auto-VPC placement
Example Dockerfile for a TypeScript Node.js app:
FROM node:22-alpine
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
RUN npx tsc
RUN npm prune --production
EXPOSE 3000
CMD ["node", "dist/index.js"]