Pythonic Deployment of (Python) Applications

Juju magic and Charmed operators.

la pizza

la vita

la famiglia

la sorella

la ragazza

la donna

la settimana

la pioggia

la stella

la rosa

la faccia

la scuola

il gatto

il cielo

il cavallo

il giorno

il fratello

il ragazzo

l'uomo

il libro

il tempo

l'anno

la mano (sg.)
  le mani (pl.)  🤔

la sdraio (sg.)
  le sdraio (pl.)  🤯

il padre

il mese

il mare

il fiore

Developer
of people, companies and code

@bittner

@peterbittner, django@bittner.it

Peter Bittner

Orchestration engine

for software operators

deploy & perform day-2 ops

on any cloud or VM or bare metal

operations code in Python modules

(charms, ops framework)

Deploy Your Application

?

Deploy Your Application

  • Scripted setup (create virtual environment, copy source code to host, use Git, Bash, Ansible, etc.)

🤖

Deploy Your Application

  • Scripted setup (create virtual environment, copy source code to host, use Git, Bash, Ansible, etc.)
  • Python package (pip install)

🤖

Deploy Your Application

  • Scripted setup (create virtual environment, copy source code to host, use Git, Bash, Ansible, etc.)
  • Python package (pip install)
  • System package (create + install DEB, RPM, Flatpak, snap, Windows .exe, etc.)

🤖

Deploy Your Application

  • Scripted setup (create virtual environment, copy source code to host, use Git, Bash, Ansible, etc.)
  • Python package (pip install)
  • System package (create + install DEB, RPM, Flatpak, snap, Windows .exe, etc.)
  • Container (copy and install software in container image, Dockerfile, docker compose)

🤖

Deploy Your Application

  • Scripted setup (create virtual environment, copy source code to host, use Git, Bash, Ansible, etc.)
  • Python package (pip install)
  • System package (create + install DEB, RPM, Flatpak, snap, Windows .exe, etc.)
  • Container (copy and install software in container image, Dockerfile, docker compose)
  • Kubernetes (use Helm or Kustomize, write YAML code, kubectl apply, GitOps, etc.)

🤖

Deploy Your Application

  • Scripted setup (create virtual environment, copy source code to host, use Git, Bash, Ansible, etc.)
  • Python package (pip install)
  • System package (create + install DEB, RPM, Flatpak, snap, Windows .exe, etc.)
  • Container (copy and install software in container image, Dockerfile, docker compose)
  • Kubernetes (use Helm or Kustomize, write YAML code, kubectl apply, GitOps, etc.)

Backup / Restore

Application Monitoring
Error tracking

Upgrades

Integrate with other software

Migrate to new hosting

😬

DIFFERENT PROBLEMS SOLVED

!

🤔

Different Problems Solved

  • Scripted setup ... bring up same setup as locally developed

💡

Different Problems Solved

  • Scripted setup ... bring up same setup as locally developed
  • Python package ... install the Python way

💡

Different Problems Solved

  • Scripted setup ... bring up same setup as locally developed
  • Python package ... install the Python way
  • System package ... combine binaries, config and data files (deploy following distro conventions)

💡

Different Problems Solved

  • Scripted setup ... bring up same setup as locally developed
  • Python package ... install the Python way
  • System package ... combine binaries, config and data files (deploy following distro conventions)
  • Container ... satisfy dependencies independently from target environment

💡

Different Problems Solved

  • Scripted setup ... bring up same setup as locally developed
  • Python package ... install the Python way
  • System package ... combine binaries, config and data files (deploy following distro conventions)
  • Container ... satisfy dependencies independently from target environment
  • Kubernetes ... declaratively define how containers should work together, let automatic operations do the job

💡

Different Problems Solved

  • Scripted setup ... bring up same setup as locally developed
  • Python package ... install the Python way
  • System package ... combine binaries, config and data files (deploy following distro conventions)
  • Container ... satisfy dependencies independently from target environment
  • Kubernetes ... declaratively define how containers should work together, let automatic operations do the job

🔦

Day-2 activities?

Do Everything, incl. Operations

optional

K8s Charm vs. Machine Charm

juju bootstrap <substrate> <name>

juju add-model <name>

juju deploy <charmname>

juju controllers

juju models

juju status --relations --watch 1s

juju

Juju Tooling & Concepts

Cloud

Controller

Model

Charm

Application

Integration

Client

Action

Units

JUJU TOOLING & CONCEPTS

charmcraft

init
pack

login

upload

...

Pebble

JUJU TOOLING & CONCEPTS

Alternative way
to build container images

JUJU TOOLING & CONCEPTS

self-contained applications

no dependency issues

simpler deployment

Demos

  • charmcraft, rockcraft, snapcraft
  • charm (business & test code)
  • juju

Thank you!

for your precious time

Painless Software

Less pain, more fun.

Most images generated online (CC-0)
Most logos from Wikipedia (CC-SA)
Decorative icons are unicode (CC-0)

Made with Slides.com