Skip to content

Commit 6526fee

Browse files
author
Glyn Normington
committed
Document memory_sizes OpenJDK configuration
Document the memory_sizes configuration section of config/openjdk.yml. Add missing documentation of repository_root for both OpenJDK and Tomcat configuration files. Improve the repository documentation. Add an empty memory_sizes section to config/openjdk.yml to make it easier for users to configure memory sizes. [#52618651]
1 parent d4b15d9 commit 6526fee

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

config/openjdk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
---
1818
repository_root: "http://download.pivotal.io.s3.amazonaws.com/openjdk/lucid/x86_64"
1919
version: 1.7.0_+
20+
memory_sizes:
2021
memory_heuristics:
2122
heap: 0.75
2223
permgen: 0.1

docs/container-tomcat.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ The container can be configured by modifying the [`config/tomcat.yml`][tomcat_ym
2121

2222
| Name | Description
2323
| ---- | -----------
24-
| `version` | The version of Tomcat to use. . Candidate versions can be found in [this listing][tomcat_index_yml].
24+
| `repository_root` | The URL of the Tomcat repository index ([details][util_repositories]).
25+
| `version` | The version of Tomcat to use. Candidate versions can be found in [this listing][tomcat_index_yml].
2526

2627
[tomcat_index_yml]: http://download.pivotal.io.s3.amazonaws.com/tomcat/lucid/x86_64/index.yml
2728

2829

2930
## Supporting Functionality
30-
Additional supporting functionality can be found in the [`java-buildpack-support][java_buildpack_support] Git repository.
31+
Additional supporting functionality can be found in the [`java-buildpack-support`][java_buildpack_support] Git repository.
3132

3233
[java_buildpack_support]: https://github.com/cloudfoundry/java-buildpack-support

docs/jre-openjdk.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,16 @@ The JRE can be configured by modifying the [`config/openjdk.yml`][openjdk_yml] f
2323

2424
| Name | Description
2525
| ---- | -----------
26+
| `repository_root` | The URL of the OpenJDK repository index ([details][util_repositories]).
2627
| `version` | The version of Java runtime to use. Candidate versions can be found in [this listing][openjdk_index_yml].
28+
| `memory_sizes` | Optional memory sizes, described below under "Memory".
29+
| `memory_heuristics` | Default memory size proportions, described below under "Default Memory Sizes".
2730

2831
[openjdk_index_yml]: http://download.pivotal.io.s3.amazonaws.com/openjdk/lucid/x86_64/index.yml
2932

3033
### Memory
3134

32-
The following properties may be specified in [`config/openjdk.yml`][openjdk_yml].
35+
The following optional properties may be specified in the `memory_sizes` mapping.
3336

3437
| Name | Description
3538
| ---- | -----------
@@ -38,10 +41,10 @@ The following properties may be specified in [`config/openjdk.yml`][openjdk_yml]
3841
| `permgen` | The Java maximum PermGen size to use. This is applicable to versions of OpenJDK earlier than 1.8. For example, a value of `128m` will result in the java command line option `-XX:MaxPermSize=128m`. Values containing whitespace are rejected with an error, but all others values appear without modification on the java command line appended to `-XX:MaxPermSize=`.
3942
| `stack` | The Java stack size to use. For example, a value of `256k` will result in the java command line option `-Xss256k`. Values containing whitespace are rejected with an error, but all others values appear without modification on the java command line appended to `-Xss`.
4043

41-
#### Default Memory Sizes
44+
### Default Memory Sizes
4245

4346
If some memory sizes are not specified using the above properties, default values are provided. For maximum heap, Metaspace, or PermGen size, the default value is based on a proportion of the total memory specified when the application was pushed. For stack size, the default value is one megabyte.
4447

45-
If any memory sizes are specified which are not equal to the default value, the proportionate defaults are adjusted accordingly. The default stack size is never adjusted from the default value.
48+
If a memory size is specified which are not equal to the default value, the defaults are adjusted proportionately, except that the default stack size is never adjusted.
4649

47-
The default memory size proportions are configured in the `memory_heuristics` section of [`config/openjdk.yml`][openjdk_yml]. Each memory size is given a weighting between `0` and `1` corresponding to a proportion of the total memory specified when the application was pushed. The weightings should add up to `1`.
50+
The default memory size proportions are configured in the `memory_heuristics` mapping of [`config/openjdk.yml`][openjdk_yml]. Each memory size is given a weighting between `0` and `1` corresponding to a proportion of the total memory specified when the application was pushed. The weightings should add up to `1`.

docs/util-repositories.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
Many components need to have access to multiple versions of binaries. The buildpack provides a `Repository` abstraction to encapsulate version resolution and download URI creation.
33

44
## Repository Structure
5-
The repository is an HTTP-accessible collection of files. The repository root must contain an `index.yml` file ([example][example_index_yml]) that is a mapping of concrete versions to URIs.
6-
5+
The repository is an HTTP-accessible collection of files. The repository root must contain an `index.yml` file ([example][example_index_yml]) that is a mapping of concrete versions to absolute URIs consisting of a series of lines of the form:
76
```yaml
87
<version>: <URI>
98
```
109
10+
The collection of files may be stored alongside the index file or elsewhere.
11+
1112
An example filesystem might look like:
1213
1314
```

0 commit comments

Comments
 (0)