SlideShare une entreprise Scribd logo
1  sur  22
OpenShift Community Day
       Writing Cartridges
    Bill DeCoste
    Principal Software Engineer
    wdecoste@redhat.com




1
Target Audience

You...
● Wish to offer new user services on an OpenShift PaaS
● Customize an existing user service on a PaaS




2
What are Cartridges?
    ●   Cartridge – A technology stack or framework (PHP, Perl, Java/JEE,
        Ruby, Python, MySQL, etc.) definition

    ●   Plugin – Auth, DNS, etc.

    ●   Gear – Allocation of memory, compute, and storage resources for
        running applications. Live on Nodes.

    ●   Application – Instantiation of a Cartridge. Overloaded term, I know.

    ●   Scaled/Scalable Application – Instantiated in multiple Gears




3
Suggestions ...
    ●   Start with a DIY (More significant for Cart V1)
        –   Resolve many installation and configuration issues (e.g. bindings,
            logging)
    ●   Existing Quickstart or sample?
    ●   Start with a similar cartridge
        –   Apache based?
        –   JEE Application Server?
        –   Embeddable Database?




4
Requirements
    ●   The OpenShift Cartridge API consists of:
        –   Executable files
        –   stdout/stderr
        –   Environment variables
    ●   You can use any language but we find bash the fastest
        –   Bash “SDK” provided, other languages planned
    ●   The software you are packaging either needs to be on the system or
        included in your cartridge




5
History – Cartridge V1.0

    ●   Opensource, but not easy to implement or customize
        –   Overly large number of files/scripts
        –   Blurred Node vs Cartridge responsibility
            (e.g. root access required by Cartridge)
        –   Each version required a new Cartridge
    ●   Difficult to maintain
        –   APIs not versioned




6
History – Cartridge V2.0

    ●   Eased implementation, customization, and
        maintenance
         –   Greatly reduced number of files/scripts
         –   Well-defined Cartridge vs Node responsibility
             (e.g. root access not required by Cartridge)
         –   Well-defined and versioned API
         –   Multiple versions supported in single Cartridge
    ●   Documentation:
        https://github.com/openshift/origin-server/blob/master/node/README.writing_cartridges.md




7
Minimal Cartridge
+-   bin
|    +- setup
|    +- control
+-   env
+-   metadata
|    +- manifest.yml


*Assumes packaged software already installed on system
*Most cartridges will have more files




8
metadata/manifest.yml

    ●   Elements
        –   Name
        –   Version
        –   Cartridge-Version
        –   Cartridge-Vendor
        –   Endpoints


*Other elements for defining features of your cartridge and it's packaged
software




9
Endpoints
 ●   Cartridges must explicitly declare which ports they will bind to, and
     provide meaningful variable names to describe:
      –   The IP address(es) reserved/available for binding
      –   The Gear-local ports to which the cartridge services will bind
      –   (Optional) Publicly proxied ports which expose Gear-local ports for
          use by the application's users or across application Gears
     Endpoints:

     - Private-IP-Name: <name of IP variable> (e.g. IP => OPENSHIFT_shortname_IP)
      Private-Port-Name: <name of port variable> (e.g. HTTP_PORT)

      Private-Port:   <port number> (e.g. 8080)
      Public-Port-Name: <name of public port variable> (e.g. HTTP_PROXY_PORT)




10
Hooks (in-flux)
     ●   Cartridges may need to act when some other cartridge is
         added/removed from an application.
     ●   This functionality is supported using Publish/Subscribe connectors in
         the manifest.yml.
         Subscribes:

          set-mysql-connection-info:       subscribe script
          Type: "NET_TCP:db:mysql"         subscription key

         Publishes:
          publish-mysql-connection-info:   publish script

          Type: "NET_TCP:db:mysql"         subscription key




11
bin/setup
     ●   Responsible for creating and/or configuring the files that were copied
         from the cartridge repository into the gear's directory.
     ●   Option --version
         –   Which version of the packaged software has been called for
         –   Possible to support n versions of the software, allows reuse of like
             code/configuration files etc




12
bin/control

