[Beta] Deploy Containers (≠ Application)

I am super excited to announce the public beta launch of our container feature! :partying_face: Most of you were waiting for a long time to deploy container applications from your private and public container registries. Since we launched Qovery, we were only supporting application deployment from your git repository - now, you can also deploy it from your container registry.

Beta limitations

Before explaining how you can take advantage of it, here are some limitations to consider during the beta:

  1. Deploying and managing containers is only available via our API. It will be integrated into the Qovery V3 web interface as soon as we release Qovery v3 in public access (end of September).
  2. We only support ECR, DockerHub, Digital Ocean, and Scaleway Registries as container registries (cf here).
  3. Our Terraform provider does not yet include the container implementation (WIP)

Containers are similar to Qovery applications; you will be able to set CPU, RAM, environment variables, secrets, and all the other parameters.

Usage

To use the Qovery container API:

  1. check out our API documentation.
  2. Create an API token.

:warning: Keep secured your API token - never share it with anyone.

Create container registry

You need to associate your organization with your container registry containing your image. Qovery supports multiple container registries (like the one mentioned above). Once your container registry is linked, you can deploy a container image within any project and environment from your organization.

To create your container registry, here is the command:

curl -X POST -H 'Authorization: Token <your API token>' -H 'Content-type: application/json' \
-d '{"name": "my docker hub", "description": "your desc", "kind": "DOCKER_HUB", "url": "https://docker.io", "config": {"username": "mylogin", "password": "mypassword"}}' \
"https://api.qovery.com/organization/:orgId/containerRegistry"

The API documentation is available here.

Your Organization ID (orgId) is the first ID in your console.qovery.com URL. E.g. for https://console.qovery.com/platform/organization/70c9a78d-454b-41dc-8478-d1f95bd08fd7/projects the Organization ID is 70c9a78d-454b-41dc-8478-d1f95bd08fd7

Keep your container registry ID; It’s needed for the next step

Create a container

I assume that you already have a complete setup working (Cluster, Project, and Environment). Then you can create the first container within your environment.

To create your container within your Environment, the command is the following:

curl -X POST -H 'Authorization: Token <your API token>' -H 'Content-type: application/json' \
-d '{"name": "my container", "registry_id": "da4296aa-3844-4391-ba53-046cc87f2ccc", "image_name": "strapi/strapi", "tag": "latest"}' \
"https://api.qovery.com/environment/0a44000b-be96-4956-9485-268b3768bccc/container"

You have more options that you can find from the API doc, but here are the min args to make the request successful.

Note that you have two properties referencing the container you want to deploy from your connected registry image_name and tag.

Deploy a container

To deploy your container, you can simply deploy your full environment or the container itself via the command:

curl -X POST -H 'Authorization: Token <your API token>' -H 'Content-type: application/json' \
-d '{"image_tag": "latest"}' \
"https://api.qovery.com/container/0a44000b-be96-4956-9485-268b3768bccc/deploy"

The API doc is here.

FAQ

Why use Container instead of Application?

If you already use a CI system and have pushed your container images into your container registry, you might want to use those images and avoid rebuilding them. This is where deploying a container is useful.

Deploying an application is 4 steps - Qovery clones your Git Repository, building your container image, pushing it into a private container registry, and deploying it.

Deploying a container is 2 steps - Qovery takes your container image from your container registry and deploys it.

Any question/issue?

If you have any problems or questions, please report them here as comments. It will help us to improve the container support.

:loudspeaker: Big shout out to my team who did an incredible job here :clap:

When we create a container and deploy it this way, it won’t show up in the Qovery UI, right?
-nevermind I saw in the article it mentiones a roadmap for UI

It will be very soon available in the V3 UI :slight_smile: Stay tuned

Will we be able to use containers via applications? Essentially setting the container for the application instead of git repository.

Yes @prki :slight_smile: It’s exactly the purpose

But it’s not possible yet, correct? The API seems to be completely disconnected from applications.

It will be with Qovery V3 - open beta is scheduled for next week :partying_face:

We are anxiously waiting for it. Buildpacks have been a real productivity killer with their hard-to-debug issues.

1 Like