Posts

Liferay Cloud CLI Introduction

Image
Liferay Cloud CLI Introduction How to manage Liferay Cloud using CLI 1. CLI Installation Install Liferay Cloud CLI using command: curl https://cdn.liferay.cloud/lcp/stable/latest/install.sh -fsSL | bash Verify installation: lcp version Note :  on Linux you can also create a symbolic link in /bin/bash directory to make lcp command available from any location. 2. Enable Shell Access In order to access the Liferay Cloud environment with the shell - the Shell Access must be enabled. Navigate to Settings → Access in your Liferay Cloud Console and enable the Shell Access: 3. Accessing the Shell Run lcp shell command to access the shell: Log in to Liferay Cloud Console: and specify the service name.  For liferay service also specify the instance to connect to: Now you’re connected to the Liferay server and can perform required checks and operations. 4. Accessing Logs You can check server logs with the lcp log command. See the list of available services using lcp list command: and c...

Liferay: Upgrade Steps Audit

Image
  Liferay: Upgrade Steps Audit How to monitor and run repeatedly the Upgrade Steps  Introduction Liferay Upgrade Steps are designed to be run only once in order to perform some changes on the portal: database schema changes, data or configuration updates. But sometimes they can fail, or implementation logic might be not correct, and we might need to run them again after proper adjustments. Also, we need to see the state of each upgrade module to know exactly which upgrade steps were run already, and which ones are still pending.  Audit and Running Upgrades Check Available Upgrade Steps To check pending upgrade steps on the portal - you can run a Gogo Shell command: upgrade:check You should see the list of upgrade steps not executed yet in the output: Note : navigate to Control Panel → Gogo Shell or use the telnet terminal to run Gogo Shell commands.  Inspect a Specific Upgrade Module To inspect a specific module you can use a Groovy Script. Navigate to Control Panel ...

Running Liferay as a Service

  Running Liferay as a Service How to run Liferay as a Service and make it auto-started on system reboot Introduction Sometimes servers hosting Liferay can be restarted. For a higher availability of the Liferay portal we need to make sure that Liferay is also started automatically during the system start. To achieve this - Liferay can be run as a service configured to auto-start. Configuration Define Liferay Service Configuration File To define a service for Liferay - create a liferay.service file inside /usr/lib/systemd/system directory as root user: sudo su  cd /usr/lib/systemd/system touch liferay.service nano liferay.service with the following content: [Unit] Description = Liferay Service After = network.target [Service] Type = forking User = user Group = user Environment = JAVA_HOME=[JAVA_HOME] Environment = CATALINA_PID=[LIFERAY-PATH]/tomcat[-x.x.x]/temp/tomcat.pid Environment = CATALINA_HOME=[LIFERAY-PATH]/tomcat[-x.x.x] Environment = CATALINA_BASE=[LIFERAY-PATH]/tomc...