---
title: "How deploy Play! Framework Apps with different configurations to Cloudbees"
date: 2013-04-08T20:52:27+00:00
author: "poornerd"
tags: ["cloudbees", "deploy", "PlayFramework"]
canonical: https://www.poornerd.com/2013/04/08/how-deploy-play-framework-apps-with-different-configurations-to-cloudbees/
source: Raw Markdown twin of the HTML article; content is the original source.
---
[<img class="alignleft size-medium wp-image-252" alt="cloudbees-play" src="https://www.poornerd.com/wp-content/uploads/2013/04/cloudbees-play2-300x194.png" width="300" height="194" srcset="https://www.poornerd.com/wp-content/uploads/2013/04/cloudbees-play2-300x194.png 300w, https://www.poornerd.com/wp-content/uploads/2013/04/cloudbees-play2.png 600w" sizes="(max-width: 300px) 100vw, 300px" />](https://www.poornerd.com/wp-content/uploads/2013/04/cloudbees-play2.png)Have 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:

  * After you install the Cloudbees SDK, and follow these instructions for preparing your app to deploy to Cloudbees &#8211; <a href="http://developer.cloudbees.com/bin/view/RUN/Playframework" onclick="javascript:pageTracker._trackPageview('/outbound/article/developer.cloudbees.com');" target="_blank">http://developer.cloudbees.com/bin/view/RUN/Playframework</a>
  * <span style="line-height: 13px;">Create separate conf files for each additional configuration, and include the application.conf (per standard Play Framework documentation &#8211; <a href="http://www.playframework.com/documentation/2.0/Configuration" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.playframework.com');" target="_blank">http://www.playframework.com/documentation/2.0/Configuration</a></span>
  * Then you can run play (not start the server, just run play) and enter `cloudbees-deploy-config xxxxx` where `xxxxx` is 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:
  
``cloudbees-deploy-config<br />
Deploy a configuration of your app to a Run@Cloud app id. Arguments are:<br />
(1) the base name of a conf file in your project's conf directory, defaulting to "application"/<br />
(2) Optional. The application id to which this configuration should deploy. You can omit this<br />
arg if you have either set cloudbees.applicationId in the config file from the first<br />
arg or have set the project ID in your PlayProject.<br />
Example usage: `> cloudbees-deploy-config live`, where live.conf exists in the project's conf/<br />
directory and contains a key cloudbees.applicationId.<br />
`` 

So I tried: play cloudbees-deploy-config xxxxx

That did not work &#8211; I got an error like this:
  
`[success] Total time: 110 s, completed Mar 15, 2013 9:08:36 PM<br />
[error] Not a valid command: xxxxx (similar: run)<br />
[error] Expected '/'<br />
[error] Expected ':'<br />
[error] Not a valid key: xxxxx (similar: run)<br />
[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:  <a href="http://stackoverflow.com/questions/15441628/how-can-i-specify-which-application-conf-to-user-when-deploying-on-cloudbees" onclick="javascript:pageTracker._trackPageview('/outbound/article/stackoverflow.com');">http://stackoverflow.com/questions/15441628/how-can-i-specify-which-application-conf-to-user-when-deploying-on-cloudbees</a>
