Results 1 to 9 of 9

Thread: Deploy To Cloud Foundary As Prod

  1. #1
    Join Date
    Jun 2006
    Posts
    25

    Question Deploy To Cloud Foundary As Prod

    It looks like the war of a grails app that gets deployed to cloud foundry from STS has the environment set to development. How do I get it set to production?

  2. #2
    Join Date
    May 2010
    Posts
    398

    Default

    Right click on your project and go to "properties >> Grails >> Run on server". You should be able to change the grails environment for the run on server functionality there.

    Kris
    Kris De Volder -- SpringSource

  3. #3
    Join Date
    Jun 2006
    Posts
    25

    Default

    I assume that's a global change. Normally I want the environment to be dev. When you do grails war, the environment is set to prod. But deploying to CF, the war is made automatically, but the environment is dev instead of prod. Any way to make a change just for deployment vs. globally?

  4. #4
    Join Date
    May 2010
    Posts
    398

    Default

    When you change that property on the "Run on server" properties page, this will only apply for deploying to TcServer or cloudfoundry.

    I.e. it is the environment used for the war command used by the run on server functionality.

    I don't think it will affect the env for running it with "run-app".

    Hopefully this is how you wanted it :-)

    Kris
    Kris De Volder -- SpringSource

  5. #5
    Join Date
    Jun 2006
    Posts
    25

    Default

    Perfect! Thanks!

  6. #6
    Join Date
    May 2010
    Posts
    398

    Default

    Your comments do make me question whether we have chosen the wrong default "dev" for the "run on server" environment.

    Maybe "prod" would be a more logical default.

    My thinking at the time was that I thought it most logical if doing "run as >> run-app" or "run as >> run on server" behave as much as possible in the same way (unless user explicitly overrides the deployment env).

    Maybe that isn't a good way of thinking however. Perhaps as a user you would really expect the env for the war command to be prod anyway. So you would expect the behavior to be different?

    Kris
    Kris De Volder -- SpringSource

  7. #7
    Join Date
    Jun 2006
    Posts
    25

    Default

    Yes, I think prod should be the default. I didn't really even know there where 2 different things. (I've been using NetBeans and just recently stated using STS.)

    Anyway, since "run on server" creates a war, I was expecting to behave like grails war, which sets the environment to prod.

  8. #8

    Default

    Thank you for this! Took me several steps to get here I blogged about it and added a reference to this forum, hopefully people will get to find this solution quicker.

    I don't know if this is the default already, I'm still using an old version (2.8), but I agree that "prod" should be the default.

  9. #9
    Join Date
    May 2010
    Posts
    398

    Default

    Dev is still the default. We should probably change that for the next release. The reason why I haven't done so yet is that whenever you change something like this, there is always a bit of a risk that you are going to be breaking people who implicitly depend on the way it currently works, even if that way may seem 'illogical'.

    But at least three different users agree it is the logical default and I haven't heard anyone who thinks it should be dev. We'll try it out and see what happens (and users who need it to be 'dev' should be able to switch it back so the risk is not that great).

    Raised a issue here to do the work:
    https://issuetracker.springsource.com/browse/STS-2564

    Thanks for your input.

    Kris
    Kris De Volder -- SpringSource

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •