MCPcopy Index your code
hub / github.com/Qovery/engine

github.com/Qovery/engine @v1.316.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.316.1 ↗ · + Follow
7,271 symbols 28,335 edges 496 files 604 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Qovery Engine

The Qovery Engine is an abstraction layer to deploy stateless and stateful applications on any Cloud providers. It also bootstraps Kubernetes clusters and mandatory elements (network) for clients.

Packages

qovery-engine

Qovery engine is able to deploy complete clusters environments and deploy client's applications inside a deployed clusters.

docker

Files to make images that should run for builds or Qovery application run.

app

Qovery binary application

Prerequisites

Binaries

  • docker
  • terraform
  • helm
  • kubectl
  • aws cli

Get Started

Setup git hook

In order to get your next MR validated, linter, fmt etc...there is a pre commit hook we suggest to install:

./helper.sh install_hook

The pre-commit hook runs ./helper.sh lint (fast lint).
For the full integration-feature clippy matrix, run:

mise run lint-matrix

Run locally

  1. Install terraform binary to be used by the engine.

```shell TERRAFORM_VERSION=$(grep 'TERRAFORM_VERSION' docker/bin_versions | cut -d= -f2 | tr -d '"') OS=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m | sed 's/x86_64/amd64/;s/arm64/arm64/')

curl -fsSL "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}${OS}${ARCH}.zip" -o /tmp/terraform.zip sudo unzip -o /tmp/terraform.zip -d /usr/local/bin/ && rm /tmp/terraform.zip

# Ensure /usr/local/bin is in your PATH (add to ~/.zshrc or ~/.bashrc if missing) export PATH="$PATH:/usr/local/bin" ```

  1. Set up the LIB_ROOT_DIR and WORKSPACE_ROOT_DIR variable
export lib_root_dir="<path-to-engine-repo>/engine/lib-engine/lib/"
export WORKSPACE_ROOT_DIR="<up-to-your-preferences>"
  • LIB_ROOT_DIR: The absolute path of the engine's lib folder
  • WORKSPACE_ROOT_DIR: The absolute path to the location where .qovery-workspace folder will be located, this folder contains the rendered config

  • Run cargo

cargo run --package app --bin engine
  • You can find the terraform version in bin_versions under TERRAFORM_VERSION.

Generate a new image version

To generate a new Engine image version, you have to use Gitlab and GitHub:

  1. On GitHub, ensure your wished commits are stored in dev or master branch.
  2. On Gitlab, run a dev or main pipeline to generate images and push to repository

Note: naming image tags is made of the first 7 chars Github commit id + a dash + 7 first chars Gitlab commit id

Release process

Production clusters

Identify version to deploy

Promote the version to production channel

  • Open the pipeline linked to the version to deploy
  • Trigger the job: 2-deploy-qovery-infra-engines-prod

Dry-run deployment

Deployment

Non-production clusters

Dry-run deployment

Deployment

Hot fix process

  1. Create a branch whose name starts with hot-fix (the build jobs gate on $CI_COMMIT_BRANCH =~ /^hot-fix/), i.e:

  2. hot-fix-staging for staging: useful if we don't want some commits already merged in main

  3. hot-fix-prod for prod: the branch should be based on last prod tag / commit
git co -b hot-fix-staging
git add .
git commit
git push origin HEAD:hot-fix-staging
  1. Once the target branch has been pushed, a branch pipeline should be created with the following jobs:

  2. release-image

  3. release-image-slim
  4. create-multi-arch-image

⚠️ Do not open a merge request for this branch. An MR creates a merge_request_event pipeline where $CI_COMMIT_BRANCH is unset, so create-multi-arch-image is skipped — and without it the plain engine:<sha> image is never built, which makes the later docker-tag job fail with engine:<sha>: not found.

  1. Wait for create-multi-arch-image to finish (it pushes engine:<sha>), then push a tag on the HEAD of the target branch

sh git tag vX.Y.X git push origin vX.Y.X

  1. Once the tag has been pushed, a new pipeline should be created with the jobs we use for regular release:

  2. docker-tag

  3. gitlab-release
  4. ...

  5. Trigger the necessary jobs to deploy either the staging or the production infra engines

AI Check

After each dry-run, Claude automatically reviews the Terraform and Helm plan diffs across all clusters and flags anything worth attention before the actual deploy. It is not meant to replace human review but to assist it and reduce the risk of missing something.

Under the hood, scripts/ci_release_ai_check.py fetches the diff logs from Loki for each cluster, normalizes sensitive data (UUIDs, ARNs, IPs, account IDs), and sends the Terraform/Helm diffs to Claude for analysis. Findings are returned as structured JSON and categorized by severity (critical, review, info). The job is non-blocking (allow_failure: true) — always review its output before proceeding to the actual deploy.

Supported connectors

Build Platforms

TODO

Container Registry

TODO

Cloud Providers

TODO

Run Tests

How to deploy new test cluster

