Skip to main content
Version: 4.0.x

Environment Files Reference

The new V2 configuration jobs v2-configure-commerce-environment and v2-destroy-commerce-environment use YAML files to describe a Self-Managed Commerce environment's configuration. This section describes the content and format of those files.

note

For an overview of how the V2 deployment flow uses these files, see Configuring Environments with V2 Pipelines.

Introduction​

Here is a basic overview of using the configuration files. More details are provided later in this page.

Existing Commerce environments​

Most teams start by generating environment files that capture the configuration of Commerce environments that already exist. At a high level, that process looks like so:

  1. Use the v2-generate-env-files-for-existing-environment to generate YAML files for the existing environment.
  2. Review the generated files and commit them in the CloudOps for Kubernetes project under environments/<kubernetesNickname>/.
  3. Test the generated files by running v2-configure-commerce-environment in plan mode. Review the Terraform plan output.
  4. Begin using the YAML files to track environment configuration changes: update the YAML files in Git then run v2-configure-commerce-environment to apply the configuration changes.

For details about generating the YAML file for an existing Commerce environment, see Generate Environment Files for an Existing Environment.

Define new Commerce environments​

You can create a new Commerce environment by checking in new YAML files then running the v2-configure-commerce-environment job. When the job runs, it executes the necessary Terraform steps to create the environment as described in the YAML files.

You can define the configuration of a new Commerce environment by copying the folder of an existing environment, or by copying the reference files in the CloudOps for Kubernetes repository:

environments/reference/
commerce-values.yaml # required
activemq-values.yaml # required
mysql-container.yaml # choose one database file to match your desired database option
aurora-mysql-80.yaml # choose one database file to match your desired database option
postgres-rds.yaml # choose one database file to match your desired database option
existing-database.yaml # choose one database file to match your desired database option

The workflow for a new environment is:

  1. Decide what namespace you want the Commerce environment to be deployed in. That will be the value for <kubernetesNickname>.
  2. In your CloudOps for Kubernetes Git project, create a directory named environments/<kubernetesNickname>/.
  3. Copy the reference files for the Commerce environment's components.
  4. Update and refine the fields in the files for your use case.
  5. Remove any component file that should not be managed by the V2 jobs. There should be only one database file.
  6. Commit and push the reviewed files.
  7. Run v2-configure-commerce-environment with envFileSource=fromGit.

For example:

environments/prodlive1/
commerce-values.yaml
activemq-values.yaml
aurora-mysql-80.yaml

Details of the YAML Files​

An environment directory may contain these files:

FilenameComponent
commerce-values.yamlSelf-Managed Commerce stack
activemq-values.yamlActiveMQ JMS broker
mysql-container.yamlContainerized MySQL database
aurora-mysql-80.yamlAmazon Aurora MySQL 8.0 database
postgres-rds.yamlAmazon RDS for PostgreSQL database
existing-database.yamlExisting database server or cluster

Select one database file per environment.

commerce-values.yaml​

The commerce-values.yaml file describes how to configure the Self-Managed Commerce application services.

The schema is intentionally close to a Helm values.yaml file. V2 Ansible translates these fields into the Terraform variables used by the current CloudOps for Kubernetes modules.

This page explains the supported shape and important fields. For a full commented reference, see environments/reference/commerce-values.yaml in your CloudOps for Kubernetes Git repository.

Required top-level fields:

  • imageTag - Docker image tag for all Self-Managed Commerce application services. When initially creating a new Commerce environment, the Commerce images must exist with that tag in your registry before running v2-configure-commerce-environment. For information about building images, see V2 Builds and Artifacts. Subsequent code deploys can use the v2-deploy-commerce-images job, which does not require updating the imageTag field in the commerce-values.yaml file.
  • epEnvironment - Self-Managed Commerce config set, such as ci, qa, or prod-live, corresponding to an environment directory in your team's ep-commerce Git project. For more information, see Environment Directories in the Self-Managed Commerce documentation.

Example shape:

imageTag: "release-2026-03-18"
epEnvironment: "qa"
ingress:
enabled: true
autoscaling:
enabled: true
cortex:
heapSize: 3584
resources:
limits:
cpu: "1"
memory: "4608Mi"
replicas: 2
allowedCIDRs: "10.0.0.0/8"
studioAllowedCIDRs: "10.0.0.0/8"
... and so on.

See environments/reference/commerce-values.yaml for a full reference.

