Deploying OpenShift
On OpenStack
Diane Mueller

OpenShift Origin Community Manager
January 2014
OpenStack Meetup Seattle
@pythondj
noun ˈpī-ˌthän, -thən+ˈdē-ˌjā
Python + short for “Django”
a widely used general-purpose, a high-level Python Web...
Agenda
●
●

Learn a little about PaaS & OpenShift
Learn a little about underlying PaaS
architecture

●
●

Talk about the F...
FLAVORS OF
OPENSHIFT

Open
Source
Project

Public
Cloud
Service

5

origin

Onpremise
or Private
Cloud
Software
“Putting the PaaS in OpenStack”
Cross Community Collaboration

OpenStack

OpenShift
http://www.ohloh.net/
Why I love PaaS: It's Magic
SaaS/Applications Layer

Infrastructure Layer
10
IBM 1401 – the year I was born

http://www.computerhistory.org/
First Job

http://www.computerhistory.org/
“SOFTWARE IS EATING
THE WORLD.”
Circa 1989 Predator vs. Prey
That's Disruptive Technology at Work
App Development Got Complicated
How to Build an App
Old School

20
Unhappy Developers
Then along came “Cloud”
Developer Expectations

●
●
●

23

Platform Flexibility
Application Portability
Increased Productivity
Infrastructure is not enough

24
Infrastructure as a Service gives you
•

Network, storage & compute as an on-demand service

•

Basically, servers in the ...
Software as a Service gives you
•

An on-demand application

•

Nothing to install or configure

“This is all my customers...
Platform as a Service delivers
•

Application run-time environment in the cloud

•

Configures & manages both the cloud & ...
SaaS/Applications Layer

