Open drnic opened 7 years ago
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.
@drnic
See related background on why we originally tried to avoid the . syntax in https://github.com/cloudfoundry-community/autosleep/pull/270#issuecomment-272848089
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).
In the demo video, the
manifest.tmpl.yml
specifies all the properties viaJAVA_OPTS
: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
orcf restage
?