Configuring Liferay in AWS
Since Liferay installations hosted in AWS use Helm, you must configure and customize Liferay using the Helm CLI. You can write as many .yaml
files as you need. To update a customization you’ve already made using helm
, you can rewrite its old file and pass it again or pass a new file with the updated property. Whenever duplicate properties are passed like this, Helm only considers the latest one. For more information, see Helm’s official documentation.
Even though you can use multiple .yaml
files to gradually add new properties, it is recommended to write all values into a single values.yaml
file. Passing values using the helm --set
command instead of writing them into .yaml
files is not recommended.
Composable Properties
For some properties, like environment variables, you can add onto previous configurations without resetting them by using their composable properties. To use composable properties, you must prepend the word custom
to the property name (e.g. env
becomes customEnv
). Then, you must also use a discriminator key using x-
as a prefix. You can name the key whatever you’d like as long as there are no duplicate names for the same property.
This is a list of all composable properties in Liferay:
customEnv
customEnvFrom
customInitContainers
customPorts
customPullSecrets
customVolumeClaimTemplants
customVolumeMounts
customVolumes
Liferay Docker Image
One of the first decisions to make when deploying Liferay via Helm is to select the Liferay Docker image. By default, Helm uses the liferay/dxp
image repository and the latest
tag. You can choose a specific Docker image by using the image
property:
image:
repository: [repository]
tag: [tag]
Environment Variables
You can add environment variables using the env
property. To avoid overwriting all of the default values, use the composable property customEnv
. This way, you can add new environment variables gradually.
customEnv:
x-custom-env:
- name: ENV_VAR
value: example
- name: SECRET_ENV_VAR
valueFrom:
configMapKeyRef|fieldRef|resourceFieldRef|secretKeyRef: {}
Portal Properties
You can configure portal properties using portalProperties
. The value must use Yaml’s literal block style:
portalProperties: |
include-and-override=portal-developer.properties
company.default.virtual.host.mail.domain=main.dxp.docker.localhost
company.default.virtual.host.name=main.dxp.docker.localhost
company.default.web.id=main.dxp.docker.localhost
Container Resources
For improved performance and cost control, configure resource limits and requests for the containers. To manage container resources, like CPU and memory, use the resources
property:
resources:
limits:
cpu: 4000m
memory: 8Gi
requests:
cpu: 2000m
memory: 6Gi