OpenShift calls control when it wants work from you or your
packaged software
     ●   start – cartridge and the package software (httpd)
     ●   stop – cartridge and the package software (mysqld)
     ●   build – The application developer pushed new code to your
         language cartridge for processing (maven)
     ●   deploy – Code compiled but application not yet started. (Update
         database)
     ●   Others: threaddump, restart, reload, status




13
bin/teardown
     ●   Prepares the gear for the cartridge to be removed. This script will not
         called when the gear is destroyed.
     ●   The teardown script is only run when a cartridge is to be removed
         from the gear.
     ●   The gear is expected to continue to operate minus the functionality of
         your cartridge.




14
Template
 ●   Provides an minimal example of an application written in the
     language/framework your cartridge is packaging
     –   Typically application to web applications (e.g. homepage)
 ●   Action Hooks
     –   Executables for custom lifecycle
     –   e.g. pre-build, post-build, pre-deploy, post-deploy
         NOTE: Build lifecycle details available in doc
 ●   Markers
     –   Control cartridge behavior
     –   e.g. hot_deploy, disable_auto_scaling, force_clean_build, java7



15
System Environmental Variables (in-flux)
 ●   System Provided (subset)
     OPENSHIFT_APP_DNS the application's fully qualified domain name that your cartridge is a part of

     OPENSHIFT_APP_NAME the validated user assigned name for the application. Black list is system dependent.

     OPENSHIFT_APP_UUID OpenShift assigned UUID for the application

     OPENSHIFT_DATA_DIR the directory where your cartridge may store data

     OPENSHIFT_GEAR_DNS the gear's fully qualified domain name that your cartridge is a part of. May or may not be equal to OPENSHIFT_APP_DNS

     OPENSHIFT_GEAR_NAME OpenShift assigned name for the gear. May or may not be equal to OPENSHIFT_APP_NAME

     OPENSHIFT_GEAR_UUID OpenShift assigned UUID for the gear

     OPENSHIFT_HOMEDIR OpenShift assigned directory for the gear

     OPENSHIFT_REPO_DIR the directory where the developer's application is "archived" to and will be run from.

     OPENSHIFT_TMP_DIR the directory where your cartridge may store temporary data

 ●   Cartridge Provided (examples)
     OPENSHIFT_MYSQL_DB_HOST

     OPENSHIFT_MYSQL_DB_PASSWORD

     OPENSHIFT_MYSQL_DB_PORT

     OPENSHIFT_MYSQL_DB_USERNAME




16
Installing a V2 Cartridge
     ●   Typically available as RPMs
     ●   Added to /usr/libexec/openshift/cartridges/v2
     ●   Install Cartridge:
             oo-admin-cartridge -a install -s /usr/libexec/openshift/cartridges/v2/XXX

     ●   Clear Cache
             From /var/www/openshift/broker, run bundle exec rake tmp:clear OR
             Run `script/rails console` and enter 'Rails.cache.clear',

     ●   Confirm
            rhc cartridge list




17
Quickstarts/Samples
     ●   Many, many easy-to-install applications to showcase Cartridge use
     ●   https://github.com/openshift
     ●   Django, Rails, Tomcat, JEE, Mongo, Redmine, CakePHP, IronMQ,
         etc.
     ●   Typically follow install pattern:
         rhc create app …
         cd app
         git remote add upstream …
         git pull -s recursive -X theirs upstream master
     ●   Add your own!
     ●   NOTE: Quickstarts blend of v1/v2. Not all tested vs V2 yet


18
Thank You!




19
Channels
     ●   G+ Community
         https://plus.google.com/communities/114361859072744017486

     ●   E-Mail
         –   OpenShift Users: users@lists.openshift.redhat.com

         –   Origin Developers: dev@lists.openshift.redhat.com

     ●   IRC: irc.freenode.net
         –   OpenShift Users: #openshift

         –   Origin Developers: #openshift-dev

         –   Node/Cartridge Developers: #openshift-dev-node
20
Channels
     ●   Forums
         http://openshift.redhat.com/community/forums/openshift

     ●   Blogs
            https://openshift.redhat.com/community/blogs/

            http://mattoncloud.org/

            http://www.billdecoste.net

            http://www.krishnaraman.net

            http://cloud-mechanic.blogspot.com



