Skip to content

Commit

Permalink
Merge branch 'main' into update/buildpack/websphere-liberty-runtime-w…
Browse files Browse the repository at this point in the history
…eb-profile-8
  • Loading branch information
kevin-ortega committed Mar 8, 2023
2 parents 6e90f71 + 6da4da6 commit a2e0146
Show file tree
Hide file tree
Showing 10 changed files with 521 additions and 102 deletions.
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,21 @@ The buildpack will support all available profiles of the most recent versions of

## Configuration

| Environment Variable | Description |
|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `$BP_JAVA_APP_SERVER` | The application server to use. It defaults to `` (empty string) which means that order dictates which Java application server is installed. The first Java application server buildpack to run will be picked. |
| `$BP_LIBERTY_INSTALL_TYPE` | [Install type](#install-types) of Liberty. Valid options: `ol`, `wlp`, and `none`. Defaults to `ol`. |
| `$BP_LIBERTY_VERSION` | The version of Liberty to install. Defaults to the latest version of the runtime. To see what version is available with your version of the buildpack, please see the [release notes](https://github.com/paketo-buildpacks/liberty/releases). At present, only the latest version is supported, and you need to use an older version of the buildpack if you want an older version of Liberty. |
| `$BP_LIBERTY_PROFILE` | The Liberty profile to use. Defaults to `kernel`. |
| `$BP_LIBERTY_SERVER_NAME` | Name of the server to use. Defaults to `defaultServer` when building an application. If building a packaged server and there is only one bundled server present, then the buildpack will use that. |
| `$BP_LIBERTY_CONTEXT_ROOT` | If the [server.xml](#bindings) does not have an [application](https://openliberty.io/docs/latest/reference/config/application.html) named `app` defined, then the buildpack will generate one and use this value as the context root. Defaults to the value of `/`. This setting is ignored if server.xml has an application named `app` already defined. |
| `$BP_LIBERTY_FEATURES` | Space separated list of Liberty features to be installed with the Liberty runtime. Supports any valid Liberty feature. See the [Liberty Documentation](https://openliberty.io/docs/latest/reference/feature/feature-overview.html) for available features. |
| `BP_LIBERTY_FEATURE_INSTALL_DISABLED` | Disable running the feature installer. Defaults to `false`. |
| `$BPL_LIBERTY_LOG_LEVEL` | Sets the [logging](https://openliberty.io/docs/21.0.0.11/log-trace-configuration.html#configuaration) level. If not set, attempts to get the buildpack's log level. If unable, defaults to `INFO` |
| Environment Variable | Description |
|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `$BP_JAVA_APP_SERVER` | The application server to use. It defaults to `` (empty string) which means that order dictates which Java application server is installed. The first Java application server buildpack to run will be picked. |
| `$BP_LIBERTY_INSTALL_TYPE` | [Install type](#install-types) of Liberty. Valid options: `ol`, `wlp`, and `none`. Defaults to `ol`. |
| `$BP_LIBERTY_VERSION` | The version of Liberty to install. Defaults to the latest version of the runtime. To see what version is available with your version of the buildpack, please see the [release notes][release-notes]. At present, only the latest version is supported, and you need to use an older version of the buildpack if you want an older version of Liberty. |
| `$BP_LIBERTY_PROFILE` | The Liberty profile to use. Defaults to `kernel`. |
| `$BP_LIBERTY_SERVER_NAME` | Name of the server to use. Defaults to `defaultServer` when building an application. If building a packaged server and there is only one bundled server present, then the buildpack will use that. |
| `$BP_LIBERTY_CONTEXT_ROOT` | The context root to use for the application. Defaults to the context root for the [application][app-config] if defined in the [server.xml](#bindings). Otherwise, it defaults to `/`. |
| `$BP_LIBERTY_FEATURES` | Space separated list of Liberty features to be installed with the Liberty runtime. Supports any valid Liberty feature. See the [Liberty Documentation][liberty-doc] for available features. |
| `BP_LIBERTY_FEATURE_INSTALL_DISABLED` | Disable running the feature installer. Defaults to `false`. |
| `$BPL_LIBERTY_LOG_LEVEL` | Sets the [logging](https://openliberty.io/docs/21.0.0.11/log-trace-configuration.html#configuaration) level. If not set, attempts to get the buildpack's log level. If unable, defaults to `INFO` |

[release-notes]: https://github.com/paketo-buildpacks/liberty/releases
[app-config]: https://openliberty.io/docs/latest/reference/config/application.html
[liberty-doc]: https://openliberty.io/docs/latest/reference/feature/feature-overview.html

### Profiles

Expand Down Expand Up @@ -106,6 +110,18 @@ variables in your `pack build` command.
--env BP_GRADLE_BUILT_ARTIFACT="build/libs/*.[ejw]ar src/main/liberty/config/*"
```

### Providing Application Config in server.xml

Any application configuration provided in the `server.xml` must have an `id` set. This is required for the Liberty buildpack to provide additional configuration (e.g., updating the application's location).

For example:

```xml
<application id="myapp" name="myapp" context-root="/my-app">
<classloader commonLibraryRef="my-lib-ref"/>
</application>
```

## Configuring Secrets

Sensitive data should not be included in any of the configuration files provided during the build. The files will be
Expand Down Expand Up @@ -138,14 +154,14 @@ The buildpack accepts the following bindings:
### Type: `liberty`

| Key | Value | Description |
| ---------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|------------------------|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `server.xml` | `<file-contents>` | This file will replace the `defaultServer`'s `server.xml` and is not subject to any post-processing; therefore, any variable references therein must be resolvable. Optional. |
| `bootstrap.properties` | `<file-contents>` | This file will replace the `defaultServer`'s `bootstrap.properties`. This is one place to define variables used by `server.xml`. Optional. |

### Type: `dependency-mapping`

| Key | Value | Description |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------- |
|-----------------------|---------|---------------------------------------------------------------------------------------------------|
| `<dependency-digest>` | `<uri>` | If needed, the buildpack will fetch the dependency with digest `<dependency-digest>` from `<uri>` |

## Installing Features
Expand Down
Loading

0 comments on commit a2e0146

Please sign in to comment.