Skip to main content
Version: 3.6.x

Configure ActiveMQ Container

Some aspects of the ActiveMQ application container configuration are specified in files that are checked into source control, in the CloudOps for Kubernetes Git project cloud-ops-kubernetes under path terraform/activemq/env-file. Elastic Path refers to these files as Resource Profiles.

The Resource Profiles specify configuration values that can be tuned per environment type, such as maximum allowed incoming connections and additional JVM arguments.

Two Resource Profile files are included out of the box:

  • terraform/activemq/env-file/dev.tfvars: An example that is a suitable starting point for a development or QA environment.
  • terraform/activemq/env-file/prod-small.tfvars: An example that is a suitable starting point for a production environment with low load requirements.

Creating a Custom Resource Profile

If is common for environments to be tuned to meet unique requirements. Complete the below steps to create custom resourcing profiles, to tune your ActiveMQ container configuration.

  1. Copy one of the existing files to a new file in the terraform/activemq/env-file directory. Ensure that new file has no spaces in the name and has the .tfvars extension.

  2. Make the desired changes to the values in the new *.tfvars file.

  3. Commit and push the changes to the CloudOps for Kubernetes repository and branch used by the Jenkins job create-or-delete-activemq-container.

You can create multiple resource profiles. It is possible to have a different resource profile for each type of environment, or even a unique profile for each environment.

Using the Resource Profiles

You specify which resource profile to use when you configure an ActiveMQ environment using the create-or-delete-activemq-container Jenkins job. That job contains a parameter named epStackResourcingProfile, and that parameter is where you specify which resource profile to use for the given environment.

If you use the multi-purpose-commerce-tool Jenkins job to deploy ActiveMQ, use its activeMqResourcingProfile parameter. That value is passed to the epStackResourcingProfile parameter in the create-or-delete-activemq-container job.

The value to specify for parameter epStackResourcingProfile is the file name, minus the extension. For example:

  • If you want to use terraform/activemq/env-file/prod-small.tfvars then specify prod-small in parameter epStackResourcingProfile.

  • If you created and want to use a custom file named terraform/activemq/env-file/my-custom-profile1.tfvars then specify my-custom-profile1 in parameter epStackResourcingProfile.

Contents of the Resource Profile Files

The Resource Profile files contain various values that impact different aspect of the ActiveMQ configuration. The details below are a guide to the purpose to the various values in the files.

  • Used to define additional Java Virtual Machine (JVM) arguments used by ActiveMQ: EP_ACTIVEMQ_X_JVM_ARGS.
  • Used to specify the Java heap size: EP_CONTAINER_MEM_ACTIVEMQ. Both the initial heap size and maximum heap size are set to this value. This does not set the Kubernetes pod memory request or limit.
  • Used to specify the Kubernetes CPU request: activemq_cpu_request.
  • Used to specify the Kubernetes CPU limit: activemq_cpu_limit.
  • Used to specify the Kubernetes memory request: activemq_memory_request.
  • Used to specify the Kubernetes memory limit: activemq_memory_limit.
  • Used to modify the maximum simultaneous incoming connections: MAXIMUM_CONNECTIONS.
note

Variables activemq_cpu_request, activemq_cpu_limit, activemq_memory_request and activemq_memory_limit are available in CloudOps for Kubernetes releases 3.7.1 and 3.6.3, and higher.

important

Keep activemq_memory_request and activemq_memory_limit at least 512MB greater than EP_CONTAINER_MEM_ACTIVEMQ so the process has sufficient native-memory headroom.

important

To use the EP_CONTAINER_MEM_ACTIVEMQ and EP_ACTIVEMQ_X_JVM_ARGS arguments, ensure that you are using and building your ActiveMQ image with the Elastic Path Docker project release 4.5.7 and higher.