How can I indicate which application.conf is for the user when deployed in cloud environments

I followed the instructions here https://developer.cloudbees.com/bin/view/RUN/Playframework and can be deployed. But it uses only application.conf.

My application id is "mrm", so I created "mrm.conf" in the conf directory.

Then I tried "play cloudbees-deploy-config mrm", but after deployment I got this error message:

[success] Total time: 110 s, completed Mar 15, 2013 9:08:36 PM
[error] Not a valid command: mrm (similar: run)
[error] Expected '/'
[error] Expected ':'
[error] Not a valid key: mrm (similar: run)
[error] mrm

And the deployment still uses application.conf

Then I ran the game and entered: "cloudbees-deploy-config mrm" I did not have an error, but this method was also deployed using application.conf

My "mrm.conf" contains the following:

include "application.conf"
cloudbees.applicationId=mrm

, pull-request: https://github.com/CloudBees-community/sbt-cloudbees-play-plugin/pull/1

:

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 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 conf/
  directory and contains a key cloudbees.applicationId.

- , ? , mrm.conf cloudbees...

:

play "cloudbees-deploy-config mrm"

UPDATE: : http://www.poornerd.com/2013/04/08/how-deploy-play-framework-apps-with-different-configurations-to-cloudbees/

+5
3

, :

, "cloudbees-deploy-config mrm", mrm.conf

0

/ CloudBees framework-to-framework. , :

  • , .
  • , CloudBees .

Configuration ProductionConfiguration Play2 : -Dconfig.resource = CONF_FILENAME, Play2 :

-Dconfig.resource

      ( conf/directory before ).

 $ start -Dconfig.resource=prod.conf

, , (Play) . , CloudBees .

CloudBees

CloudBees SDK , ( JVM) . , -Pname = value : deploy config: set .

SBT ( ), SDK: set command:

bees config:set -a APPID config.resource=mrm.conf

. .

Play2, Play conf/mrm.conf.

? -

, , application.conf ...

Play ProductionConfiguration, , , , . CloudBees SDK config: set . Java- CloudBees , , Play.

mrm.conf :

bees config:set -a APPID cloudbees.applicationId=mrm

, CloudBees Play.

+5

I would suggest a reversal problem: for a live application, specify all the configurations CloudBees need in application.conf, so you do not need to redefine the configuration file.

On the local computer, create something like local_conf.conf and there, deactivate the configuration parameters specific to CloudBees only. Alternatively, you can write a single-line bash script on local env to run the application with additional configuration (so you won’t need to use -Dconfig.file -... "every time.

0
source

All Articles