I spent a ton of time trying to figure it out, and it ended up being a punctuation problem.
So basically, this is it:
- After you install the Cloudbees SDK, and follow these instructions for preparing your app to deploy to Cloudbees – http://developer.cloudbees.com/bin/view/RUN/Playframework
- Create separate conf files for each additional configuration, and include the application.conf (per standard Play Framework documentation – http://www.playframework.com/documentation/2.0/Configuration
- Then you can run play (not start the server, just run play) and enter
xxxxxis your conf file
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:
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)
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-cloudbeesIf you have read this far, you may as well follow me on Twitter: