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 Appli­ca­tion with mul­ti­ple con­fig­u­ra­tions to Cloud­bees, with­out chang­ing your envi­ron­ment vari­ables each time while using the com­mand line?

I spent a ton of time try­ing to fig­ure it out, and it ended up being a punc­tu­a­tion problem.

So basi­cally, this is it:

How­ever, if you want to script it, like I did, you want to be able to start the deploy­ment process from the shell as well.

The doc­u­men­ta­tion 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 stack­over­flow, I dis­cov­ered that it was just miss­ing quotes!

play "cloudbees-deploy-config xxxxx"

Here is the link to the Stack­over­flow thread if you want more details:  http://​stack​over​flow​.com/​q​u​e​s​t​i​o​n​s​/​1​5​4​4​1​6​2​8​/​h​o​w​-​c​a​n​-​i​-​s​p​e​c​i​f​y​-​w​h​i​c​h​-​a​p​p​l​i​c​a​t​i​o​n​-​c​o​n​f​-​t​o​-​u​s​e​r​-​w​h​e​n​-​d​e​p​l​o​y​i​n​g​-​o​n​-​c​l​o​u​d​b​ees

If you have read this far, you may as well fol­low me on Twit­ter:

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 *.