Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 1.73 KB

File metadata and controls

72 lines (51 loc) · 1.73 KB

Jolokia api-server

The Jolokia api-server is an express js server that serves an OpenApi defined api as an overlay to jolokia servers, translating the jolokia answers to json when needed.

Checkout the api.md file to know more about what operations are currently supported.

Dev setup

yarn build
yarn start

Documentation generation

After updating the openapi.yml file, please make sure to generate the documentation:

yarn run build-api-doc

Production build

  1. Build the image:
    docker build -t quay.io/artemiscloud/activemq-artemis-jolokia-api-server:latest .
  2. Push the image to image registry:
    docker push quay.io/artemiscloud/activemq-artemis-jolokia-api-server:latest

deploy the service

./deploy.sh [-i <image> -n]

The optional -i <image> (or --image <image>) argument allows you to pass in the plugin image. If not specified the default quay.io/artemiscloud/activemq-artemis-jolokia-api-server:latest is deployed. for example:

./deploy.sh -i quay.io/<repo-username>/activemq-artemis-jolokia-api-server:1.0.1

The deploy.sh script uses oc kustomize (built-in kustomize) command to configure and deploy the plugin using resources and patches defined under ./deploy directory.

To undeploy, run

./undeploy.sh

Notes about the JWT secret

The api server uses SECRET_ACCESS_TOKEN env var to get the secret for generating jwt tokens. It has a default value in .env for dev purposes.

In production you should override it with your own secret.

The jwt-key-gen.sh is a tool to generate a random key and used in Dockerfile. It makes sure when you build the api server image a new random key is used.