open shift
DESCRIPTION
OpenShift: State of the Union talk at Devoxx,2012. A quick primer followed by some demo's you can do at home!TRANSCRIPT
![Page 1: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/1.jpg)
Marco RietveldJBoss Software Engineerhttp://mriet.wordpress.com/@marcorietveld14 Nov 2012, Antwerp
OpenShiftState of the Union
Devoxx 2012
![Page 2: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/2.jpg)
Sign up (It’s free!) Sorry spam bots! No OpenShift for you!
Got a laptop? (Why not?!?)
Promo code:DEVOXX2012
http://openshift.com/
This way you can followalong with the demos.
![Page 3: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/3.jpg)
OpenShift status
“A speech given by the US President toCongress every year describing the condition of the country...”
![Page 4: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/4.jpg)
History Lesson• November 2010: Makara acquired by Red Hat
• 2011: Makara merged into the OpenShift project
• May 2012: OpenShift open sourced!
• Live CD launched for local PaaS
• GitHub code base
• Activity: blogs, howto’s, quickstarts, webinars...
• June 2012: JBoss World, OpenShift Enterprise PaaS announced.
![Page 5: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/5.jpg)
Getting started
![Page 6: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/6.jpg)
You start with 3
![Page 7: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/7.jpg)
Tekst
And you never look back
![Page 8: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/8.jpg)
PaaS?!?
Widescreen.. <drool>
![Page 9: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/9.jpg)
Time spent setting up the server:14 hours
Time spent finding and fixing the problem:45 minutes
There are some things that you can spend all day(s) on.
This is NOT ONE OF THEM!
STOP DORKING WITH THE STACK
![Page 10: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/10.jpg)
1. Sign Up2. Install Client Tools3. Create Domain4. Create Application5. Deploy Application (GIT)6. ROCK OUT!
HOW-TO
![Page 11: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/11.jpg)
Sign up (It’s free!) Sorry spam bots! No OpenShift for you!
Got a laptop? (Why not?!?)
Promo code:DEVOXX2012
http://openshift.com/
This way you can followalong with the demos.
![Page 12: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/12.jpg)
Command line (https://openshift.redhat.com/community/developers/install-the-client-tools)
Install Client Tools
Mac OS X$ ruby -e ‘puts “Ruby is installed”’ Ruby is installed$ git --versiongit version 1.8.0$ sudo gem install rhc$ rhc
WindowsInstall Ruby (RubyInstaller 1.9)Install Git for Windows (1.8.0)
C:\Program Files\> gem install rhcC:\Program Files\> rhc
Fedora$ sudo yum install rubygem-rhc$ rhc$ sudo gem update rhc
Ubuntu
$ sudo apt-get install ruby-full rubygems git-core$ ruby -e ‘puts “Test”’ Test$ git --versiongit version 1.8.0$ sudo getm install rhc$ rhcOther
See link above
![Page 13: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/13.jpg)
Create your Domain- Use the rhc command$ rhc domain create -n mydomain -l openshiftlogin
- Use the admin console
![Page 14: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/14.jpg)
Currently:
JBoss EAP 6.0, JBoss AS 7.1,Tomcat, Zend 5.6, Node.js 0.6, PHP 5.3, Perl 5.10, Python 2.6, Ruby 1.9, Jenkins, DIY...
Web Cartridges
![Page 15: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/15.jpg)
Instant applications
![Page 16: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/16.jpg)
• Web Cartridge
Creating an Application• Choose a name
• Create!
![Page 17: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/17.jpg)
Ready, Set, Code!
![Page 18: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/18.jpg)
Extend... (or start over!)
![Page 19: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/19.jpg)
Tekst
Gears
• 500 Mb memory
• 1 Gb Storage
Embedded Gears:MySQL, PostgreSQL, MongoDB, PHPMyAdmin,RockMongo, Jenkins,HAProxy,Metrics,Cron,Gen-MMS-Agent
![Page 20: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/20.jpg)
• Name app and define type$ rhc app create -a <appname> -t <apptype> -l <openshiftlogin>
• Add application to local repo
$ cd <appname>$ # add files, change them, etc!$ git add .
• Commit changes
$ git commit -m “Initial app import.”
And Now with the Command Line
![Page 21: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/21.jpg)
DEPLOY$ git push (Git hooks) In your git repository: .openshift/action_hooks/pre_build.openshift/action_hooks/build.openshift/action_hooks/deploy.openshift/action_hooks/post_deploy
![Page 22: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/22.jpg)
EASY!
![Page 23: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/23.jpg)
Oh yeah, Developer Studio!
![Page 24: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/24.jpg)
1, 2, 3, Go
![Page 25: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/25.jpg)
Hot Deployments!Works for JBoss AS7, PHP and Ruby.Add marker file:$ touch .openshift/markers/hot_deploy
... remember, you still have to live inside the memory footprint -- there’s also Jenkins!
No More Passwords! (bash)
Save password in ~/.openshift/.pwd
$ chmod 600 ~/.openshift/.pwd$ function rhc() { `which rhc` “$@” -p “`cat ~/.openshift/.pwd`” # -l $login also, if you want}
Tips & Tricks
Git Configautosetuprebase=true
can cause problems... unless you’re a git guru!
![Page 26: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/26.jpg)
DEMO TIME!
![Page 27: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/27.jpg)
Designer$ rhc app create -a editor -t jbossas-7$ cd editor$ git remote add upstream -m master git://github.com/eschabell/openshift-webdesigner-jbpmmigration.git$ git pull -s recursive -X theirs upstream master$ git push
http://editor-$yourDomain.rhcloud.com/designer/editor?profile=jbpm&uuid=123
![Page 28: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/28.jpg)
$ rhc app create -a swyesb -t jbossas-7$ cd swyesb$ git remote add upstream -m master git://github.com/eschabell/switchyard-openshift.git$ git pull -s recursive -X theirs upstream master$ git apply standalone.diff$ git push
http://swyesb-$yourDomain.rhcloud.com/swydws/OrderService?wsdl
![Page 29: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/29.jpg)
$ rhc app create -a ceylon -t jbossas-7$ cd ceylon$ git remote add upstream -m master git://github.com/eschabell/ceylon-openshift.git$ git pull -s recursive -X theirs upstream master$ git push
http://ceylon-$yourDomain.rhcloud.com
![Page 30: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/30.jpg)
$ rhc app create -a redmine -t ruby-1.9$ rhc app cartridge add -a redmine -c mysql-5.1$ cd redmine$ git remote add upstream -m master git://github.com/openshift/redmine-2.0-openshift-quickstart.git$ git pull -s recursive -X theirs upstream master$ git push
http://portal-$yourDomain.rhcloud.com/portal
Redmine
![Page 31: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/31.jpg)
$ rhc app create -a capedwarf -t jbossas-7$ cd capedwarf$ git remote add upstream git://github.com/openshift/capedwarf-example.git$ git pull -s recursive -X theirs upstream master$ git push
http://capedwarf-$yourDomain.rhcloud.com/
![Page 32: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/32.jpg)
$ rhc app create -a nodejs -t nodejs-0.6$ cd nodejs$ git remote add upstream git://github.com/openshift/nodejs-example.git$ git pull -s recursive -X theirs upstream master$ git push
http://nodejs-$yourDomain.rhcloud.com/
![Page 33: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/33.jpg)
DIY: Do It Yourself$ rhc app create -a diy -t diy-0.1$ cd diy$ git remote add upstream git://github.com/openshift/openshift-diy-java-demo.git$ git pull -s recursive -X theirs upstream master# modify html/index.html and commit$ git push
http://diy-$yourDomain.rhcloud.com/
![Page 34: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/34.jpg)
Getting finished
![Page 35: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/35.jpg)
Local PaaS
Runs on Virtual Box (or virtmanager on linux)
Amazon AMI’s can also be created.
Open Source
![Page 36: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/36.jpg)
Oct 17, 2011Nov 15, 2011Dec 9, 2011Dec 20, 2011Jan 17, 2012Feb 7, 2012Feb 21, 2012March 5, 2012March 22, 2012May 15, 2012June 26, 2012July 18, 2012Aug 8, 2012Aug 28, 2012Sep 18, 2012Oct 21, 2012
Progress• Frequent releases
• Vote on Featureshttps://openshift.redhat.com/community/ideas
• Get involvedhttps://openshift.redhat.com/community/get-involved
![Page 37: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/37.jpg)
Links, Info, IRC, email, ...Openshift http://openshift.redhat.com
Example projects you can deploy now as in -- during this talk -- but, you wouldn’t right? I’m still talking!
https://www.github.com/openshift
Help? IRC freenode #openshift
Forums http://www.redhat.com/openshift/community/forums
Email openshift at redhat dot
![Page 38: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/38.jpg)
Questions?
![Page 39: Open shift](https://reader036.vdocuments.mx/reader036/viewer/2022082310/555146a9b4c905bd1c8b504d/html5/thumbnails/39.jpg)
Photos/Images:all. OpenShift http://www.openshift.com
5, 34. “The Endeavor Lifts Off” http://www.flickr.com/photos/stuckincustoms/5896504098/6. “Hammers” http://www.nytimes.com/2011/08/11/garden/roy-mackeys-hammer-art.html7. “Warp Speed” http://www.flickr.com/photos/19942094@N00/4937185452/ (Randy Le’Moine Photography)8. “NEC wide screen” http://www.finalsense.com/news/image/display/nec-crvd-lcd.jpg9. “Damn!” (borking) http://www.flickr.com/photos/lore/431644237/19. “Inner Gears” http://terrifyingteddy.deviantart.com/art/Inner-Gears-18507686521. “Happy Dance” http://www.flickr.com/photos/jefito/2926851715/26. “Blue Explosion” http://kyoakuno.deviantart.com/art/Blue-Explosion-9369437627, 28, 29, 31. Logo’s (various projects) http://design.jboss.org/30. “Ruby on Rails logo” http://media.smashingmagazine.com/images/introduction-to-rails/rails.jpg32. “Node.js logo” http://nodejs.org/logos/38. “Wat” http://knowyourmeme.com/photos/173583, http://knowyourmeme.com/photos/195379
Credits:
THANKS:Eric D. Schabell, John Graham, Devoxx, JBoss, the convenience store around the corner, Linux, Eclipse, Staffworld (UMD CS), “Steal This Presentation!”, Noise Pop, Skip Grant, and last, but not least, the OpenShift team!