Global Options​

The values in the Reference value column are the values shown in environments/reference/commerce-values.yaml, except where noted.

FieldDescriptionReference value
containerUserContainer user override. Use only when you need to override the Terraform default.Terraform default: non-root
ingress.enabledCreate ingress resources for Commerce Manager, Cortex, Cortex Studio, and Integration.true
autoscaling.enabledEnable horizontal pod autoscaling for Cortex and Search Follower. If omitted, Terraform defaults to false.true
runtime.debug.enabledEnable Java debug.false
runtime.jmx.enabledEnable Java Management Extensions (JMX).false
runtime.jmx.authEnable JMX authentication.false
runtime.changesetsEnabledEnable EP changesets.false
runtime.enableUITestsEnable UI tests in Commerce Manager.false
runtime.heapdump.maxUsageHeapdump cleanup threshold percentage.90
runtime.additionalJvmArgs.*Additional Java Virtual Machine (JVM) arguments for all services or a specific service group.""
heapdumpStorage.sizeShared heapdump persistent volume claim size.100Gi

Per-Service Blocks​

Use these top-level keys:

  • cortex
  • commerceManager
  • integration
  • batch
  • searchLeader
  • searchFollower
  • dataSync

Common fields per service:

FieldDescription
heapSizeJVM heap size in MB.
resources.limits.cpuCPU limit. V2 applies this value to the Kubernetes resource request and limit.
resources.limits.memoryMemory limit. V2 applies this value to the Kubernetes resource request and limit.
replicasDeployment replica count, or the Horizontal Pod Autoscaler (HPA) floor when autoscaling is enabled for that service.
autoscaling.maxReplicasMaximum HPA replicas for Cortex and Search Follower when global autoscaling is enabled.
autoscaling.targetCPUUtilizationHPA target CPU utilization.
updateStrategy.maxSurgeRolling update max surge.
updateStrategy.maxUnavailableRolling update max unavailable.
pdb.enabledEnable PodDisruptionBudget for Cortex, Integration, or Search Follower.
pdb.maxUnavailablePodDisruptionBudget max unavailable.
pdb.minAvailablePodDisruptionBudget min available.
pdb.unhealthyPodEvictionPolicyPodDisruptionBudget unhealthy pod eviction policy.
podAnnotationsPod annotations map.

Some fields apply only to specific services:

FieldDescription
integration.roleIntegration service role. Use standalone, hub, or spoke.
searchLeader.storage.sizeSearch Leader index persistent volume size.
searchLeader.storage.storageClassSearch Leader index storage class.
dataSync.enabledDeploy the Data Sync service.
dataSync.targetNicknameTarget namespace for Data Sync replication.

Do not add resources.requests to commerce-values.yaml for V2. The current Terraform modules use one CPU value and one memory value per service, and V2 maps resources.limits to both requests and limits.

Ingress Allow Lists​

FieldService
cortex.allowedCIDRsCortex API
cortex.studioAllowedCIDRsCortex Studio
commerceManager.allowedCIDRsCommerce Manager
integration.allowedCIDRsIntegration Server
tip

When CIDR fields are omitted, Terraform defaults to 127.0.0.1/32, which is effectively deny-all for ingress. The reference files use 10.0.0.0/8 examples. Replace them with your network CIDRs to define the required access.

Optional Services​

FieldDescriptionReference value
mock.enabledDeploy the mock service.false
mock.resources.limits.cpuMock service CPU limit.0.25
mock.resources.limits.memoryMock service memory limit.768Mi
infoPage.enabledDeploy the deployment info page.false
infoPage.allowedCIDRsCIDR allow list for the info page.10.0.0.0/8
dataSync.enabledDeploy the Data Sync service.false
dataSync.targetNicknameTarget namespace for Data Sync replication.""

SMTP and Secure Config​

These fields are supported in commerce-values.yaml. The schema may change in a future release.

FieldDescription
includeAWSSESUse Amazon Simple Email Service (SES).
smtpHostSimple Mail Transfer Protocol (SMTP) host.
smtpPortSMTP port.
smtpSchemesmtp or smtps.
smtpUserSMTP user.
smtpPassSMTP password.
epCommerceConfigRepoSecure config Git repository SSH URL.
epCommerceConfigSshKeyBase64-encoded SSH private key.
epCommerceConfigGpgKeyBase64-encoded GNU Privacy Guard private key.
epCommerceConfigHostKeySSH host key for the repository.

