How do you deploy your Python (Web) application? If your setup is container-based you’re likely using Kubernetes. Is it fun? No. It’s complex. It’s a lot of YAML. Maybe it’s okay-ish - if your setup is not too complex -, but it could be better. Less complex, more lightweight. And then again,...
How do you deploy your Python (Web) application? If your setup is container-based you’re likely using Kubernetes. Is it fun? No. It’s complex. It’s a lot of YAML. Maybe it’s okay-ish - if your setup is not too complex -, but it could be better. Less complex, more lightweight. And then again, how does your test suite look like for the deployment process? You don’t have any? Sure, it’s all YAML. Yak! What if you could do everything in Python? What if you could “associate” workloads, e.g. a database, with your application in the cloud, using Python code? What if you could write tests with Pytest to ensure your deployment continues to work? Does that sound too good to be true? Canonical has been developing this technology for years. It is proven and solid, yet still exciting to use! Let’s dive into what could be the best you have seen in the last decade for deploying your Python Web application. Say hello to Python and test-driven deployments, ditch YAML and say yes to stability! See a live demo and take home working code to experiment with your own setup. Presentation slides for "Pythonic deployment of (Python) applications", PyCon 24, Firenze. https://2024.pycon.it/en/event/pythonic-deployment-of-python-applications
Size: 8.19 MB
Language: en
Added: Jun 16, 2024
Slides: 29 pages
Slide Content
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 ore
DEVELOPER
OF PEOPLE, COMPANIES AND CODE
@bittner
@peterbittner, [email protected]
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, Dockerle, 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, Dockerle, 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, Dockerle, 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, cong and
data les (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, cong and
data les (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, cong and
data les (deploy following distro conventions)
Container ... satisfy dependencies independently
from target environment
Kubernetes ... declaratively dene 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, cong and
data les (deploy following distro conventions)
Container ... satisfy dependencies independently
from target environment
Kubernetes ... declaratively dene how
containers should work together, let automatic
operations do the job
??????“
Day-2 activities?
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)