Home pageGimlet

Deploy an application with multiple configurations - a Gimlet product update

Laszlo Fogas
Laszlo Fogas
2020-05-18
NaN

Now you can deploy an application in multiple instances, each with a different configuration.

Learn about Gimlet's new feature following a real-life scenario: a generic PyTorch machine learning API that is deployed in multiple instances, each with a different model.

TLDR

The solution uses the following .gimlet.yml:

envs:
  production:
    - name: pytorch-api
      strategy: simple
      namespace: models
      image: mycompany/pytorch-api
      tag: '${COMMIT_SHA:0:8}'
      containerPort: '80'
      securedIngress:
        subdomain: pytorch-api
      requests:
        cpu: 500m
        memory: 1000Mi
      limits:
        cpu: 4
        memory: 1500Mi
      vars:
        MODEL_ID: xxx
        MODEL_VERSION: 2
    - name: pytorch-api-2
      strategy: simple
      namespace: models
      image: mycompany/pytorch-api
      tag: '${COMMIT_SHA:0:8}'
      containerPort: '80'
      securedIngress:
        subdomain: pytorch-api-2
      requests:
        cpu: 500m
        memory: 1000Mi
      limits:
        cpu: 4
        memory: 1500Mi
      vars:
        MODEL_ID: yyy
        MODEL_VERSION: 4

One model per customer

There is a trained model for each customer using their anonymized data, resulting in many models. The models are deployed separately, using the same api code, parameterized with environment variables.

New possibilities in .gimlet.yml

The .gimlet.yml file describes how an application is deployed on various environments. It's an abstraction over the Kubernetes manifests, containing only the variable parts of the lengthy yaml files.

With this new Gimlet release you can not just deploy your application to various environments - staging, production, etc - but also deploy your app in multiple configurations on the same environment.

envs:
  production:
    - name: app2
    - name: app2
  staging:
    - name: app1
    - name: app2
    - name: app3

About Gimlet.io

Gimlet packages much of the deployment logic that previously was scattered in CI pipelines and implemented by every company. It is encapsulating all the logic to update the gitops repository in a consistent, environment aware fashion.

Head over to https://gimlet.io and sign up for a trial.

More from our blog

Clickops over gitops

Doing cloud operations by clicking on a dashboard that generates a stream of infrastructure as code changes.

The how and why we built our SaaS platform on Hetzner and Kubernetes

Hetzner is 5 times cheaper for us than the hyperscalers. This blog posts enumerates the how and why we built our SaaS on a discount bare metal provider. Gotchas included.

Announcing the Gimlet SaaS Early Access

We have something really exciting to share with you: Gimlet is going SaaS. In other words, you will be able to use Gimlet's unparalleled Kubernetes deploy experience with even fewer clicks than before.

How Flux broke the CI/CD feedback loop, and how we pieced it back together

A green build used to mean a successful deploy. But then gitops came and broke this heuristic.

Are you sure none of your containers run as root?

The Kyverno policy engine just arrived in Gimlet Stack. Let's see how you can be certain that none of the containers run as root in your Kubernetes cluster.