activemq-values.yaml​

Use activemq-values.yaml to configure the ActiveMQ JMS service.

FieldRequiredDescriptionDefault or reference value
imageTagYesActiveMQ image tag.
adminConsoleAllowedCIDRYesCIDR allowed to reach the admin console.
containerUserNoContainer user override. Use only when you need to override the default non-root container user.non-root
heapSizeNoBroker JVM heap in MB.1024
resources.requests.cpuNoKubernetes CPU request for the ActiveMQ container.1
resources.requests.memoryNoKubernetes memory request for the ActiveMQ container. The value should be least 512MB greater than heapSize so the process has sufficient native-memory headroom.2Gi in the reference file; Terraform default is 1.5Gi
resources.limits.cpuNoKubernetes CPU limit for the ActiveMQ container.1
resources.limits.memoryNoKubernetes memory limit for the ActiveMQ container.2Gi in the reference file; Terraform default is 1.5Gi
maximumConnectionsNoMaximum broker connections.1000
extraJvmArgsNoAdditional JVM arguments.""
podAnnotationsNoPod annotations map.{}
tip

Use 127.0.0.1/32 for adminConsoleAllowedCIDR if you want the ActiveMQ admin console to be effectively inaccessible by default.

Database Files​

Specify one of the below database files to provision and configure a database server:

  • mysql-container.yaml
  • aurora-mysql-80.yaml
  • postgres-rds.yaml

Specify existing-database.yaml below if you want to configure the Commerce environment's JDBC settings to use an existing database server, without v2-configure-commerce-environment managing or modifying the database server itself.

  • existing-database.yaml
note

You can omit the database file entirely if the Commerce environment is already deployed in the kubernetesNickname namespace and is already using the desired database. However, using existing-database.yaml is preferred and recommended because that allows you to explicitly control the environment's JDBC parameters.

More details follow.

mysql-container.yaml​

Use mysql-container.yaml for short-lived and test-oriented environments where a MySQL container runs inside the cluster.

FieldRequiredDescriptionDefault
imageTagYesMySQL container image tag.
containerUserNoContainer user. Use root or non-root.non-root
manageDatabaseSecretNoWhether Terraform manages the Kubernetes database credentials secret.true
createSecretsManagerSecretNoWhether Terraform creates an AWS Secrets Manager secret.false
secretsManagerSecretNameNoAWS Secrets Manager secret name to use when createSecretsManagerSecret is enabled.ep-c4k/rdbms/<clusterIdentifier>

aurora-mysql-80.yaml and postgres-rds.yaml​

Use aurora-mysql-80.yaml for long-lived environments that should provision an Amazon Aurora MySQL 8.0 cluster. Use postgres-rds.yaml for long-lived environments that should provision an Amazon RDS PostgreSQL instance.

Both files share the same field shape.

FieldRequiredDescriptionDefault
clusterIdentifierNoCluster or instance identifier. Must be unique within your AWS account.ep-aurora-mysql or ep-postgres-rds
encryptDatabaseNoEnable encryption.true
enablePerformanceInsightsNoEnable Performance Insights.false
engineVersionNoEngine version. Empty resolves at runtime.""
encryptionKeyNoCustomer-managed encryption key ID or full key ARN. Empty uses the AWS-managed key.""
dbInstanceClassNoInstance class.db.r6g.xlarge
backupRetentionDaysNoBackup retention in days.14
backupWindowPreferenceNoBackup window preference.AmazonsDefault
enableAuditLoggingNoEnable audit logging.false
snapshotIdentifierOnly for snapshot restoreSnapshot ID when restoring.
skipSnapshotVersionValidationNoSkip snapshot version check.false
credentialsSecretArnOnly for snapshot restoreSecrets Manager secret ARN for snapshot restore.
manageDatabaseSecretNoWhether Terraform manages the Kubernetes database credentials secret.true
createSecretsManagerSecretNoWhether Terraform creates an AWS Secrets Manager secret.false
secretsManagerSecretNameNoAWS Secrets Manager secret name to use when createSecretsManagerSecret is enabled.ep-c4k/rdbms/<clusterIdentifier>

Shared Secret-Management Options​