Note: Make sure LIB_ROOT_DIR and WORKSPACE_ROOT_DIR are set.

GKE

  1. gcloud auth login
  2. gcloud components install gke-gcloud-auth-plugin
  3. cargo nextest run --features test-gcp-infra -E 'test(create_and_destroy_gke_cluster_in_europe_west_10)' --no-capture create_and_destroy_eks_cluster

EKS

cargo nextest run --features test-aws-infra -E 'test(create_and_destroy_eks_cluster)' --no-capture

Rendered configuration
  1. You can find the cluster's rendered configuration at $WORKSPACE_ROOT_DIR/<Excution date>/bootstrap/<Cluster-name>/terraform e.g: ~/.qovery-workspace/2026-04-02T09-52-18-819264-00-00/bootstrap/zf03426ac/terraform
  2. To get the connection info to the cluster run ./helper.sh get_connection_details

How to deploy an application

```shell script RUST_LOG=info LIB_ROOT_DIR=~/qovery-engine/lib WORKSPACE_ROOT_DIR=~/.qovery-workspace cargo test --package qovery-engine --test aws_environment deploy_a_working_development_environment_with_all_options_on_aws_eks -- --exact --nocapture


## Add a new test

How to add a test in a fast or long process? Simply add "#[ignore]" as a test annotation (I know it's not really convenient to get it, but it's how it works in Rust). If the annotation is missing, it will be considered as a fast test.

# Debug

If you have a json context, and you want to deploy for investigation, you need to set 2 environment variables:

```bash
DEPLOY_FROM_FILE=<path_tojson_file>
DEPLOY_FROM_FILE_KIND=<env|infra> # choose between infra (infrastructure deployment) and env (environment deployment)

FAQ

  • How to activate the debugger: add the RUST_LOG=qovery_engine=debug env variable
  • How to update the rust-toolchain:
  • Update the rust-toolchain file with the new version. Example of content:

    1.92.0

  • Then create a PR and, build the CI image with the new toolchain version with the build-engine-ci-image pipeline job. Once the pipeline is done, you can update the gitlab-ci.yml with the new image version, them

Extension points exported contracts — how you extend this code

DeploymentReporter (Interface)
Object responsible to log the progress of a deployment This object is going to live in his own thread and is responsible [7 …
lib-engine/src/environment/report/mod.rs
Cluster (Interface)
(no doc) [4 implementers]
lib-engine/tests/helpers/common.rs
CloudProvider (Interface)
CloudProvider trait allows to derive all the custom type we need per provider, with our marker type defined above to be [5 …
lib-engine/src/environment/models/types.rs
Infrastructure (Interface)
(no doc) [1 implementers]
lib-engine/tests/helpers/common.rs
ChartInstallationChecker (Interface)
(no doc) [39 implementers]
lib-engine/src/helm.rs
TeraFilter (Interface)
TODO(benjaminch): this should be an external crate This file to declare custom functions / filters and stuff for tera do [4 …
lib-engine/src/tera_utils.rs
ToCommonHelmChart (Interface)
(no doc) [42 implementers]
lib-engine/src/infrastructure/helm_charts/mod.rs

Core symbols most depended-on inside this repo

get
called by 2720
lib-engine/src/infrastructure/action/metrics_resource_profile.rs
clone
called by 2467
lib-engine/src/cmd/docker.rs
clone
called by 2085
lib-engine/src/helm.rs
as_str
called by 2009
lib-engine/src/cmd/krr.rs
as_ref
called by 1171
lib-engine/src/services/kube_client.rs
push
called by 746
lib-engine/src/cmd/docker.rs
clone_not_same_execution_id
called by 372
lib-engine/src/io_models/context.rs
client
called by 304
lib-engine/src/services/kube_client.rs

Shape

Function 3,127
Method 2,807
Class 915
Enum 326
Interface 59
Route 33
Struct 3
FuncType 1

Languages

Rust95%
Python4%
Go1%

Modules by API surface

lib-engine/src/errors/mod.rs225 symbols
scripts/tests/test_ci_release_ai_check.py174 symbols
lib-engine/src/cmd/structs.rs87 symbols
lib-engine/tests/aws/aws_databases.rs82 symbols
lib-engine/src/infrastructure/models/kubernetes/mod.rs82 symbols
scripts/tests/test_ci_release_ai_check_output.py76 symbols
lib-engine/src/infrastructure/models/cloud_provider/io.rs76 symbols
lib-engine/src/cmd/terraform.rs74 symbols
lib-engine/src/helm.rs70 symbols
lib-engine/tests/scaleway/scw_databases.rs69 symbols
lib-engine/src/io_models/models.rs69 symbols
lib-engine/tests/gcp/gcp_environment_gateway_api.rs65 symbols

Datastores touched

(mongodb)Database · 1 repos
(mysql)Database · 1 repos
adminDatabase · 1 repos
postgresDatabase · 1 repos

For agents

$ claude mcp add engine \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact