Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)


Published on

Session given at the PTJUG (Portugal JUG):

Whether you're a seasoned Java developer looking to start hacking on EE6 or you just wrote your first line of Ruby yesterday, the cloud is turning out to be the perfect environment for developing applications in just about any modern language or framework. 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 an 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. And without having to rewrite your app to get it to work the way the cloud provider thinks your app should work.

Check the command-line fu as we leverage Git to onboard apps onto OpenShift Express in seconds, while also making use of the web browser do the heavy-lifting of provisioning clusters, deploying, monitoring and auto-scaling apps in OpenShift Flex.

If you want to learn how the OpenShift PaaS and investing an hour of your time can change everything you thought you knew about developing applications in the cloud, this session is for you!

Published in: Technology

An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)

  1. An OpenShift Primer Get your code into the Cloud! Eric D. Schabell JBoss Senior Solution Architect
  2. Sign up, it's free! <ul><li> – “Sign up and Try it!”
  3. Example projects you can deploy now! </li><ul><li> </li></ul><li>Help? </li><ul><li>IRC: freenode #openshift
  4. Forums:
  5. Email: openshift at redhat dot com </li></ul></ul>Promo code: PJUG PJUG
  7. Immersion... Shift happens?
  8. Never look back...
  10. PaaS?
  11. Why am i DORKING with the stack?!
  13. OpenShift Express <ul><li>Sign Up
  14. Install Client Tools
  15. Create Domain
  16. Create Application
  17. Deploy Application (GIT) </li></ul>
  18. Sign Up
  19. Install Client Tools <ul><li>Fedora / RHEL </li><ul><li>openshift.repo </li></ul><li>Move to yum.repos.d
  20. $ sudo mv openshift.repo /etc/yum.repos.d
  21. Install client tools
  22. $ sudo yum install rubygem-rhc </li></ul><ul><li>The rest (osX, Ubuntu, Cygwin): </li><ul><li>gem install rhc (json_pure)
  23. see forums, blogs </li></ul></ul>
  24. Create Domain <ul><li>Use rhc-create-domain command </li><ul><li>$ rhc-create-domain -n mydomain -l openshiftlogin </li></ul><li>use Express console! </li></ul>
  25. rhc-create-domain Usage: /usr/bin/rhc-create-domain Bind a registered rhcloud user to a domain in rhcloud. -n|--namespace namespace Namespace for your application(s) (alphanumeric - max 16 chars) -l|--rhlogin rhlogin Red Hat login (RHN or OpenShift login with OpenShift Express access) -p|--password password RHLogin password (optional, will prompt) -a|--alter Alter namespace (will change urls) and/or ssh key -d|--debug Print Debug info -h|--help Show Usage info --config path Path of alternate config file --timeout # Timeout, in seconds, for connection
  26. Create App <ul><li>Name application and define type </li><ul><li>$ rhc-create-app -a appname -t apptype -l openshiftlogin
  27. (PHP, Ruby, Python, Perl and most important, Java!) </li></ul><li>Add application to local repo </li><ul><li>$ git add . </li></ul><li>Commit changes </li><ul><li>$ git commit -m “Initial app import.” </li></ul></ul>
  28. rhc-create-app Obtaining list of cartridges (please excuse the delay)... Usage: /usr/bin/rhc-create-app Create an OpenShift Express app. -a|--app application Application name (alphanumeric - max 32 chars) (required) -t|--type type Type of app (python-2.6, jenkins-1.4, ruby-1.8, php-5.3, jbossas-7.0, perl-5.10) (required) -r|--repo path Git Repo path (defaults to ./$app_name) -n|--nogit Only create remote space, don't pull it locally -d|--debug Print Debug info --no-dns Skip DNS check. Must be used in combination with --nogit --config path Path of alternate config file --timeout # Timeout, in seconds, for connection --enable-jenkins [name] Indicates to create a Jenkins application (if not already available) and embed the Jenkins client into this application. The default name will be 'jenkins' if not specified.
  29. Deploy to Cloud <ul><li>Push the code to Express </li><ul><li>$ git push </li></ul><li>Congratulations, your app is in the cloud! </li></ul>
  31. Demo BPM Web Designer <ul>$ rhc-create-app -a editor -t jbossas-7.0 $ cd editor $ git remote add upstream -m master git:// $ git pull -s recursive -X theirs upstream master $ git push http://editor-$your_domain.rhcloud.comdesigner/editor?profile=jbpm&uuid=123 </ul>
  32. Port Forwarding Enable tooling access to DB's and debugging of your application container: Eclipse DTP tooling Eclipse remote debug
  33. Explore...
  34. Setup... cd $project touch .openshift/markers/enable_jpda git add .openshift/markers/enable_jpda git commit -a -m “enable jpda.”
  35. Debugging
  36. JBoss Developer Studio
  38. JBDS in action...
  39. What will the future bring? <ul><li>Express / Flex unification
  40. JBoss++
  41. Commercial Service / Pricing
  42. Mobile
  43. Open Source (SDK + project) </li></ul>2012
  44. Loving your hammer?
  45. <ul><li>OpenShift:
  46. OpenShift Express:
  47. OpenShift Flex:
  48. JBPM Web Designer in the Cloud (example):
  49. Deploy an application to OpenShift with JBossTools (video):
  50. Debugging and Browsing OpenShift Applications in Eclipse:
  51. Rise above the Cloud hype with OpenShift: </li></ul>
  52. Extra slides, screenshots OpenShift Flex
  53. Enterprise Flexibility? Auto Scaling Log Mgmt Databases Monitoring Automation Roll-backs, Upgrades Speed Deployment Provisioning
  54. Login Creds
  55. Deploy Application Name Version App Components
  56. Congrat's, you're in the Cloud! Deploy code
  57. Performance & Logs Trans levels Point-in-time Components Applications Search
  58. Define Scaling Strategy How? What? Why?