The below optional fields apply to mysql-container.yaml, aurora-mysql-80.yaml and postgres-rds.yaml:

  • manageDatabaseSecret - Defaults to true. Leave this at the default unless you are intentionally manipulating database-secret ownership during a database switch. For more information, see Database Server Options.
  • createSecretsManagerSecret - Defaults to false. When set to true, CloudOps for Kubernetes also stores the JDBC details in AWS Secrets Manager. Optionally set secretsManagerSecretName to override the default Secrets Manager secret name when createSecretsManagerSecret is enabled.

existing-database.yaml​

Use existing-database.yaml when you want to configure Commerce to use a database on an existing database server or cluster, but you do not want to affect or modify the database server's configuration. When using this option, the v2-configure-commerce-environment job will only configure the Commerce environment with the JDBC parameters required to connect to the database server and indicated database.

Preparation​

The existing-database.yaml file contains only one field: the ARN of an AWS Secrets Manager secret where the JDBC information and credentials are stored. Instead of writing the required user names and passwords into the YAML file, you must record them in an AWS Secrets Manager secret in the same AWS account as the cluster. You then specify that secret's ARN in the credentialsSecretArn field.

The Secrets Manager secret contains key/value pairs. Some are required and some are optional.

The AWS Secrets Manager secret must contain these required keys:

  • EP_DB_HOSTNAME
  • EP_DB_ROOT_USER
  • EP_DB_ROOT_PASS
  • EP_DB_NAME_TYPE: either mysql-aws or postgresql-aws

The following keys are optional. If they are omitted, Terraform generates values for a new database and user and configures Commerce to use them. When you run data-pop with the reset-db command, data-pop creates the user and database:

  • EP_DB_NAME
  • EP_DB_USER
  • EP_DB_PASS

These keys are optional. If any are omitted then a default value will be derived and used instead.

  • EP_DB_PORT
  • EP_DB_CONNECTION_PARAMS
  • EP_DB_JDBC_DRIVER_CLASS
  • EP_DB_SCHEMA_NAME
  • EP_DB_USER_SHORT

The EP_DB_URL value is composed automatically from the other fields.

important

If you use existing-database.yaml, the EP_DB_NAME value must be unique per Self-Managed Commerce environment. Do not specify the name of a database that already exists on the same database server and is used by a different Commerce environment.

To use an existing database specified by EP_DB_NAME, the database user EP_DB_USER must already exist on the server and have permission to access the database.

If needed, you can run the data-pop reset-db command to drop and recreate the user and database. All data in the database will be lost and the database recreated from the change sets in your ep-commerce branch.

existing-database.yaml fields​

FieldRequiredDescription
credentialsSecretArnYesAmazon Resource Name (ARN) of the AWS Secrets Manager secret that contains the required database connection information. For new Commerce environments, create and populate this secret in advance. The v2-generate-env-files-for-existing-environment job creates it for you when importing an existing environment with databaseAdoptionApproach=manage-only-database-secret.

Advanced Cases​

Create a Database Server from a Snapshot​

Snapshot restore is a less common path for aurora-mysql-80.yaml and postgres-rds.yaml.

For either provider, use:

  • snapshotIdentifier - Required when restoring from a snapshot.
  • skipSnapshotVersionValidation - Optional. Defaults to false.
  • credentialsSecretArn - Required when restoring from a snapshot.

When credentialsSecretArn is used for snapshot restore, the AWS Secrets Manager secret must contain:

  • EP_DB_ROOT_PASS
  • EP_DB_NAME
  • EP_DB_USER
  • EP_DB_PASS

Use this path only when you specifically need to create a new database server from an existing snapshot.

Move a Commerce Environment to Another Database Server​

Moving an existing Commerce environment to another database server is an advanced change-management exercise.

If you need to switch database servers:

  • Plan and test the cutover carefully.
  • Understand which job or module owns the Kubernetes database secret.
  • Use the database-secret ownership options intentionally during the migration.

For the detailed switching procedure, see Database Server Options.

Templates​

The fromTemplate mode is primarily intended for template-driven and ephemeral flows such as v2-commerce-branch-validation.

The shipped example templates are in:

environments/branch-validation-template/

That directory contains:

  • commerce-values.yaml.j2
  • activemq-values.yaml.j2
  • mysql-container.yaml.j2

The template support in v2-configure-commerce-environment renders all *.yaml.j2 files in the selected template directory. Missing optional templates are skipped.

For long-lived environments, checked-in files under environments/<kubernetesNickname>/ are usually the better fit.