Adding the Sealights java agent into you Pivotal Cloud Foundry / VMWare Tanzu Application Services is done by using the standard java buildpack.
Prerequisite: Installing CF Java buildpack
The java-buildpack
is a Cloud Foundry buildpack for running JVM-based applications and configured in one of the following wayways:
Option A: In the manifest.yml
of your app, add the cloudfoundry java-buildpack
...
Code Block |
---|
cf push -b https://github.com/cloudfoundry/java-buildpack |
...
If you need to create an offline buildpack without network access you can do
...
so following the instructions here: https://github.com/cloudfoundry/java-buildpack#offline-package
Create your Sealights User-Provided service
Create a Sealights User-Provided Service and configure it with an agent token. This should be done once, before configuring the first application.
A different name for the user-provided service may be used, but it has to include the word "sealights" (lowercase) for the integration to work
...
Linux |
| |||||
Windows |
...
|
Note |
---|
A different name for the user-provided service may be used, but it has to include the word |
The token may later be changed using: cf update-user-provided-service sealights -p ....
...
Bind your application to your Sealights service
Bind the User-Provided Service with your application using the following command
Code Block |
---|
cf bind-service [app name] sealights |
...
If the build session id, lab id, proxy or other settings need to be configured, you may either:
hard-code them in
manifest.yml
:Code Block language yaml env: JBP_CONFIG_SEALIGHTS_AGENT: '{lab_id: yourLabId}'
pass them as environment variables for the application:
Code Block cf set-env [my-application] JBP_CONFIG_SEALIGHTS_AGENT: '{lab_id: myLabId}'
Info |
---|
The available configuration keys are documented here: |
Offline buildpack
...