Skip to main content
Version: 8.7.x

Wiremock Container

Simulate external system responses to assist with the development of integration features. This service is only deployed on test environments when actual integrations are not implemented.

Prerequisites​

The mock container image must be built and available. For information on building container images, see Building Container Images.

Suitable Environment Types​

The Mock application is only used for application testing and is only deployed in development or test environments.

Include in Development and QA Environments?Include in Authoring Environments?Include in Live Environments?
OptionalNoNo

Configuration​

The sections below describe typical configurations.

Container user​

The application container images are built to be run as user app_runner (user ID 10001), with user group app_runner (group ID 10001). Ensure that you specify the correct user and group when you run the container. Volumes should also be readable and writeable by this user. Consult your container orchestration documentation for more information.

tip

Below is an example security context snippet for a Kubernetes deployment.yaml file.

securityContext:
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001

Note about production sizing and tuning​

The values shared in this document are suggestions that are known to work well in typical scenarios.

Resource allocation​

Resource allocation can vary by usage and load. Below are typical values.

ResourceNon ProductionProduction Like (See Note)
Container Memory (MB)768N/A
Container Cores0.25N/A
Java Heap (MB)N/AN/A

Scaling and replicas​

This service is stateful and should not be scaled to maintain a consistent user experience.

ConfigurationNon ProductionProduction Like (See Note)
Minimum Replicas1N/A
Maximum Replicas1N/A
Max Surge (%)25N/A
Max Unavailable (%)25N/A

Ports​

PortNon ProductionProductionPurposeComment
8080YesN/AAllows other Commerce services to communicate with Wiremock.This port should only be exposed to the Commerce services in the same environment.
8180YesN/AHealth and liveness checks.This port should only be exposed internally, ideally only to the container orchestrator.
8888OptionalN/AJMXThe container listens on this port when the ENABLE_JMX environment variable is set to true. This port should only be exposed internally to users and tools that require access to JMX data.
1081OptionalN/AJava debugger.The container will listen on this port when the ENABLE_DEBUG environment variable is set to true. This port should only be exposed internally, to developers who debug Java application code. This port is typically not open in production.

Health, Liveness and Readiness​

Container orchestration tools monitor the health and responsiveness of containers. For information about supported endpoints, see Health Monitoring Usage.

Volumes​

The Mock application does not have specific support or recommendations for volumes.

Environment Variables​

The Mock application has limited configurability and does not support the environment variables used by other Commerce applications.