Installing Liferay DXP in Amazon Web Services
You can run Liferay DXP on AWS using a new or an existing EKS cluster; a plain installation or Liferay’s offering on AWS Marketplace. Either installation requires several tools, including Helm, Terraform, and AWS CLI.
Using Liferay DXP in AWS uses a special Helm chart. See Provisioning Liferay in Kubernetes for more information.
Prerequisites
-
Install Git CLI.
-
Install AWS CLI.
-
Configure AWS CLI to use your IAM credentials.
-
Install the Terraform CLI.
-
Install the Helm CLI.
-
Install the kubectl CLI.
-
Install the Oras CLI (plain installation only).
Log into AWS
First, use the CLI to log into AWS.
-
Export your profile to use for the AWS SDK and its tools:
-
Log into AWS.
Clone the Terraform Files
Next, clone the terraform files from the repository:
Now you have all the files necessary to interface with an EKS cluster. Next, you can
Create a New EKS Cluster
Use the Terraform CLI to create a new EKS cluster complete with a VPC and networking:
-
From your terminal’s working directory after the previous step (
liferay-aws-terraform/cloud/terraform/aws/
), navigate to theeks/
directory. -
Edit
terraform.tfvars
to configure your cluster’s infrastructure as needed. See the variables invariables.tf
for reference.NoteBy default, the system deploys an EKS cluster in the US West (Oregon) region (
us-west-2
), spanning two availability zones. -
Run these Terraform commands:
-
Follow the prompt to apply your changes.
-
Write the result of the
terraform output
command to theterraform.tfvars
file in thedependencies/
directory (inliferay-aws-terraform/cloud/terraform/aws/
):
Use an Existing EKS Cluster
Create dependent services to use with your EKS cluster:
-
From your terminal’s working directory (
liferay-aws-terraform/cloud/terraform/aws/
), navigate to thedependencies/
directory. -
Edit
terraform.tfvars
to configure your cluster’s infrastructure as needed. See the variables invariables.tf
for reference. -
Run these Terraform commands:
-
Follow the prompt to apply your changes.
Configure Kubernetes for Helm
To use Helm, you must use the AWS CLI to update your Kubernetes configuration.
-
Navigate to the
dependencies/
directory (inliferay-aws-terraform/cloud/terraform/aws/
). -
Run this command:
-
Test this command to confirm that it works:
Install the Nginx Ingress Controller
Install the Nginx Ingress Controller to expose the Liferay DXP instance to the internet:
Launch Liferay with Helm
Next, use helm
to launch Liferay. Liferay uses different helm charts for the plain and AWS Marketplace installations.
Installing the Liferay AWS Marketplace Helm Chart
-
Go to Liferay DXP’s offering on AWS Marketplace.
-
On the Launch this software page, find the Launch instructions section and copy the commands listed under Step 2: Launch the software.
You can ignore step 1.
-
In the commands you copied, add these arguments to the
helm install
command: -
Execute the commands you copied, including the modified
helm install
command.The command installs Liferay DXP with Liferay’s official AWS Marketplace Helm chart, but it takes some time to complete.
-
Run this command to watch for your Liferay DXP installation to complete:
-
Wait for the installation to complete to proceed.
Installing the Plain Liferay AWS Helm Chart
-
In the
dependencies/
directory (inliferay-aws-terraform/cloud/terraform/aws/
), create aaws-helm-values.yaml
file with the following content: -
Choose from the available versions of the helm chart using the Oras CLI:
-
Store the selected version in a variable called
LIFERAY_AWS_HELM_CHART_VERSION
: -
Install the Liferay AWS helm chart:
ImportantYou must use a slim Liferay Docker image. For more information on Liferay image types, see Docker Image Versions
-
Run this command to watch for your Liferay DXP installation to complete:
Wait for the installation to complete to proceed.
Log Into Your Live Instance
Now Liferay DXP is ready in your EKS cluster, but you must retrieve your credentials to access it.
-
Extract your Liferay installation’s public DNS with this command:
The command returns the address you can use to access your installation.
-
In your web browser, paste the address you retrieved from the previous step with
https://
in front, like this:Once it finishes loading, a page appears with a Sign In button.
-
Run this command to retrieve your administrator password:
-
Log in using
test@liferay.com
as the email and the password you retrieved from the previous step.
Congratulations! You now have access to your own Liferay DXP installation from AWS marketplace.