Infrastructure Layer
28
OpenShift Online (http://openshift.com)

30
OpenShift Origin on Github

http://openshift.github.io/

31
OpenShift Enterprise

ENTERPRISE IT MANAGED
●

●

32

Let developers have the benefits of self-service
PaaS while IT retai...
What makes OpenShift different?
●

●

●

33

RHEL Platform
Support
SELinux-based Secure
Containers for multitenancy
Automa...
Empowering Developers
to test, launch, fail, iterate, scale

RAPIDLY
35
https://install.openshift.com/

Deploying OpenShift
36
Origin Release 3
Fedora 19 or RHEL 6.x or CentOS 6.5
Get up and running
Vagrant
Puppet
Comprehensive guide
Ansible
Heat

h...
OpenShift
Runs on IaaS
OpenShift PaaS

Amazon EC2

Bare Metal

OpenStack

38

Rackspace
RHEV

CloudStack
OpenShift Machines

An OpenShift Broker can manage multiple nodes

Broker
Broker
Broker

Node

Node

Nodes are where User ...
OpenShift Architecture
Broker

40
OpenShift Machines

An OpenShift Broker can manage multiple nodes

Broker
Broker
Broker

Node

Node

Nodes are where User ...
Applications and Gears
Node
Gear

Node
Gear

Gear

Jboss

MariaDB

User application

42

Jboss

Gear
Key OpenShift Terms
Broker – Management host, orchestration of Nodes
Node – Compute host containing Gears
Gear – Allocatio...
Architecture

44

44
https://install.openshift.com/

Deploying on OpenStack with Heat
45
Heat Overview
●

Entering OpenStack Integrated status in November 2013
–

Active code base
3048 commits as of September 20...
Heat's Mission: Orchestration
To explicitly model the relationships between
OpenStack resources of all kinds; and to
harne...
Heat Overview
Horizon
Dashboard
Heat
Orchestration
Keystone
Nova

Glance

Swift

Quantum

Cinder

Compute
Node

Image
Serv...
OpenStack Heat Architecture

49
Heat API

50
OpenStack Heat Engine Architecture

51
Autoscaling
●

●

●

●

52

Metrics or user events drive scaling
Metrics can include CPU utilization, memory
utilization, ...
Autoscaling Workflow – Internal View
●
●

●

●

53

User instantiates template with Heat's CLI
Heat registers with Ceilome...
OpenShift on OpenStack Autoscaling Workflow

http://github.com/openstack/heat-templates
54
Demo
Deploying OpenShift Enterprise
With Heat Templates
On
OpenStack

55
Learn more about Heat & OpenShift:
●

Users, testers and developers wanted!
–

Connect via IRC on #openshift-dev@freenode
...
Future of PaaS

https://github.com/openshift/openshift-pep/blob/master/openshift-pep-010-docker-cartridges.md
http://docs....
Future of PaaS on OpenStack
●

Solum initiative
–

●

also http://solum.io

Current efforts
–

Connecting Git to Solum
●

...
OpenShift Autoscaling Workflow
Step 1: Create DIB Elements
Building the broker image

Part 1: Parse Dependencies
[sdake@fr...
[sdake@freedom install.d]$ more 30­openshift­origin­broker
#!/bin/bash
set ­uex
install­packages 
    openshift­origin­bro...
resources:
  OpenshiftUser:
    Type: AWS::IAM::User
  OpenshiftOriginKeys:
    Type: AWS::IAM::AccessKey
    Properties:
...
OpenShift Autoscaling Workflow
Step 2: Create Heat Template - Alarms

  
  NodeScaleDown:
  NodeScaleUp:
    Type: AWS::Cl...
OpenShift Autoscaling Workflow
Step 3: Register images with glance
[sdake@freedom heat­templates] glance image­create 
–na...
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23
Upcoming SlideShare
Loading in …5
×

Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23

1,580 views

Published on

OpenShift Origin is an open-source Platform-as-a-Service project sponsored by Red Hat. In this session, Diane will be discussingOpenShift's use of Heat to deploy OpenShift on OpenStack showcase a number of aspects of configuring and managing a complex application on OpenStack’s Diskimage-builder and OpenStack’s Heat, both tools are bundled with RHOS 4.

Diane will walk thru the basic architecture of the application being deployed (OpenShift), then discuss how to configure OpenStack Neutron networking for OpenShift, register images with Glance, monitor Heat, and then show how to point OpenShift command line client to the broker's public ip address and begin using OpenShift.

All the heat templates used are available here:https://github.com/openstack/heat-templates and this is an awesome way to learn about Heat and contribute to both the OpenShift & OpenStack communities.

Speaker: Diane Mueller, OpenShift Origin Community Manager

Published in: Technology
  • Be the first to comment

Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle MeetUp 2014-01-23

  1. 1. Deploying OpenShift On OpenStack Diane Mueller OpenShift Origin Community Manager January 2014 OpenStack Meetup Seattle
  2. 2. @pythondj noun ˈpī-ˌthän, -thən+ˈdē-ˌjā Python + short for “Django” a widely used general-purpose, a high-level Python Web high-level programming framework that encourages rapid ............language development & clean design Snake + Disk Jockey a very large snake that kills the a person who plays popular animals it eats by wrapping itself recorded music on the radio or at a around them party or nightclub A Snake Charmer Red Hat's Cloud Ecosystem Evangelist
  3. 3. Agenda ● ● Learn a little about PaaS & OpenShift Learn a little about underlying PaaS architecture ● ● Talk about the Future of PaaS on OpenStack ● 3 Learn how to deploy OpenShift on OpenStack Find out where to learn more
  4. 4. FLAVORS OF OPENSHIFT Open Source Project Public Cloud Service 5 origin Onpremise or Private Cloud Software
  5. 5. “Putting the PaaS in OpenStack” Cross Community Collaboration OpenStack OpenShift
  6. 6. http://www.ohloh.net/
  7. 7. Why I love PaaS: It's Magic SaaS/Applications Layer Infrastructure Layer 10
  8. 8. IBM 1401 – the year I was born http://www.computerhistory.org/
  9. 9. First Job http://www.computerhistory.org/
  10. 10. “SOFTWARE IS EATING THE WORLD.”
  11. 11. Circa 1989 Predator vs. Prey
  12. 12. That's Disruptive Technology at Work
  13. 13. App Development Got Complicated
  14. 14. How to Build an App Old School 20
  15. 15. Unhappy Developers
  16. 16. Then along came “Cloud”
  17. 17. Developer Expectations ● ● ● 23 Platform Flexibility Application Portability Increased Productivity
  18. 18. Infrastructure is not enough 24
  19. 19. Infrastructure as a Service gives you • Network, storage & compute as an on-demand service • Basically, servers in the cloud • You’re still on the hook to configure & manage the cloud & stack “How do I use this?” 25
  20. 20. Software as a Service gives you • An on-demand application • Nothing to install or configure “This is all my customers and users care about!” 26
  21. 21. Platform as a Service delivers • Application run-time environment in the cloud • Configures & manages both the cloud & stack for your application “The cloud is now useful!” 27
  22. 22. SaaS/Applications Layer Infrastructure Layer 28
  23. 23. OpenShift Online (http://openshift.com) 30
  24. 24. OpenShift Origin on Github http://openshift.github.io/ 31
  25. 25. OpenShift Enterprise ENTERPRISE IT MANAGED ● ● 32 Let developers have the benefits of self-service PaaS while IT retains control for governance and compliance in a Private or Hybrid Cloud OpenShift Enterprise is designed to be deployed on top of and run on Red Hat Enterprise Linux (RHEL).
  26. 26. What makes OpenShift different? ● ● ● 33 RHEL Platform Support SELinux-based Secure Containers for multitenancy Automatic Application Scaling ● ● ● Extensible Architecture System Component Redundancy for High Availability Configurable Deployment to Support Enterprise Requirements ● ● ● Automatic Application Stack Provisioning Support for Java EE 6 Choice of Cloud Infrastructure, Bare Metal, or Desktop
  27. 27. Empowering Developers to test, launch, fail, iterate, scale RAPIDLY
  28. 28. 35
  29. 29. https://install.openshift.com/ Deploying OpenShift 36
  30. 30. Origin Release 3 Fedora 19 or RHEL 6.x or CentOS 6.5 Get up and running Vagrant Puppet Comprehensive guide Ansible Heat http://openshift.github.io 37
  31. 31. OpenShift Runs on IaaS OpenShift PaaS Amazon EC2 Bare Metal OpenStack 38 Rackspace RHEV CloudStack
  32. 32. OpenShift Machines An OpenShift Broker can manage multiple nodes Broker Broker Broker Node Node Nodes are where User applications live. 39
  33. 33. OpenShift Architecture Broker 40
  34. 34. OpenShift Machines An OpenShift Broker can manage multiple nodes Broker Broker Broker Node Node Nodes are where User applications live. 41
  35. 35. Applications and Gears Node Gear Node Gear Gear Jboss MariaDB User application 42 Jboss Gear
  36. 36. Key OpenShift Terms Broker – Management host, orchestration of Nodes Node – Compute host containing Gears Gear – Allocation of fixed memory, compute, and storage resources for running applications Cartridge – A technology/framework (PHP, Perl, Java/JEE, Ruby, Python, MySQL, etc.) to build applications 43
  37. 37. Architecture 44 44
  38. 38. https://install.openshift.com/ Deploying on OpenStack with Heat 45
  39. 39. Heat Overview ● Entering OpenStack Integrated status in November 2013 – Active code base 3048 commits as of September 2013 ● 56 contributors Cross Project functionality with OpenStack projects Keystone, Nova, Neutron, Cinder, Ceilometer, Swift, Glance, Horizon, TripleO and Tempest ● – ● ● OpenStack Heat provides application autoscaling today with a stable workflow model OpenShift on OpenStack – – 46 OpenShift Enterprise Templates for RHEL ready OpenShift Origin Templates for CentOS & Fedora in progress
  40. 40. Heat's Mission: Orchestration To explicitly model the relationships between OpenStack resources of all kinds; and to harness those models, expressed in forms accessible to both humans and machines, to manage infrastructure resources throughout the life-cycle of applications. 47
  41. 41. Heat Overview Horizon Dashboard Heat Orchestration Keystone Nova Glance Swift Quantum Cinder Compute Node Image Service Object Store Networking Volume Service ● Provides AWS Cloudformation and native ReST API ● Abstract configuration of services to single-template ● HA/Autoscaling/Monitoring features ● Openstack integrated project 48 Identity Service
  42. 42. OpenStack Heat Architecture 49
  43. 43. Heat API 50
  44. 44. OpenStack Heat Engine Architecture 51
  45. 45. Autoscaling ● ● ● ● 52 Metrics or user events drive scaling Metrics can include CPU utilization, memory utilization, many more as well as custom dimensions Dynamically add and reduce OS::Nova::Server resources to meet demand Front end Neutron LBAAS or Heat provided HAProxy Load Balancer distributes load to server resources
  46. 46. Autoscaling Workflow – Internal View ● ● ● ● 53 User instantiates template with Heat's CLI Heat registers with Ceilometer for callbacks on Alarm events Ceilometer tells Heat about Alarm events and Heat scales a Group based upon a Policy decision to scale up or down OS::Nova::Server instances can also call Alarms internally
  47. 47. OpenShift on OpenStack Autoscaling Workflow http://github.com/openstack/heat-templates 54
  48. 48. Demo Deploying OpenShift Enterprise With Heat Templates On OpenStack 55
  49. 49. Learn more about Heat & OpenShift: ● Users, testers and developers wanted! – Connect via IRC on #openshift-dev@freenode – Check out the repositories: – https://github.com/openstack/heat https://github.com/openstack/heat-templates https://github.com/openshift Read the Heat Documentation: – http://docs.openstack.org/developer/heat Read the OpenShift Documentation: http://openshift.github.io 56
  50. 50. Future of PaaS https://github.com/openshift/openshift-pep/blob/master/openshift-pep-010-docker-cartridges.md http://docs.docker.io/en/latest/installation/kernel/ 57
  51. 51. Future of PaaS on OpenStack ● Solum initiative – ● also http://solum.io Current efforts – Connecting Git to Solum ● – Building Images that can be run ● ● ● 58 Via project zuul (current OS tool for testing infrastructure) Docker (normal image w/ docker pre-installed) Normal Nova Images
  52. 52. OpenShift Autoscaling Workflow Step 1: Create DIB Elements Building the broker image Part 1: Parse Dependencies [sdake@freedom openshift­origin­broker]$ more element­deps openshift­origin­repos Part 2: Load Dependencies [sdake@freedom openshift­origin­repos]$ ls ­l pre­install.d ­rwxrwxr­x. 1 sdake sdake 286 Jun  2 12:14 29­puppetlabs­release ­rwxrwxr­x. 1 sdake sdake 648 Jun  2 12:14 30­openshift­origin­repos Part 3: Configure Broker [sdake@freedom openshift­origin­broker]$ ls ­l install.d ­rwxrwxr­x. 1 sdake sdake 1598 Jun  2 12:14 30­openshift­origin­broker 61
  53. 53. [sdake@freedom install.d]$ more 30­openshift­origin­broker #!/bin/bash set ­uex install­packages      openshift­origin­broker      rubygem­openshift­origin­msg­broker­mcollective      rubygem­openshift­origin­dns­nsupdate      rubygem­openshift­origin­dns­bind      rubygem­openshift­origin­controller      openshift­origin­broker­util      rubygem­passenger      mod_passenger      openssh      rubygem­openshift­origin­auth­mongo      rubygem­openshift­origin­remote­user      rubygem­openshift­origin­console      openshift­origin­console      mongodb      mongodb­server      bind      bind­utils      ntpdate      policycoreutils      mcollective      httpd      openssh­server      rhc      activemq      activemq­client      git      puppet      ruby      ruby­devel      ruby­irb       OpenShift Autoscaling Workflow Step 1: Create DIB elements Contents of 30-openshift-origin30-openshift-origin     ruby­libs      tar      yum­plugin­priorities      mysql­devel      mongodb­devel      system­config­firewall­base      rubygem­execjs      rubygem­uglifier      rubygem­listen      rubygem­sass      rubygem­sass­rails      autogen­libopts      ntp      rubygem­coffee­script­source      rubygem­coffee­script      rubygem­coffee­rails      rubygem­idn      rubygem­addressable      rubygem­crack      rubygem­webmock      rubygem­fakefs      rubygem­chunky_png      rubygem­hpricot      rubygem­haml      rubygem­fssm      rubygem­compass      rubygem­compass­rails      rubygem­mongo      rubygem­jquery­rails      rubygem­openshift­origin­dns­avahi      rubygem­ref      rubygem­therubyracer sed ­­in­place ­e     s/Type=oneshot/"Type=oneshotnTimeoutSec=0"/   /lib/systemd/system/cloud­final.service 62
  54. 54. resources:   OpenshiftUser:     Type: AWS::IAM::User   OpenshiftOriginKeys:     Type: AWS::IAM::AccessKey     Properties:       UserName:         Ref: OpenshiftUser   OpenshiftOriginNodeGroup:     Type: AWS::AutoScaling::AutoScalingGroup     DependsOn: BrokerWaitCondition     Properties:       AvailabilityZones: []       LaunchConfigurationName:         Ref: NodeLaunchConfig       MinSize:         Ref: NodeCountMinimum       MaxSize:         Ref: NodeCountMaximum       LoadBalancerNames: []   OpenshiftOriginScaleUpPolicy:     Type: AWS::AutoScaling::ScalingPolicy OpenshiftOriginScaleDownPolicy:     Type: AWS::AutoScaling::ScalingPolicy     Properties:       AdjustmentType: ChangeInCapacity       AutoScalingGroupName:         Ref: OpenshiftOriginNodeGroup       Cooldown: '60'       ScalingAdjustment: '­1'    OpenShift Autoscaling Workflow Step 2: Create Heat Template - Policy     Properties:       AdjustmentType: ChangeInCapacity       AutoScalingGroupName:         Ref: OpenshiftOriginNodeGroup       Cooldown: '120'       ScalingAdjustment: '1'    Alarm Policy Group 63
  55. 55. OpenShift Autoscaling Workflow Step 2: Create Heat Template - Alarms      NodeScaleDown:   NodeScaleUp:     Type: AWS::CloudWatch::Alarm     Type: AWS::CloudWatch::Alarm     Properties:     Properties:       AlarmDescription: Scale­down if event received fr       AlarmDescription: Scale­up if event received from broker       MetricName: Heartbeat       MetricName: Heartbeat       Namespace: system/linux       Namespace: system/linux       Statistic: SampleCount       Statistic: SampleCount       Period: '60'       Period: '60'       EvaluationPeriods: '1'       EvaluationPeriods: '1'       Threshold: '0'       Threshold: '0'       AlarmActions: [{Ref: OpenshiftOriginScaleDownPoli      AlarmActions: [{Ref: OpenshiftOriginScaleUpPolicy}]       Dimensions:       Dimensions:       ­ Name: AutoScalingGroupName       ­ Name: AutoScalingGroupName         Value:         Value:           Ref: OpenshiftOriginNodeGroup           Ref: OpenshiftOriginNodeGroup       ComparisonOperator: GreaterThanThreshold       ComparisonOperator: GreaterThanThreshold    Alarm Policy Group 64
  56. 56. OpenShift Autoscaling Workflow Step 3: Register images with glance [sdake@freedom heat­templates] glance image­create  –name=openshift­origin­broker ­­disk­format=qcow2  ­­container­format=bare < openshift­origin­broker.qcow2 [sdake@freedom heat­templates] glance image­create  –name=openshift­origin­node ­­disk­format=qcow2  ­­container­format=bare < openshift­origin­node.qcow2 66

×