There are plenty of clouds and platform-as-a-services to choose from, but where to start? Join us for an action-packed hour of power where we'll show you how to deploy your existing application written in the language of your choice - Java, Ruby, PHP, Perl or Python, with the framework of your choice - EE6, CDI, Seam, Spring, Zend, Cake, Rails, Sinatra, PerlDancer or Django to the OpenShift PaaS in just minutes.
All this and without having to rewrite your app to get it to work the way the cloud provider thinks your app should work. You can have your business applications running in the cloud on OpenShift Express in seconds.
If you want to learn about OpenShift PaaS and see how investing a couple of hours of your time can change everything you thought you knew about putting your business applications in the cloud, this session is for you!
1. OpenShift Primer
Get your code into the Cloud!
Eric D. Schabell
JBoss Technology Evangelist
http://www.schabell.org
12 Dec 2012, JBUG Netherlands
Eric D. Schabell / @ericschabell / erics@redhat.com
2. First things first, sign up!
http://openshift.redhat.com
Promotional Code: JBUGNL
Eric D. Schabell / @ericschabell / erics@redhat.com
3. OpenShift, a little history
● Nov 2010 – Makara acquired
● In 2011 – merged into OpenShift project
● May 2012 – Open Sourced OpenShift
● LiveCD launched for local PaaS
● GitHub code base
● Activity: blogs, howto's, quickstarts, webinars
● June 2012 – JBoss World, OpenShift Enterprise
PaaS announced.
Eric D. Schabell / @ericschabell / erics@redhat.com
7. Why am i DORKING
with the stack?!
Eric D. Schabell / @ericschabell / erics@redhat.com
8. Quickstart
1.Sign Up
2.Install Client Tools
3.Create Domain
4.Create Application
5.Deploy Application (GIT)
Eric D. Schabell / @ericschabell / erics@redhat.com
9. http://openshift.redhat.com –
“Sign up and Try it!”
● Example projects you can deploy
now!
● https://www.github.com/openshift
● Help?
● IRC: freenode #openshift
Promotional Code: JBUGNL
● Forums:
http://www.redhat.com/opens
hift/community/forums
● Email: openshift at redhat dot
com
Eric D. Schabell / @ericschabell / erics@redhat.com
10. Install Client Tools
● Fedora / RHEL ● The rest (osX, Ubuntu,
Cygwin):
● openshift.repo
● gem install rhc (json_pure)
● Move to yum.repos.d ● see forums, blogs
$ sudo mv openshift.repo
/etc/yum.repos.d
● Install client tools
$ sudo yum install rubygem-rhc
Eric D. Schabell / @ericschabell / erics@redhat.com
11. Create Domain
● Use rhc command
$ rhc domain create -n mydomain -l openshiftlogin
● Use admin console!
Eric D. Schabell / @ericschabell / erics@redhat.com
20. Other Options
● Name app and define type
$ rhc app create -a appname -t apptype -l openshiftlogin
(Node.js, DIY, Jenkins, PHP, Ruby, Python, Perl and most important,
Java!)
● Add application to local repo
$ git add .
● Commit changes
$ git commit -m “Initial app import.”
Eric D. Schabell / @ericschabell / erics@redhat.com
21. Deploy to Cloud
● Push the code to
Express
$ git push
● Congratulations, your
app is in the cloud!
Eric D. Schabell / @ericschabell / erics@redhat.com
25. Tips & Tricks – no more passwords
● One way:
● save your password in .openshift/pass.txt
● chmod 600 .openshift/pass.txt
● rhc domain show -p `cat .openshift/pass.txt`
● Better:
● add function to .bashrc or .bash_profile
function rhc() {
`which rhc` "$@" -p "`cat ~/.openshift/.pass.txt`"
# You can also specify -l $login if needed.
}
Eric D. Schabell / @ericschabell / erics@redhat.com
26. Tips & Tricks – hot deployments
● Works for JBoss AS 7, PHP and Ruby (for now)
● add marker file:
touch .openshift/markers/hot_deploy
* note – still have to live inside memory footprint,
maybe use Jenkins?
Eric D. Schabell / @ericschabell / erics@redhat.com
27. Demo DevDayUK Mobile App
$ rhc app create -a devdayuk -t jbosseap-6.0
$ cd devdayuk
$ git remote add upstream -m master
git://github.com/eschabell/openshift-devdayuk.git
$ git pull -s recursive -X theirs upstream master
$ git push
http://devdayuk-$your_domain.rhcloud.com
Eric D. Schabell / @ericschabell / erics@redhat.com
28. Demo jBPM Web 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-$your_domain.rhcloud.com/designer/editor?profile=jbpm&uuid=123
Eric D. Schabell / @ericschabell / erics@redhat.com