Saturday, December 24, 2011

How do deploy Play! on CloudFoundry ...

(prerequisite ruby and gem)
> sudo gem install vmc
> vmc target api.cloudfoundry.com
> vmc login
> cd helloworld (the Play app you created)
> play install cloudfoundry-0.4
> cat conf/dependencies.yml
require:
- play 1.2.4
- play -> cloudfoundry 0.4


> play war --output=../hello --zip
> mv ../hello.war .
> vmc push
Would you like to deploy from the current directory? [Yn]:
Application Name: dmakplayhello
Application Deployed URL [dmakplayhello.cloudfoundry.com]:
Detected a Java Web Application, is this correct? [Yn]:
Memory Reservation (64M, 128M, 256M, 512M, 1G) [512M]:
Creating Application: OK
Would you like to bind any services to 'dmakplayhello'? [yN]:
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (265K): OK
Push Status: OK
Staging Application: OK
Starting Application: OK


> vmc update dmakplayhello (to update your changes to Cloud Foundry)

No comments: