System Requirements:
- 32 GB RAM minimum
- 8 (logical) CPUs minimum
Install these tools first:
docker
(use whichever platform compatible implementation is most suitable to you)kubectl
(simplest viabrew install kubectl
)k3d
(simplest viabrew install k3d
)tilt
(simplest viabrew install tilt
)
Run this to create a k3d cluster (with local docker registry):
k3d cluster create liferay-tilt -p "8880:80@loadbalancer" --registry-create registry:0.0.0.0:5000
-
Starting in the root of the repository.
-
To bring everything up with defaults
tilt up
-
To start with clustering
tilt up -- --replicas=2
-
To bring everything down
Note: This deletes everything including the database volume.
tilt down
-
Access the Tilt UI at
-
You can access the default virtual instance at the address:
You can access the other virtual instances at:
and
K3d runs in the background and uses resources even after system restarts if you let it (as part if it's mission of being resilient).
-
Stop the k3d cluster when you're done with it to recover the resources
k3d cluster stop liferay-tilt
-
To start a stopped k3d cluster (to avoid having to recreate it)
k3d cluster start liferay-tilt # then tilt up
To open ports directly to a specific Liferay replica, run the following command:
Note: Replicas are integer indexed from
0
.
# specify the replica to connect to
REPLICA="#" # e.g. 0
kubectl port-forward dxp-${REPLICA} \
808${REPLICA}:8080 \
800${REPLICA}:8000 \
1131${REPLICA}:11311
To remote debug replica dxp-${REPLICA}
use the address: localhost:800${REPLICA}
.
Telnet to dxp-${REPLICA}
using the command: telnet localhost 1131${REPLICA}
The Tilefile
is setup to support 3 configuration properties:
domainBase
(defaultlocaltest.me
) - The base domain used for all domains (resolves globally to127.0.0.1
which makes it convenient for testing.)dxpDockerTag
(defaultliferay/dxp:latest
) - Set the docker tag of the Liferay service you want to run.mysqlVolumePolicy
(defaultRetain
) - Set whether the mysql db is deleted or not. Options areRetain
orDelete
.replicas
(default1
) - The number of replicas of the Liferay service to keep online.
To override the defaults permanently, create a tilt_config.json
in the root of the repository and set place the properties as the root keys of a JSON map.
e.g. tilt_config.json
{
"dxpDockerTag": "liferay/dxp:7.4.13.nightly"
}