Blogs
Setting Up Glowroot on LXC-SM, Liferay Cloud
Fabian's blog illustrates Glowroot setup in an on-premises environment here. Now, let's outline the steps for integrating Glowroot within Liferay's LXC-SM cloud infrastructure.
Key Components and Configuration Files:
-
LCP.json:
- This pivotal file, residing in the 'liferay' directory, serves as the central configuration file for LXC-SM. It allows adjustments to memory allocation, CPU cores, and various other system-level settings within the Liferay Cloud Platform.
-
Config Folder:
- Within the 'configs' directory, the subfolders like 'dev', 'uat', and 'prod' house environment-specific configurations. These configurations encompass deployment-related information tailored for each environment.
-
Glowroot Parameters:
-
-javaagent:/opt/liferay/glowroot/glowroot.jar
: Loads Glowroot's instrumentation into the JVM. -
-Dglowroot.data.dir=/opt/liferay/data/glowroot-data/data
: Specifies the directory path for Glowroot's collected data.
-
Integration Steps:
-
Download and Unzip Glowroot
- Download the Glowroot release from GitHub and unzip it under the respective environment folder (e.g., uat).
-
liferay/LCP.json and liferay/configs/dev/{deploy, osgi, patching, scripts/remove-log-files.sh}
-
Configure LCP.json (Liferay Configuration)
- Add the following lines to the LCP.json file in the "liferay" folder under the respective environment (e.g., dev, uat, prd):
-
"environments": { "uat": { "env": { "LIFERAY_JVM_OPTS": "-javaagent:/opt/liferay/glowroot/glowroot.jar -Dglowroot.data.dir=/opt/liferay/data/glowroot-data/data" } } }, "ports": [ { "port": 4000, "external": true } ]
-
Make sure to adjust the paths according to your Glowroot installation.
-
Build and Deploy
- Build and deploy the changes to the respective environment using your deployment process.
-
Verify Glowroot Setup
- Access Liferay in your web browser.
- In LXC, go to the "Network" tab.
- Locate port 4000 and click on the link.
- Change "https" to "http" in the URL to access the Glowroot interface.
Insights for LXC-SM Integration:
- Tailoring Glowroot integration steps specifically for Liferay's LXC-SM cloud environment ensures optimized monitoring capabilities, aligning with on-premises setup while being customized for the cloud infrastructure.