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-4
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-1
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-1
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-1
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-1
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-1
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-1
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-1
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-1
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.
Copy file name to clipboardExpand all lines: docs/framework-introscope_agent.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ The credential payload of the service may contain the following entries:
31
31
To provide more complex values such as the `agent-name`, using the interactive mode when creating a user-provided service will manage the character escaping automatically. For example, the default `agent-name` could be set with a value of `agent-$(expr "$VCAP_APPLICATION" : '.*application_name[": ]*\([[:word:]]*\).*')` to calculate a value from the Cloud Foundry application name.
32
32
33
33
## Configuration
34
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
34
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
35
35
36
36
The framework can be configured by modifying the [`config/introscope_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-java_opts.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Tags are printed to standard output by the buildpack detect script
16
16
17
17
18
18
## Configuration
19
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
19
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
20
20
21
21
The framework can be configured by creating or modifying the [`config/java_opts.yml`][] file in the buildpack fork.
Copy file name to clipboardExpand all lines: docs/framework-jrebel_agent.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Tags are printed to standard output by the buildpack detect script
17
17
For more information regarding setup and configuration, please refer to the [JRebel with Pivotal Cloud Foundry tutorial][pivotal].
18
18
19
19
## Configuration
20
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
20
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
21
21
22
22
The framework can be configured by modifying the [`config/jrebel_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-luna_security_provider.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ When binding to the Luna Security Provider using a user-provided service, it mus
27
27
To provide more complex values such as the PEM certificates, using the interactive mode when creating a user-provided service will manage the character escaping automatically.
28
28
29
29
## Configuration
30
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
30
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
31
31
32
32
The framework can be configured by modifying the [`config/luna_security_provider.yml`][] file in the buildpack. 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-maria_db_jdbc.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Tags are printed to standard output by the buildpack detect script
24
24
Users may optionally provide their own MariaDB or MySQL service. A user-provided MariaDB or MySQL service must have a name or tag with `mariadb` or `mysql` in it so that the MariaDB JDBC Framework will automatically download the JDBC driver JAR and place it on the classpath.
25
25
26
26
## Configuration
27
-
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 framework can be configured by modifying the [`config/maria_db_jdbc.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-new_relic_agent.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ The credential payload of the service may contain the following entries:
28
28
| `***` | (Optional) Any additional entries will be applied as a system property appended to `-Dnewrelic.config.` to allow full configuration of the agent.
29
29
30
30
## Configuration
31
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
31
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
32
32
33
33
The framework can be configured by modifying the [`config/new_relic_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-play_framework_auto_reconfiguration.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The Play Framework Auto-reconfiguration Framework causes an application to be au
14
14
Tags are printed to standard output by the buildpack detect script
15
15
16
16
## Configuration
17
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
17
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
18
18
19
19
The framework can be configured by modifying the [`config/play_framework_auto_reconfiguration.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-play_framework_jpa_plugin.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The Play Framework JPA Plugin Framework causes an application to be automaticall
19
19
Tags are printed to standard output by the buildpack detect script
20
20
21
21
## Configuration
22
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
22
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
23
23
24
24
The framework can be configured by modifying the [`config/play_framework_jpa_plugin.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-postgresql_jdbc.md
+1-1
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
Users may optionally provide their own PostgreSQL service. A user-provided PostgreSQL service must have a name or tag with `postgres` in it so that the PostgreSQL JDBC Framework will automatically download the JDBC driver JAR and place it on the classpath.
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 framework can be configured by modifying the [`config/postgresql_jdbc.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-spring_auto_reconfiguration.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Tags are printed to standard output by the buildpack detect script
16
16
If a `/WEB-INF/web.xml` file exists, the framework will modify it in addition to making the auto-reconfiguration JAR available on the classpath. This modification consists of adding `org.cloudfoundry.reconfiguration.spring.CloudProfileApplicationContextInitializer`, `org.cloudfoundry.reconfiguration.spring.CloudPropertySourceApplicationContextInitializer`, and `org.cloudfoundry.reconfiguration.spring.CloudAutoReconfigurationApplicationContextInitializer` to the collection of `contextInitializerClasses`. The Spring Auto-reconfiguration Framework also adds the `cloud` profile to any existing Spring profiles such as those defined in the [`SPRING_PROFILES_ACTIVE`][] environment variable.
17
17
18
18
## Configuration
19
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
19
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
20
20
21
21
The framework can be configured by modifying the [`config/spring_auto_reconfiguration.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/jre-open_jdk_jre.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The OpenJDK JRE provides Java runtimes from the [OpenJDK][] project. Versions o
14
14
Tags are printed to standard output by the buildpack detect script
15
15
16
16
## Configuration
17
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
17
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
18
18
19
19
The JRE can be configured by modifying the [`config/open_jdk_jre.yml`][] file in the buildpack fork. The JRE uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
Copy file name to clipboardExpand all lines: docs/jre-oracle_jre.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Tags are printed to standard output by the buildpack detect script
23
23
For details on the repository structure, see the [repository documentation][repositories].
24
24
25
25
## Configuration
26
-
For general information on configuring the buildpack, refer to [Configuration and Extension][].
26
+
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].
27
27
28
28
The JRE can be configured by modifying the [`config/oracle_jre.yml`][] file in the buildpack fork. The JRE uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
0 commit comments