Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PyCon SG 2014

PyCon SG 2014

A talk about OpenShift and Python. The talk is getting into the details of OpenShift and how it works so that when you write your application, you know how it is being served up. Beginner to intermediate.

Harish Pillay

June 19, 2014
Tweet

More Decks by Harish Pillay

Other Decks in Technology

Transcript

  1. 3 by OpenShift and Python How it works How it

    scales Single PaaS everywhere ... And Python!
  2. 4 by Public / Hybrid / Private / Virtualization /

    Bare Metal Your PaaS on your deployment method of choice
  3. 5 by RHEL Public / Hybrid / Private / Virtualization

    / Bare Metal RHEL RHEL The OS Foundation is Red Hat Enterprise Linux (also Fedora and CentOS) • OpenShift is built on instances of Red Hat Enterprise Linux (RHEL) • OpenShift can run anywhere RHEL can run RHEL
  4. 6 by OpenShift Broker – Management and Orchestration Engine RHEL

    Public / Hybrid / Private / Virtualization / Bare Metal OpenShift Nodes – Application Hosting Infrastructure Broker (RHEL) Node (RHEL) Node (RHEL) An OpenShift Broker Manages Multiple OpenShift Nodes
  5. 7 by Broker (RHEL) RHEL Red Hat Enterprise Linux Node

    Public / Hybrid / Private / Virtualization / Bare Metal Node (RHEL) Node (RHEL) A Node is an Instance of RHEL
  6. 8 by RHEL Red Hat Enterprise Linux GEAR Node Public

    / Hybrid / Private / Virtualization / Bare Metal GEAR GEAR My App Her App His App Broker (RHEL) Node (RHEL) Node (RHEL) OpenShift User Applications Run in Containers called Gears
  7. 9 by RHEL Red Hat Enterprise Linux SELinux SELinux SELinux

    GEAR Node Public / Hybrid / Private / Virtualization / Bare Metal My App Broker (RHEL) Node (RHEL) Node (RHEL) SELinux Security •“Jail” around Gear •MAC instead of DAC •Process/memory protection •Pre-configured for you Gears Use SELinux for Pre-Configured High-Grade Security
  8. 10 by RHEL Red Hat Enterprise Linux GEAR Node Public

    / Hybrid / Private / Virtualization / Bare Metal CGroups CGroups My App Broker (RHEL) Node (RHEL) Node (RHEL) CGroups Resource Mgmt • Sets upper bounds • CPU • Memory • Disk Gears Use Linux CGroups for Resource Management
  9. 11 by RHEL Red Hat Enterprise Linux SELinux GEAR Node

    Public / Hybrid / Private / Virtualization / Bare Metal CGroups GEAR IDLED My App Her App Broker (RHEL) Node (RHEL) Node (RHEL) Idle Gears Can Be “de-hydrated” by the OpenShift Broker
  10. 13 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Broker (RHEL) Node (RHEL) Node (RHEL) OpenShift Multi-tenancy Provides Density, Efficiency, and Security
  11. 15 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal DEVELOPER Broker (RHEL) Node (RHEL) Node (RHEL) Developer Workflow A Developer creates a new application  OpenShift creates a GEAR
  12. 16 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal MY GEAR DEVELOPER cron logs sshd Broker (RHEL) Node (RHEL) Node (RHEL) Gears Created via Web, CLI, Eclipse -RESTful call to Broker REST Web Console Eclipse IDE Cmd Line
  13. 17 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django DEVELOPER MY GEAR cron logs sshd Broker (RHEL) Node (RHEL) Node (RHEL) OpenShift Automates Gear Configuration via Cartridges CARTRIDGES are how OpenShift installs Languages & Middleware REST Web Console Eclipse IDE Cmd Line
  14. 18 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django DEVELOPER MySQL MY GEAR cron logs sshd Broker (RHEL) Node (RHEL) Node (RHEL) OpenShift Automates Gear Configuration via Cartridges REST Web Console Eclipse IDE Cmd Line
  15. 19 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django DEVELOPER MySQL MY GEAR cron logs sshd Broker (RHEL) Node (RHEL) Node (RHEL) Etc. Etc. Ruby Python PHP Java Postgres MySQL JBoss EWS JBoss EAP CUSTOM Cartridge Types REST Web Console Eclipse IDE Cmd Line
  16. 20 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django Code GIT Repo DEVELOPER GIT/SSH MySQL MY GEAR cron logs sshd Broker (RHEL) Node (RHEL) Node (RHEL) Now, Code and Push Developer pushes application code via GIT source code management system REST Web Console Eclipse IDE Cmd Line
  17. 21 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django Code Git Repo DEVELOPER GIT/SSH cron jenkins logs sshd MySQL Jenkins MY GEAR Broker (RHEL) Node (RHEL) Node (RHEL) OpenShift Automates Build, Test with Maven and Jenkins for CI Maven REST Web Console Eclipse IDE Cmd Line REST
  18. 22 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django Code Git Repo DEVELOPER USER GIT/SSH cron logs sshd MySQL HTTP/S MY GEAR Broker (RHEL) Node (RHEL) Node (RHEL) HTTP(s) Served from Gears jenkins Jenkins Maven REST Web Console Eclipse IDE Cmd Line
  19. 23 by Real-world App Dev – PaaS across the life-cycle

    Nodes Dev Dev QA Release Mgmt/Ops Nodes QA Nodes Production Git Git Git Git Git HTTP/S USER
  20. 24 by RHEL Red Hat Enterprise Linux Node PRODUCTION INFRASTRUCTURE/CLOUD

    MANY USERS MySQL MY AUTO-SCALED APP Django cron logs sshd Django cron logs sshd Django cron logs sshd HA-Proxy HTTP/S Broker (RHEL) Node (RHEL) Node (RHEL) OpenShift Automates Application Scaling!
  21. 25 by Django cron logs sshd Django cron logs sshd

    HA-Proxy RHEL Red Hat Enterprise Linux Node PRODUCTION INFRASTRUCTURE/CLOUD MANY USERS MySQL MY AUTO-SCALED APP Django cron logs sshd HA-Proxy Broker (RHEL) Node (RHEL) Node (RHEL) External Load Balancer Integration Production Routing/LB Hardware HTTP/S • Multiple HA-Proxy • Integration with Existing Web Routing Infrastructure
  22. 27 by RHEL Red Hat Enterprise Linux Node Public /

    Hybrid / Private / Virtualization / Bare Metal Django Code Git Repo DEVELOPER USER GIT/SSH cron logs sshd MySQL HTTP/S MY GEAR Broker (RHEL) Node (RHEL) Node (RHEL) REST SELinux GE AR My App jenkins Jenkins Maven CGroups Web Console Eclipse IDE Cmd Line
  23. 29 by BROKER The Broker is responsible for state, DNS,

    and authentication. The OpenShift Broker – The PaaS Controller Subsystem
  24. 31 by NODE The node hosts are responsible for holding

    application gears. The OpenShift Nodes – The Application Host Systems
  25. 32 by Communication from external clients occurs through the REST

    API The Broker then communicates through the messaging service to nodes Control Communications – How Commands Are Delivered To the PaaS
  26. 39 by Choose Your PaaS Strategy (or use all of

    them) Public PaaS Service On- premise or Private PaaS Software Open Source PaaS Project
  27. 40 by Single PaaS view Nodes Origin Dev QA Release

    Mgmt/Ops Nodes Enterprise Nodes Online Git Git Git Git Git HTTP/S USERS HTTP/S
  28. 46 by • Choose your PaaS model • OpenShift offers

    one common platform whether private, hybrid or public
  29. 47 by • Choose your PaaS model • OpenShift offers

    one common platform whether private, hybrid or public • Go solve world problems!