cloud development using play, scala and openshift
DESCRIPTION
Demo on how to use Play with OpenShift and a trial to get it working with JenkinsTRANSCRIPT
![Page 1: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/1.jpg)
Cloud developmentPlay, Scala and OpenShift
![Page 2: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/2.jpg)
Overview● It's about OpenShift● It's not about Play● It's not about Scala● There's a hidden agenda
Based on:https://github.com/opensas/play2-openshift-quickstart#readme
![Page 3: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/3.jpg)
Demo 1● https://openshift.redhat.com● http://cloudit-xita.rhcloud.com/● http://brms-xita.rhcloud.com/
![Page 4: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/4.jpg)
Available cartridges
![Page 5: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/5.jpg)
Let's create CloudIT● Download Play framework● Download RedHat Command Line Tools● Get Play2 OpenShift quickstart
https://github.com/opensas/play2-openshift-quickstart
● Create new Play app "CloudIT"play new CloudIT
● Initialize gitgit init
● Create app on OpenShift (diy)rhc app create -a cloudit -t diy-0.1 --nogit
● Link git repo'sgit remote add origin ssh://[email protected]/~/git/cloudit.git/git pull -s recursive -X theirs origin mastergit add .git commit -m "initial deploy"git remote add cloudit -m master git://github.com/jdewinne/play2-openshift-quickstart.gitgit pull -s recursive -X theirs cloudit master
![Page 6: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/6.jpg)
Let's create CloudIT● Play stage
play clean compile stage
● Add to gitgit add .git commit -m "some first app"git push origin
● Testhttp://cloudit-xita.rhcloud.com/
![Page 7: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/7.jpg)
How does it work?● .openshift/....● git repo● Based on standards
![Page 8: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/8.jpg)
Let's create CloudIT● Make some changes● Add Jenkins
○ Online: enable jenkins○ Add "play clean compile stage" to build
Use $OPENSHIFT_DATA_DIR○ Add Play framework to jenkins
Create PLAY environment variable○ Doesn't work. Why?
![Page 9: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/9.jpg)
Pricing & Production use● Pricing
https://openshift.redhat.com/community/blogs/announcing-openshift-pricing-beyond-free-php-and-java-hosting-in-the-cloud
mailto: [email protected] applications for free
● Production useNot yet!
![Page 10: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/10.jpg)
OpenShift vs. Heroku
● Create your own PaaS?● Based on open standards?● Free for developers?● Production ready?
![Page 11: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/11.jpg)
Other stuff● Architecture
https://openshift.redhat.com/community/wiki/architecture-overview
● Build your own Paas:https://openshift.redhat.com/community/wiki/build-your-own-paas-from-the-openshift-origin-livecd-using-liveinst
● Build your own cartridgehttps://openshift.redhat.com/community/wiki/introduction-to-cartridge-building
![Page 12: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/12.jpg)
Hidden agenda
Applications
![Page 13: Cloud development using play, scala and openshift](https://reader033.vdocuments.site/reader033/viewer/2022052523/5551452db4c905c6268b4cdd/html5/thumbnails/13.jpg)
Next stepsPossibilities:● Fix Jenkins build● Create OpenShift Play cartridge● Add persistence cartridge to demo app● Put DeployIT on OpenShift● Arquillian● Other ideas?