You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit improves the documentation around using environment variables to set configuration values. This includes some new examples of how to set values from an applications manifest file.
[#102675140]
Copy file name to clipboardExpand all lines: README.md
+18-4Lines changed: 18 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,19 +27,33 @@ The following are _very_ simple examples for deploying the artifact types that w
27
27
## Configuration and Extension
28
28
The buildpack supports extension through the use of Git repository forking. The easiest way to accomplish this is to use [GitHub's forking functionality][] to create a copy of this repository. Make the required extension changes in the copy of the repository. Then specify the URL of the new repository when pushing Cloud Foundry applications. If the modifications are generally applicable to the Cloud Foundry community, please submit a [pull request][] with the changes.
29
29
30
-
Buildpack configuration can be overridden with an environment variable matching the configuration file you wish to override minus the `.yml` extension and with a prefix of `JBP_CONFIG`. It is not possible to add new configuration properties and properties with `nil` or empty values will be ignored by the buildpack. The value of the variable should be valid inline yaml. For example, to change the default version of Java to 7 and adjust the memory heuristics apply this environment variable to the application.
30
+
Buildpack configuration can be overridden with an environment variable matching the configuration file you wish to override minus the `.yml` extension and with a prefix of `JBP_CONFIG`. It is not possible to add new configuration properties and properties with `nil` or empty values will be ignored by the buildpack. The value of the variable should be valid inline yaml, referred to as `flow style` in the yaml spec. For example, to change the default version of Java to 7 and adjust the memory heuristics apply this environment variable to the application.
If the key or value contains a special character such as `:` it should be escaped with double quotes. For example, to change the default repository path for the buildpack.
Environment variable can also be specified in the applications `manifest` file. See the [Environment Variables][] documentation for more information.
42
+
Environment variable can also be specified in the applications `manifest` file. For example, to specify an environment variable in an applications manifest file that disables Auto-reconfiguration.
This final example shows how to change the version of Tomcat that is used by the buildpack with an environment variable specified in the applications manifest file.
50
+
51
+
```bash
52
+
env:
53
+
JBP_CONFIG_TOMCAT: '[tomcat: { version: 8.0.+ }]'
54
+
```
55
+
56
+
See the [Environment Variables][] documentation for more information.
43
57
44
58
To learn how to configure various properties of the buildpack, follow the "Configuration" links below. More information on extending the buildpack is available [here](docs/extending.md).
Copy file name to clipboardExpand all lines: docs/container-groovy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Tags are printed to standard output by the buildpack detect script
22
22
Any JAR files found in the application are automatically added to the classpath at runtime.
23
23
24
24
## Configuration
25
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
25
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
26
26
27
27
The container can be configured by modifying the [`config/groovy.yml`][] file in the buildpack fork. The container uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
Copy file name to clipboardExpand all lines: docs/container-java_main.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ If the application uses Spring, [Spring profiles][] can be specified by setting
25
25
If the main class is Spring Boot's `JarLauncher`, `PropertiesLauncher` or `WarLauncher`, the Java Main Container adds a `--server.port` argument to the command so that the application uses the correct port.
26
26
27
27
## Configuration
28
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
28
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
29
29
30
30
The container can be configured by modifying the `config/java_main.yml` file in the buildpack fork.
Copy file name to clipboardExpand all lines: docs/container-spring_boot_cli.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Tags are printed to standard output by the buildpack detect script.
22
22
If the application uses Spring, [Spring profiles][] can be specified by setting the [`SPRING_PROFILES_ACTIVE`][] environment variable. This is automatically detected and used by Spring. The Spring Auto-reconfiguration Framework will specify the `cloud` profile in addition to any others.
23
23
24
24
## Configuration
25
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
25
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
26
26
27
27
The container can be configured by modifying the [`config/spring_boot_cli.yml`][] file in the buildpack fork. The container uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
Copy file name to clipboardExpand all lines: docs/container-tomcat.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Tags are printed to standard output by the buildpack detect script
15
15
If the application uses Spring, [Spring profiles][] can be specified by setting the [`SPRING_PROFILES_ACTIVE`][] environment variable. This is automatically detected and used by Spring. The Spring Auto-reconfiguration Framework will specify the `cloud` profile in addition to any others.
16
16
17
17
## Configuration
18
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
18
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
19
19
20
20
The container can be configured by modifying the [`config/tomcat.yml`][] file in the buildpack fork. The container uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
Copy file name to clipboardExpand all lines: docs/extending-caches.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ end
39
39
```
40
40
41
41
## Configuration
42
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
42
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
43
43
44
44
Caching can be configured by modifying the [`config/cache.yml`][] file in the buildpack fork.
For general information on configuring the buildpack, refer to [Configuration and Extension][].
27
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
28
28
29
29
The console logging severity filter is set to `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL` using the following strategies in descending priority:
Copy file name to clipboardExpand all lines: docs/extending-repositories.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ end
59
59
| `{architecture}` | The architecture of the system as returned by Ruby. The value is typically one of `x86_64` or `x86`.
60
60
61
61
## Configuration
62
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
62
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
63
63
64
64
Repositories can be configured by modifying the [`config/repository.yml`][] file in the buildpack fork.
Copy file name to clipboardExpand all lines: docs/framework-app_dynamics_agent.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ When binding AppDynamics using a user-provided service, it must have name or tag
29
29
To provide more complex values such as the `tier-name`, using the interactive mode when creating a user-provided service will manage the character escaping automatically. For example, the default `tier-name` could be set with a value of `Tier-$(expr "$VCAP_APPLICATION" : '.*instance_index[": ]*\([[:digit:]]*\).*')` to calculate a value from the Cloud Foundry instance index.
30
30
31
31
## Configuration
32
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
32
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
33
33
34
34
The framework can be configured by modifying the [`config/app_dynamics_agent.yml`][] file in the buildpack fork. The framework uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
Copy file name to clipboardExpand all lines: docs/framework-dyna_trace_agent.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ TIP: Changes will not apply to existing running applications until they are rest
58
58
```
59
59
60
60
## Configuration
61
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
61
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
62
62
63
63
The framework can be configured by modifying the [`config/dyna_trace_agent.yml`][] file in the buildpack fork. The framework uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
0 commit comments