21
OpenSource
     ●   GitHub: https://github.com/openshift
         –   Origin: origin-server

         –   OSE: enterprise-server

         –   Community Cartridges: origin-community-cartridges

         –   Quickstarts, Examples

         –   Watch, Star, Contribute!!!




22

Contenu connexe

Tendances

Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Yazz Atlas
 
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and OpsKubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and OpsTomasz Cholewa
 
Putting Drupal in the Cloud with Red Hat's OpenShift PaaS #DrupalCon/Prague
Putting Drupal in the Cloud with Red Hat's OpenShift PaaS  #DrupalCon/Prague Putting Drupal in the Cloud with Red Hat's OpenShift PaaS  #DrupalCon/Prague
Putting Drupal in the Cloud with Red Hat's OpenShift PaaS #DrupalCon/Prague OpenShift Origin
 
Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_videoPatrick Galbraith
 
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...OpenShift Origin
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014Hojoong Kim
 
Openshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = AwesomeOpenshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = AwesomeMark Atwood
 
CoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera ClusterCoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera ClusterYazz Atlas
 
Open shift enterprise 3.1 paas on kubernetes
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetesSamuel Terburg
 
OpenShift Overview
OpenShift OverviewOpenShift Overview
OpenShift Overviewroundman
 
OpenShift and next generation application development
OpenShift and next generation application developmentOpenShift and next generation application development
OpenShift and next generation application developmentSyed Shaaf
 
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12XOpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12XOpenShift Origin
 
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveDocker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveKen Thompson
 
OpenShift In a Nutshell - Episode 01 - Introduction
OpenShift In a Nutshell - Episode 01 - IntroductionOpenShift In a Nutshell - Episode 01 - Introduction
OpenShift In a Nutshell - Episode 01 - IntroductionBehnam Loghmani
 
Red Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageRed Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageGreg Hoelzer
 
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Walid Shaari
 

Tendances (20)

Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02Salt conf 2014-installing-openstack-using-saltstack-v02
Salt conf 2014-installing-openstack-using-saltstack-v02
 
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and OpsKubernetes or OpenShift - choosing your container platform for Dev and Ops
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
 
Putting Drupal in the Cloud with Red Hat's OpenShift PaaS #DrupalCon/Prague
Putting Drupal in the Cloud with Red Hat's OpenShift PaaS  #DrupalCon/Prague Putting Drupal in the Cloud with Red Hat's OpenShift PaaS  #DrupalCon/Prague
Putting Drupal in the Cloud with Red Hat's OpenShift PaaS #DrupalCon/Prague
 
