Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Adding the Sealights java agent into you Pivotal Cloud Foundry / (formerly VMWare Tanzu Application Services) is done by using the standard java buildpack 4.39 or later.

Info

​Complimentary information is detailed in https://github.com/cloudfoundry/java-buildpack/blob/main/docs/framework-sealights_agent.md

Prerequisite: Installing CF Java buildpack

The java-buildpack is a Cloud Foundry buildpack for running JVM-based applications and configured in the following way:

...

one of the following ways:

Option A: In the manifest.yml of your app, add the cloudfoundry java-buildpack

Code Block
---
applications:
-  name: yourApp
    buildpacks:
    - https://github.com/cloudfoundry/java-buildpack

Option B: Add the buildpack through the command line

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:

Linux

Code Block
languagebash
cf cups sealights -p '{"token":"ey…"}'

Windows

...

Code Block
languagepowershell
cf cups sealights -p "{\"token\":\"ey…\"}"
Note

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

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
    languageyaml
    env:
      JBP_CONFIG_SEALIGHTS_AGENT: '{build_session_id: c2e21d80-ad88-4ff9-9e81-57c781ac5fe6, lab_id: yourLabId, auto_upgrade: false, version: +}' 
  • pass them as environment variables for the application via a dedicated command:

    Code Block
    cf set-env [my-application] JBP_CONFIG_SEALIGHTS_AGENT: '{build_sessionlab_id: 5d4...00b4"myLabId", lab_idproxy: myLabId}'
Info

​The available configuration keys are documented here:
Sealights java-buildpack configuration

Offline buildpack

...

  • "http://myproxy.mycompany.int"}'
  • set up as environment variables via your administrative console:

    Image Added

Available configuration keys are

Name

Description

build_session_id

Sealights' Build Session ID for the application. Leave blank to use the value embedded in the jar/war artifacts

proxy

Specify a HTTP proxy used to communicate with the Sealights backend. Required when a corporate network prohibits communication to cloud services.
The default is to have no proxy configured. This does not inherit from http_proxy/https_proxy or http.proxyHost/https.proxyHost, you must set this specifically if a proxy is needed.

lab_id

Specify a Sealights Lab ID

auto_upgrade

Enable/disable agent auto-upgrade. Off by default.

version

The version of Auto-reconfiguration to use. Candidate versions can be found in this listing.
If auto_upgrade is turned on, a different version may be downloaded and used at runtime