poornerd

my thoughts on programming and other nerdy stuff

How deploy Play! Framework Apps with different configurations to Cloudbees

| 0 comments

cloudbees-playHave you ever wanted to deploy the same Application with multiple configurations to Cloudbees, without changing your environment variables each time while using the command line?

I spent a ton of time trying to figure it out, and it ended up being a punctuation problem.

So basically, this is it:

However, if you want to script it, like I did, you want to be able to start the deployment process from the shell as well.

The documentation said:
cloudbees-deploy-config
Deploy a configuration of your app to a Run@Cloud app id. Arguments are:
(1) the base name of a conf file in your project's conf directory, defaulting to "application"/
(2) Optional. The application id to which this configuration should deploy. You can omit this
arg if you have either set cloudbees.applicationId in the config file from the first
arg or have set the project ID in your PlayProject.
Example usage: `> cloudbees-deploy-config live`, where live.conf exists in the project's conf/
directory and contains a key cloudbees.applicationId.

So I tried: play cloudbees-deploy-config xxxxx

That did not work – I got an error like this:
[success] Total time: 110 s, completed Mar 15, 2013 9:08:36 PM
[error] Not a valid command: xxxxx (similar: run)
[error] Expected '/'
[error] Expected ':'
[error] Not a valid key: xxxxx (similar: run)
[error] xxxxx

Thanks to help on stackoverflow, I discovered that it was just missing quotes!

play "cloudbees-deploy-config xxxxx"

Here is the link to the Stackoverflow thread if you want more details:  http://stackoverflow.com/questions/15441628/how-can-i-specify-which-application-conf-to-user-when-deploying-on-cloudbees

If you have read this far, you may as well follow me on Twitter:

Author: poornerd

Tech­nol­o­gist, Entre­pre­neur, Vision­ary, Pro­gram­mer :: Grad­u­ated from USC (Uni­ver­sity of South­ern Cal­i­for­nia) with a degree in Com­puter Sci­ence. After 10+ years of free­lance con­sult­ing and pro­gram­ming, he co-founded Site­Force AG eBusi­ness Solu­tions in 1999 in Munich (München), Ger­many.

Leave a Reply

Required fields are marked *.