Galera on kubernetes_no_video
Galera on kubernetes_no_videoGalera on kubernetes_no_video
Galera on kubernetes_no_video
 
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
5 ways to install @OpenShift in 5 minutes (Lightening Talk given at #DevConfC...
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 
Openshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = AwesomeOpenshift + Openstack + Fedora = Awesome
Openshift + Openstack + Fedora = Awesome
 
CoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera ClusterCoreOS automated MySQL Cluster Failover using Galera Cluster
CoreOS automated MySQL Cluster Failover using Galera Cluster
 
Open shift enterprise 3.1 paas on kubernetes
Open shift enterprise 3.1   paas on kubernetesOpen shift enterprise 3.1   paas on kubernetes
Open shift enterprise 3.1 paas on kubernetes
 
OpenShift Overview
OpenShift OverviewOpenShift Overview
OpenShift Overview
 
OpenShift and next generation application development
OpenShift and next generation application developmentOpenShift and next generation application development
OpenShift and next generation application development
 
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12XOpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
OpenShift Anywhere given at Infrastructure.Next Talk at #Scale12X
 
Core os dna_automacon
Core os dna_automaconCore os dna_automacon
Core os dna_automacon
 
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep DiveDocker Meetup - Melbourne 2015 - Kubernetes Deep Dive
Docker Meetup - Melbourne 2015 - Kubernetes Deep Dive
 
OpenShift Enterprise
OpenShift EnterpriseOpenShift Enterprise
OpenShift Enterprise
 
Core os dna_oscon
Core os dna_osconCore os dna_oscon
Core os dna_oscon
 
OpenShift In a Nutshell - Episode 01 - Introduction
OpenShift In a Nutshell - Episode 01 - IntroductionOpenShift In a Nutshell - Episode 01 - Introduction
OpenShift In a Nutshell - Episode 01 - Introduction
 
Red Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized StorageRed Hat OpenShift on Bare Metal and Containerized Storage
Red Hat OpenShift on Bare Metal and Containerized Storage
 
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...Containers - Portable, repeatable user-oriented application delivery. Build, ...
Containers - Portable, repeatable user-oriented application delivery. Build, ...
 
FICO Open Shift presentation
FICO Open Shift presentationFICO Open Shift presentation
FICO Open Shift presentation
 

Similaire à Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red Hat

OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce Diane Mueller
 
Java in containers
Java in containersJava in containers
Java in containersMartin Baez
 
State of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigDataState of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigDatainside-BigData.com
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakNETWAYS
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesPuppet
 
Integrating ChatGPT with Apache Airflow
Integrating ChatGPT with Apache AirflowIntegrating ChatGPT with Apache Airflow
Integrating ChatGPT with Apache AirflowTatiana Al-Chueyr
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?Wong Hoi Sing Edison
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and dockerFabio Fumarola
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Red Hat Developers
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsKernel TLV
 
software defined network, openflow protocol and its controllers
software defined network, openflow protocol and its controllerssoftware defined network, openflow protocol and its controllers
software defined network, openflow protocol and its controllersIsaku Yamahata
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesRobert Lemke
 
Using R on High Performance Computers
Using R on High Performance ComputersUsing R on High Performance Computers
Using R on High Performance ComputersDave Hiltbrand
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?ArangoDB Database
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
Leveraging open source for large scale analytics
Leveraging open source for large scale analyticsLeveraging open source for large scale analytics
Leveraging open source for large scale analyticsSouth West Data Meetup
 
IPMI is dead, Long live Redfish
IPMI is dead, Long live RedfishIPMI is dead, Long live Redfish
IPMI is dead, Long live RedfishBruno Cornec
 

Similaire à Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red Hat (20)

OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
 
PHP Development Tools
PHP  Development ToolsPHP  Development Tools
PHP Development Tools
 
Java in containers
Java in containersJava in containers
Java in containers
 
State of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigDataState of Containers and the Convergence of HPC and BigData
State of Containers and the Convergence of HPC and BigData
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large Enterprises
 
Integrating ChatGPT with Apache Airflow
Integrating ChatGPT with Apache AirflowIntegrating ChatGPT with Apache Airflow
Integrating ChatGPT with Apache Airflow
 
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
[HKDUG] #20161210 - BarCamp Hong Kong 2016 - What's News in PHP?
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!Why you’re going to fail running java on docker!
Why you’re going to fail running java on docker!
 
Make Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance ToolsMake Your Containers Faster: Linux Container Performance Tools
Make Your Containers Faster: Linux Container Performance Tools
 
software defined network, openflow protocol and its controllers
software defined network, openflow protocol and its controllerssoftware defined network, openflow protocol and its controllers
software defined network, openflow protocol and its controllers
 
2012 09-08-josug-jeff
2012 09-08-josug-jeff2012 09-08-josug-jeff
2012 09-08-josug-jeff
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Using R on High Performance Computers
Using R on High Performance ComputersUsing R on High Performance Computers
Using R on High Performance Computers
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
Leveraging open source for large scale analytics
Leveraging open source for large scale analyticsLeveraging open source for large scale analytics
Leveraging open source for large scale analytics
 
IPMI is dead, Long live Redfish
IPMI is dead, Long live RedfishIPMI is dead, Long live Redfish
IPMI is dead, Long live Redfish
 

Plus de OpenShift Origin

OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller OpenShift Origin
 
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...OpenShift Origin
 
Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...
Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...
Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...OpenShift Origin
 
LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...
LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...
LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...OpenShift Origin
 
OpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion Roma
OpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion RomaOpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion Roma
OpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion RomaOpenShift Origin
 
OpenShift Overview Presentation by Marek Jelen for Zurich Geeks Event
OpenShift Overview Presentation by Marek Jelen for Zurich Geeks EventOpenShift Overview Presentation by Marek Jelen for Zurich Geeks Event
OpenShift Overview Presentation by Marek Jelen for Zurich Geeks EventOpenShift Origin
 
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...OpenShift Origin
 
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...OpenShift Origin
 
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackLinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackOpenShift Origin
 
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...OpenShift Origin
 
OpenShift Origin Community Day (Boston) Welcome & Resources by Diane Mueller
OpenShift Origin Community Day (Boston) Welcome & Resources by Diane MuellerOpenShift Origin Community Day (Boston) Welcome & Resources by Diane Mueller
OpenShift Origin Community Day (Boston) Welcome & Resources by Diane MuellerOpenShift Origin
 
Putting Private Clouds to Work with PaaS Interop 2013 Vegas Diane Mueller
Putting Private Clouds to Work with PaaS Interop 2013 Vegas Diane MuellerPutting Private Clouds to Work with PaaS Interop 2013 Vegas Diane Mueller
Putting Private Clouds to Work with PaaS Interop 2013 Vegas Diane MuellerOpenShift Origin
 
Welcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhat
Welcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhatWelcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhat
Welcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhatOpenShift Origin
 
OpenShift & SELinux with Dan Walsh @rhatdan
OpenShift & SELinux with Dan Walsh @rhatdanOpenShift & SELinux with Dan Walsh @rhatdan
OpenShift & SELinux with Dan Walsh @rhatdanOpenShift Origin
 
OpenShift Origin Internals
OpenShift Origin Internals OpenShift Origin Internals
OpenShift Origin Internals OpenShift Origin
 
Introduction to OpenShift Origin- Private, Public and Community
Introduction to OpenShift Origin- Private, Public and CommunityIntroduction to OpenShift Origin- Private, Public and Community
Introduction to OpenShift Origin- Private, Public and CommunityOpenShift Origin
 

Plus de OpenShift Origin (17)

OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
OpenShift PaaS Anywhere (Infrastructure.Next Ghent 2014-02-24) Diane Mueller
 
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...
Deploying & Scaling OpenShift on OpenStack using Heat - OpenStack Seattle Mee...
 
Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...
Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...
Human Face of Cloud Computing Cyber Summit 2013 Diane Mueller Red Hat OpenShi...
 
LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...
LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...
LatinoWare 2013 An OpenSource Blueprint for Cloud presented by Diane Mueller,...
 
OpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion Roma
OpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion RomaOpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion Roma
OpenShift PaaS Overviewi by Marek Jelen 03-2013 CodeMotion Roma
 
OpenShift Overview Presentation by Marek Jelen for Zurich Geeks Event
OpenShift Overview Presentation by Marek Jelen for Zurich Geeks EventOpenShift Overview Presentation by Marek Jelen for Zurich Geeks Event
OpenShift Overview Presentation by Marek Jelen for Zurich Geeks Event
 
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
Bringing Some Spatial Love to your Application with OpenShift - Mongo Berlin ...
 
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
Social IRC bots in the Cloud with OpenShift - Mongo London presentation by Ma...
 
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on OpenstackLinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
LinuxCon 2013 Steven Dake on Using Heat for autoscaling OpenShift on Openstack
 
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
How to Launch a Public PaaS with OpenSource: The GetUpCloud & OpenShift Orgin...
 
OpenShift Origin Community Day (Boston) Welcome & Resources by Diane Mueller
OpenShift Origin Community Day (Boston) Welcome & Resources by Diane MuellerOpenShift Origin Community Day (Boston) Welcome & Resources by Diane Mueller
OpenShift Origin Community Day (Boston) Welcome & Resources by Diane Mueller
 
Putting Private Clouds to Work with PaaS Interop 2013 Vegas Diane Mueller
Putting Private Clouds to Work with PaaS Interop 2013 Vegas Diane MuellerPutting Private Clouds to Work with PaaS Interop 2013 Vegas Diane Mueller
Putting Private Clouds to Work with PaaS Interop 2013 Vegas Diane Mueller
 
Welcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhat
Welcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhatWelcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhat
Welcome to the @OpenShift Origin Community by Diane Mueller @pythondj @redhat
 
OpenShift & SELinux with Dan Walsh @rhatdan
OpenShift & SELinux with Dan Walsh @rhatdanOpenShift & SELinux with Dan Walsh @rhatdan
OpenShift & SELinux with Dan Walsh @rhatdan
 
OpenShift Origin Internals
OpenShift Origin Internals OpenShift Origin Internals
OpenShift Origin Internals
 
DevOps @ OpenShift Online
DevOps @ OpenShift OnlineDevOps @ OpenShift Online
DevOps @ OpenShift Online
 
Introduction to OpenShift Origin- Private, Public and Community
Introduction to OpenShift Origin- Private, Public and CommunityIntroduction to OpenShift Origin- Private, Public and Community
Introduction to OpenShift Origin- Private, Public and Community
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red Hat

  • 1. OpenShift Community Day Writing Cartridges Bill DeCoste Principal Software Engineer wdecoste@redhat.com 1
  • 2. Target Audience You... ● Wish to offer new user services on an OpenShift PaaS ● Customize an existing user service on a PaaS 2
  • 3. What are Cartridges? ● Cartridge – A technology stack or framework (PHP, Perl, Java/JEE, Ruby, Python, MySQL, etc.) definition ● Plugin – Auth, DNS, etc. ● Gear – Allocation of memory, compute, and storage resources for running applications. Live on Nodes. ● Application – Instantiation of a Cartridge. Overloaded term, I know. ● Scaled/Scalable Application – Instantiated in multiple Gears 3
  • 4. Suggestions ... ● Start with a DIY (More significant for Cart V1) – Resolve many installation and configuration issues (e.g. bindings, logging) ● Existing Quickstart or sample? ● Start with a similar cartridge – Apache based? – JEE Application Server? – Embeddable Database? 4
  • 5. Requirements ● The OpenShift Cartridge API consists of: – Executable files – stdout/stderr – Environment variables ● You can use any language but we find bash the fastest – Bash “SDK” provided, other languages planned ● The software you are packaging either needs to be on the system or included in your cartridge 5
  • 6. History – Cartridge V1.0 ● Opensource, but not easy to implement or customize – Overly large number of files/scripts – Blurred Node vs Cartridge responsibility (e.g. root access required by Cartridge) – Each version required a new Cartridge ● Difficult to maintain – APIs not versioned 6
  • 7. History – Cartridge V2.0 ● Eased implementation, customization, and maintenance – Greatly reduced number of files/scripts – Well-defined Cartridge vs Node responsibility (e.g. root access not required by Cartridge) – Well-defined and versioned API – Multiple versions supported in single Cartridge ● Documentation: https://github.com/openshift/origin-server/blob/master/node/README.writing_cartridges.md 7
  • 8. Minimal Cartridge +- bin | +- setup | +- control +- env +- metadata | +- manifest.yml *Assumes packaged software already installed on system *Most cartridges will have more files 8
  • 9. metadata/manifest.yml ● Elements – Name – Version – Cartridge-Version – Cartridge-Vendor – Endpoints *Other elements for defining features of your cartridge and it's packaged software 9
  • 10. Endpoints ● Cartridges must explicitly declare which ports they will bind to, and provide meaningful variable names to describe: – The IP address(es) reserved/available for binding – The Gear-local ports to which the cartridge services will bind – (Optional) Publicly proxied ports which expose Gear-local ports for use by the application's users or across application Gears Endpoints: - Private-IP-Name: <name of IP variable> (e.g. IP => OPENSHIFT_shortname_IP) Private-Port-Name: <name of port variable> (e.g. HTTP_PORT) Private-Port: <port number> (e.g. 8080) Public-Port-Name: <name of public port variable> (e.g. HTTP_PROXY_PORT) 10
  • 11. Hooks (in-flux) ● Cartridges may need to act when some other cartridge is added/removed from an application. ● This functionality is supported using Publish/Subscribe connectors in the manifest.yml. Subscribes: set-mysql-connection-info: subscribe script Type: "NET_TCP:db:mysql" subscription key Publishes: publish-mysql-connection-info: publish script Type: "NET_TCP:db:mysql" subscription key 11
  • 12. bin/setup ● Responsible for creating and/or configuring the files that were copied from the cartridge repository into the gear's directory. ● Option --version – Which version of the packaged software has been called for – Possible to support n versions of the software, allows reuse of like code/configuration files etc 12
  • 13. bin/control OpenShift calls control when it wants work from you or your packaged software ● start – cartridge and the package software (httpd) ● stop – cartridge and the package software (mysqld) ● build – The application developer pushed new code to your language cartridge for processing (maven) ● deploy – Code compiled but application not yet started. (Update database) ● Others: threaddump, restart, reload, status 13
  • 14. bin/teardown ● Prepares the gear for the cartridge to be removed. This script will not called when the gear is destroyed. ● The teardown script is only run when a cartridge is to be removed from the gear. ● The gear is expected to continue to operate minus the functionality of your cartridge. 14
  • 15. Template ● Provides an minimal example of an application written in the language/framework your cartridge is packaging – Typically application to web applications (e.g. homepage) ● Action Hooks – Executables for custom lifecycle – e.g. pre-build, post-build, pre-deploy, post-deploy NOTE: Build lifecycle details available in doc ● Markers – Control cartridge behavior – e.g. hot_deploy, disable_auto_scaling, force_clean_build, java7 15
  • 16. System Environmental Variables (in-flux) ● System Provided (subset) OPENSHIFT_APP_DNS the application's fully qualified domain name that your cartridge is a part of OPENSHIFT_APP_NAME the validated user assigned name for the application. Black list is system dependent. OPENSHIFT_APP_UUID OpenShift assigned UUID for the application OPENSHIFT_DATA_DIR the directory where your cartridge may store data OPENSHIFT_GEAR_DNS the gear's fully qualified domain name that your cartridge is a part of. May or may not be equal to OPENSHIFT_APP_DNS OPENSHIFT_GEAR_NAME OpenShift assigned name for the gear. May or may not be equal to OPENSHIFT_APP_NAME OPENSHIFT_GEAR_UUID OpenShift assigned UUID for the gear OPENSHIFT_HOMEDIR OpenShift assigned directory for the gear OPENSHIFT_REPO_DIR the directory where the developer's application is "archived" to and will be run from. OPENSHIFT_TMP_DIR the directory where your cartridge may store temporary data ● Cartridge Provided (examples) OPENSHIFT_MYSQL_DB_HOST OPENSHIFT_MYSQL_DB_PASSWORD OPENSHIFT_MYSQL_DB_PORT OPENSHIFT_MYSQL_DB_USERNAME 16
  • 17. Installing a V2 Cartridge ● Typically available as RPMs ● Added to /usr/libexec/openshift/cartridges/v2 ● Install Cartridge: oo-admin-cartridge -a install -s /usr/libexec/openshift/cartridges/v2/XXX ● Clear Cache From /var/www/openshift/broker, run bundle exec rake tmp:clear OR Run `script/rails console` and enter 'Rails.cache.clear', ● Confirm rhc cartridge list 17
  • 18. Quickstarts/Samples ● Many, many easy-to-install applications to showcase Cartridge use ● https://github.com/openshift ● Django, Rails, Tomcat, JEE, Mongo, Redmine, CakePHP, IronMQ, etc. ● Typically follow install pattern: rhc create app … cd app git remote add upstream … git pull -s recursive -X theirs upstream master ● Add your own! ● NOTE: Quickstarts blend of v1/v2. Not all tested vs V2 yet 18
  • 20. Channels ● G+ Community https://plus.google.com/communities/114361859072744017486 ● E-Mail – OpenShift Users: users@lists.openshift.redhat.com – Origin Developers: dev@lists.openshift.redhat.com ● IRC: irc.freenode.net – OpenShift Users: #openshift – Origin Developers: #openshift-dev – Node/Cartridge Developers: #openshift-dev-node 20
  • 21. Channels ● Forums http://openshift.redhat.com/community/forums/openshift ● Blogs https://openshift.redhat.com/community/blogs/ http://mattoncloud.org/ http://www.billdecoste.net http://www.krishnaraman.net http://cloud-mechanic.blogspot.com 21
  • 22. OpenSource ● GitHub: https://github.com/openshift – Origin: origin-server – OSE: enterprise-server – Community Cartridges: origin-community-cartridges – Quickstarts, Examples – Watch, Star, Contribute!!! 22