Skip to main content
PyPI Downloads Latest PyPI version License

This CLI provides an opinionated, high-level wrapper for the “Autobahn” deployment API:

  • It only provides high-level commands

    • Only support what CI/CD pipelines need

    • Low-level access to Kubernetes provided by zkubectl

  • It uses Mustache for templating

    • Familiar to Zalando users: we already use it in Senza

    • Language-agnostic: users could switch to other tools without changing their manifests

Steps required by CI/CD Pipeline

  • Apply stateful resources

    • Cloud Formation templates

    • Kubernetes manifests

    • Should be possible for a whole directory

  • Create Kubernetes deployment

  • Switch “traffic” / scale deployments pod by pod

    • Needs to check pod “readyness”

  • Delete old deployments

  • Scale deployment (manually triggered)

Why another CLI?

The CI/CD pipeline could also call the “Autobahn” deployment API directly, but:

  • CI/CD pipeline (Jenkinsfile) would contain a lot of code and logic to interact with Autobahn API directly

  • Hard to test interaction with Autobahn API without running CI/CD (Jenkins)

  • No standard templating for Kubernetes manifests — first approach relied on another 3rd party tool (sigil)

  • Switching to another CI/CD would require reimplementing logic from Jenkinsfile

Usage

All commands interacting with the “Autobahn” deployment API either need the --execute flag (for immediate approval and execution) or additional calls to approve and execute.

$ sudo pip3 install -U zalando-deploy-cli
$ zdeploy configure \
    --deploy-api=https://deploy-api.example.org \
    --aws-account=aws:7.. \
    --aws-region=eu-central-1 \
    --kubernetes-cluster=aws:7..:kube-1
$ zdeploy apply ./apply/my-service.yaml --execute \
    application=kio version=cd53 release=12
$ zdeploy create-deployment deployment.yaml kio cd53 12 --execute
$ zdeploy wait-for-deployment kio cd53 12
$ zdeploy switch-deployment kio cd53 12 2/10 --execute
$ zdeploy wait-for-deployment kio cd53 12
$ zdeploy switch-deployment kio cd53 12 3/10 --execute
$ # ..
$ zdeploy switch-deployment kio cd53 12 10/10 --execute
$ zdeploy delete-old-deployments kio cd53 12 --execute
$ zdeploy scale-deployment kio cd53 12 15 --execute # manual scaling

You can also just use the Mustache template interpolation manually:

$ zdeploy render-template my-manifest.yaml foo=bar var2=123

Configure for Cluster

You can automatically set Kubernetes Cluster specific configuration using the cluster’s alias:

$ zdeploy configure-for-cluster ALIAS

New configuration:
  aws_account: aws:7..
  kubernetes_api_server: https://kube-1.example.org
  kubernetes_cluster: aws:7..:kube-1

If you don’t have zkubectl configured you also need to provide the Cluster Registry URL:

$ zdeploy configure-for-cluster --cluster-registry-url https://registry.example.org ALIAS

Release files for zalando-deploy-cli 1.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zalando-deploy-cli 1.0.10
File Size Uploaded
zalando-deploy-cli-1.0.10.tar.gz 18.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zalando-deploy-cli 1.0.10
File Interpreter ABI Platform
zalando_deploy_cli-1.0.10-py3-none-any.whl Python 3 none any Details

Total release size: 43.6 kB

Release files / zalando-deploy-cli-1.0.10.tar.gz

Download URL zalando-deploy-cli-1.0.10.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3111c74eb0b8600b7753c53075b45d3d94bec838d9d3906c7b35ea7e54a21548
BLAKE2b-256 checksum
How to use checksums
fea008dc3a4ca04f4db3a063049905757c918d9d7408eba7df7696652500fe5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / zalando_deploy_cli-1.0.10-py3-none-any.whl

Download URL zalando_deploy_cli-1.0.10-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d04d9d6727c2f3c18a329f3cb508d2c42b45671e65455bf57e6fdc2a984c8d89
BLAKE2b-256 checksum
How to use checksums
e7b4909515df0c6abf8e55f968f24d394cfe24837b3a198ae2c885f7b64c8f71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.10 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

0.34

2 release files

0.33.1

2 release files

0.32

2 release files

0.31

2 release files

0.30

2 release files

0.29

2 release files

0.28

2 release files

0.27

2 release files

0.26

2 release files

0.25

2 release files

0.24

2 release files

0.23

2 release files

0.22

2 release files

0.21

2 release files

0.20

2 release files

0.19

2 release files

0.18

2 release files

0.17

2 release files

0.16

2 release files

0.15

2 release files

0.14

2 release files

0.13

2 release files

0.12

2 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page