agenda - jboss · • architecture & internals • cartridges • troubleshooting. what’s...
TRANSCRIPT
![Page 1: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/1.jpg)
![Page 2: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/2.jpg)
Agenda
• Introduction - What is OpenShift?
• Architecture & Internals
• Cartridges
• Troubleshooting
![Page 3: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/3.jpg)
Agenda
• Introduction - What is OpenShift?
• Architecture & Internals
• Cartridges
• Troubleshooting
![Page 4: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/4.jpg)
What’s Platform As A Service?
Platform as a service (PaaS) is a category of cloud computing services that provide a computing platform and a solution stack as a service. Along with SaaS and IaaS, it is a service model of cloud computing. In this model, the consumer creates the software using tools and/or libraries from the provider. The consumer also controls software deployment and configuration settings. The provider provides the networks, servers, storage and other services.
PaaS offerings facilitate the deployment of applications without the cost and complexity of buying and managing the underlying hardware and software and provisioning hosting capabilities.
![Page 5: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/5.jpg)
So Why OpenShift?
- Does it support multiple languages, frameworks and middleware?
- Does it provide support for multiple hosting environments?
- Is it extensible?
- Does it promote choice or lock-in?
- Does it auto-scale?
![Page 6: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/6.jpg)
![Page 7: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/7.jpg)
Short Demo !
– rhc domain create -n <namespace> [ -l <login> ]
– rhc app create -a <app_name> -t php-5.3 [ -l <login> ]
– cd <app_name>
– git remote add upstream -m master git://github.com/openshift/phpmongotweet-example.git
– git pull -s recursive -X theirs upstream master
– git push # And that's to OpenShift.
![Page 8: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/8.jpg)
Architecture & Internals
![Page 9: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/9.jpg)
Okay, The Big Picture
StreamlineBrokerBroker
BrokerBroker
BrokerBroker
Apache
RoR App
CLI & IDE
SiteSiteApache
RoR App Browser
based UI
SiteSiteApache
RoR App
External (Dynect)
BrokerBrokerBrokerBroker
DataStoreDataStore
MongoDBReplicaSets
District-n
Node-3Node-3
MCollective
Apache
Gear
Gear
Node-5Node-5
MCollective
Apache
Gear
District-1
Node-2Node-2
MCollective
Apache
GearGear
Gear
Node-1Node-1
Apache
MCollective
Gear
Gear
Node-4Node-4
MCollective
Apache
Gear
GearGear
Gear
Gear
MessagingMessaging
![Page 10: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/10.jpg)
“Tiny view” of a Application
Node-1Node-1
Application
Apache
GearMongoDB Node.js
Application Code
![Page 11: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/11.jpg)
Anatomy of a scaled Application
ApplicationNode-4Node-4
GearApplication
Code
php
Node-2Node-2
Apache
Gear
Application Code
php
Gear
haproxy
Node-5Node-5
Gear
MySQL
![Page 12: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/12.jpg)
Broker
is the single point of contact for all application
management activities. It is responsible for
managing user logins, DNS, application state, and
general orchestration of the application. Customers
don't contact the broker directly; instead they use
the Web console, CLI tools, or JBoss tools to
interact with Broker over a REST based API
![Page 13: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/13.jpg)
Node
To enable us to share resources, multiple gears run on a single
physical or virtual machine. We refer to this machine as a node.
Gears are generally over-allocated on nodes since not all
applications are active at the same time.
![Page 14: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/14.jpg)
ActiveMQ & MCollective
• ActiveMQ links the Brokers to the Nodes
• Nodes collection addressed via MCollective
– Subscription to a QPID channel
– Decentralization – the network is the only source
of the truth
– Broadcast – all servers get requests*
• Node-Level filtering
![Page 15: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/15.jpg)
Mongo DataStore
• User+namespace+application registry
• Production:
– Triple-Modulo-Redundancy – 3 Replica Sets
• With a couple of arbitrators [votes only]
• Streamline does the user authentication
• Coming soon to a theatre near you
● Metering+Billing: Usage
![Page 16: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/16.jpg)
Gears• Lightweight resource constrained container
• “Confined” linux user account
• Runs the application and/or associated services
• Flexible
• Limited amount of memory, cpu and storage
• CPU, Memory, IO [disk+network] constrained
– via Linux Control Groups
• Bind allowed to allocated IP range %128 : 127.*.*.*
![Page 17: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/17.jpg)
Gears … (contd)• Sand-boxed …
– Kernel Namespaces
• Different View of the FileSystem
– Bind Mounts
● Private Temps
![Page 18: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/18.jpg)
Gears … (contd)
• Sand-boxed …
● SELinux
● Unlearn “setenforce 0” && Permissive Mode
–Use 'Z' force, Luke (&& /var/log/audit/audit.log)
[noder-rr95.dev.rhcloud.com repo]\> ls -altrZ server.js-rwxrwxr-x. f6f79673053f41879e1eca087b3a3a06 f6f79673053f41879e1eca087b3a3a06unconfined_u:object_r:libra_var_lib_t:s0:c0,c500 server.js
[noder-rr95.dev.rhcloud.com repo]\> ps -aefZLABEL UID PID PPID C STIME TTY TIME CMDunconfined_u:system_r:libra_t:s0:c0,c500 500 23654 1 6 15:21 ? 00:00:00 node server.js
![Page 19: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/19.jpg)
Internals
![Page 20: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/20.jpg)
Cartridges
• An extensible and stackable method of adding
functionality to the underlying platform
• Huh??
– Plugins
– Run services multi-tenanted
– Encapsulates best practices and recipes
● Provides a “standardized” method for management
and control
![Page 21: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/21.jpg)
Cartridges … (contd)• Frameworks/Languages:
• JBoss/Java, PHP, Python, Ruby, Node.js, Perl
• Continuous Integration : Jenkins
• Databases: MySQL, PostgreSQL
• NoSQL: MongoDB
• Miscellaneous: CRON, phpMyAdmin, RockMongo
• Monitoring: 10gen MMS, Metrics*
• DIY* + Community Added* netty, Play, Python 2.7, Ruby 1.9 and more …
●
![Page 22: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/22.jpg)
Example Cartridge Manifests
• php Manifest https://github.com/openshift/crankcase/blob/master/cartridges/php-5.3/info/manifest.yml
• Node.js Manifest https://github.com/openshift/crankcase/blob/master/cartridges/nodejs-0.6/info/manifest.yml
• haproxy Manifest https://github.com/openshift/crankcase/blob/master/cartridges/haproxy-1.4/info/manifest.yml
• MySQL Manifest https://github.com/openshift/crankcase/blob/master/cartridges/mysql-5.1/info/manifest.yml
![Page 23: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/23.jpg)
OpenShift Origin
![Page 24: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/24.jpg)
Take Me To The Source ...
• CrankCase
– StickShift
– UpLift
– GearChanger
– SwingShift
– Cartridges
• https://github.com/openshift/crankcase
![Page 25: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/25.jpg)
A Pictorial View
![Page 26: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/26.jpg)
“The Closed Bits”
• Not all bits open-sourced
• RH Specific due to containing internal information +
some security policies
– Dynect Plugin: Internal interface to Dynect
– Streamline Plugin: RedHat specific
– SELinux policies: Multi-tenancy lockdowns
• MCollective Plugin: On its way ….
• Site: UI [still has some RH specifics] && !docs
![Page 27: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/27.jpg)
Cartridges
![Page 28: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/28.jpg)
Cartridges
• An extensible and stackable method of adding
functionality to the underlying platform
• Huh??
– Plugins
– Run services multi-tenanted
– Encapsulates best practices and recipes
● Provides a “standardized” method for management
and control
![Page 29: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/29.jpg)
Cartridges Contents• Hooks
• Connectors (Connection-Hooks)
• Manifest
• Helper Scripts
• Templates
![Page 30: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/30.jpg)
Cartridge Hooks
• Configuration
– [pre-,post-] {install | remove}
– [pre-,post-] {configure | deconfigure}
– {add | remove} – alias
– {add | remove} - module
– {deploy | remove} - httpd-proxy
– update-namespace
![Page 31: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/31.jpg)
Cartridge Hooks … (contd)• Lifecycle
– [pre-,post-] move
● [pre-,post-] {start | stop | force-stop | restart | reload}
– status
• Informational - info
• Management
– {show | conceal | expose} - port
– system-messages | threaddump | tidy
![Page 32: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/32.jpg)
Cartridge Connection-Hooks• Ad-Hoc
● Between Publishers and Subscribers
– Connected based on the type
• FileSystem
• FileSystem:Shared
• NET:Unix
• NET:TCP:Internal
• NET:TCP
![Page 33: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/33.jpg)
Example Cartridge Connectors
• php Manifest https://github.com/openshift/crankcase/blob/master/cartridges/php-5.3/info/manifest.yml
• Node.js Manifest https://github.com/openshift/crankcase/blob/master/cartridges/nodejs-0.6/info/manifest.yml
• haproxy Manifest https://github.com/openshift/crankcase/blob/master/cartridges/haproxy-1.4/info/manifest.yml
• MySQL Manifest https://github.com/openshift/crankcase/blob/master/cartridges/mysql-5.1/info/manifest.yml
![Page 34: Agenda - JBoss · • Architecture & Internals • Cartridges • Troubleshooting. What’s Platform As A Service? Platform as a service (PaaS) is a category of cloud computing services](https://reader036.vdocument.in/reader036/viewer/2022081607/5ec6bc70c42d161c45709ba5/html5/thumbnails/34.jpg)
Cartridges
• By Example:
– Node.js : https://github.com/openshift/crankcase/tree/master/cartridges/nodejs-0.6
– MongoDB: https://github.com/openshift/crankcase/tree/master/cartridges/mongodb-2.0
• Application using Node.js and MongoDB
– https://github.com/ramr/pacman