Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Loading in …3
×
1 of 22

Building and Deploying containerized Python Apps in the Cloud

1

Share

Download to read offline

Presented at PyCon SK 2016.

From simple blogs and monolith Django web apps, up to sophisticated micro service architectures, is your product ready to leverage the opportunities brought by the new tools out there?

In this talk I show how to package Python applications as ready-to-use Docker containers, and how to deploy and manage them in your own private cloud with OpenShift.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Building and Deploying containerized Python Apps in the Cloud

  1. 1. Building and Deploying containerized Python Apps in the Cloud Rodolfo Carvalho Software Engineer Mar 12th , 2016
  2. 2. Rodolfo Carvalho, PyCon SK 20162 Shipping Apps Background Wiring Components Together Rinse & RepeatCreating Containers
  3. 3. Rodolfo Carvalho, PyCon SK 20163 Background Manual Automated
  4. 4. Rodolfo Carvalho, PyCon SK 20164 Techniques & Practices ● Sprints ● Automated Tests ● TDD ● Continuous Integration ● Continuous Deployment
  5. 5. Rodolfo Carvalho, PyCon SK 20165 Tools ● Ansible ● Yum / DNF ● IaaS ● Pip ● PaaS ● Docker
  6. 6. Rodolfo Carvalho, PyCon SK 20166 Docker ● “Docker allows you to package an application with all of its dependencies into a standardized unit” ● “Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.”
  7. 7. Creating Containers
  8. 8. Rodolfo Carvalho, PyCon SK 20168 Containers & Images
  9. 9. Rodolfo Carvalho, PyCon SK 20169 Minimal Web App and Dockerfile
  10. 10. Rodolfo Carvalho, PyCon SK 201610 docker build -t hello .docker build -t hello .
  11. 11. Rodolfo Carvalho, PyCon SK 201611 Image Considerations 1/2 ● Base Image ● Proper usage of layers ● Default user & permissions ● Other defaults: ● Exposed ports ● Work directory ● Entrypoint / Cmd
  12. 12. Rodolfo Carvalho, PyCon SK 201612 Image Considerations 2/2 ● Install dependencies ● System ● Language ● Reuse
  13. 13. Rodolfo Carvalho, PyCon SK 201613 Source-To-Image github.com/openshift/source-to-image
  14. 14. Rodolfo Carvalho, PyCon SK 201614 s2i build . centos/python-34-centos7 hello-s2is2i build . centos/python-34-centos7 hello-s2i
  15. 15. Rodolfo Carvalho, PyCon SK 201615 OpenShift Builds
  16. 16. Wiring Components Together
  17. 17. Rodolfo Carvalho, PyCon SK 201617 More Apps
  18. 18. Rodolfo Carvalho, PyCon SK 201618 oc new-appoc new-app
  19. 19. Rodolfo Carvalho, PyCon SK 201619 OpenShift Templates
  20. 20. Rinse & Repeat
  21. 21. THANK YOU plus.google.com/+RedHat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHatNewslinkedin.com/company/red-hat
  22. 22. Coding Dojo Hands on Coding with Python Tomorrow 9:00 – 12:00

×