Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample manifest uses env vs JAVA_OPTS in demo video #272

Open
drnic opened this issue Jan 8, 2017 · 2 comments
Open

Sample manifest uses env vs JAVA_OPTS in demo video #272

drnic opened this issue Jan 8, 2017 · 2 comments

Comments

@drnic
Copy link

drnic commented Jan 8, 2017

In the demo video, the manifest.tmpl.yml specifies all the properties via JAVA_OPTS:

screen shot 2017-01-08 at 3 05 18 pm

But in the https://github.com/cloudfoundry-community/autosleep/blob/develop/manifest.tmpl.yml the configuration is via env variables.

Is this either/or? Or is JAVA_OPTS preferred?

If we change configuration, do we cf restart or cf restage?

@pradyutsarma
Copy link
Contributor

I guess the manifest was updated to not use the JAVA_OPTS after the cf summit demo. It would be better to stick to the env variables rather than the JAVA_OPTS variable. However, both work for me.

@gberche-orange
Copy link
Contributor

@drnic

See related background on why we originally tried to avoid the . syntax in #270 (comment)

The JAVA_OPTS option allowed to still use the dot syntax (which allow for convenient copy/paste between the spring java source code and documentation), and not convert it to the snake case format (with underscores as separators).

Is this either/or? Or is JAVA_OPTS preferred?

I'd suggest to pick one of the syntax and stick to it.

There is a spring precedence order documented at https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-external-config (JAVA_OPTS is converted by java buildpack into JVM arguments which with the -D prefix translate into java system properties)

If we change configuration, do we cf restart or cf restage?

As any environment variables changes in CF, you have to restage. This may be optimized with restart only so speed up, I'm not sure (not specific to autosleep though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants