Mastering Liferay Workspaces and Tooling

Course Overview

Setting Up CLI Tools for Clarity

Liferay provides two powerful CLI tools to streamline your development and cloud management workflows: Blade CLI and Liferay Cloud CLI. Clarity Vision Solutions recognizes the value of both these tools. They'll leverage Blade CLI to enhance their local development processes and Liferay Cloud CLI to efficiently deploy and manage client extensions within their Liferay SaaS project. In the following exercises, you'll install these tools and familiarize yourself with some basic commands.

Exercise: Installing Blade CLI

Blade CLI simplifies local development tasks, such as creating workspaces, generating projects, and deploying to local servers. Here, you'll install Blade using Liferay’s graphical installer.

  1. Go to the Liferay IDE Github Repo release page.

  2. Download the most recent LiferayWorkspace executable for your operating system (Windows, MacOS, or Linux).

  3. Run the installer.

  4. Click Next to step through the installer’s introduction.

  5. Select Don’t initialize Liferay Workspace directory and click Next.

    Skip Liferay Workspace initialization.

  6. Select Skip proxy configuration and click Next.
    If are behind a proxy server, please see Creating a Liferay Workspace for how to configure your proxy.

  7. Click Next to begin installing Liferay Workspace on your machine.

  8. Click Finish when completed.

Once finished, run the following commands to verify Blade is ready to use and up to date.

Validating Your Blade Installation

  1. Open a terminal window and run this command to check your Blade version:

    blade version
    
  2. Run this command to ensure Blade is up to date:

    blade update
    

    Updating Blade ensures you’re able to initiate workspaces for the latest Liferay releases, updated quarterly. Blade should begin updating automatically if an update is available.

  3. Run this command to view available Blade commands:

    blade help
    

    When you run this command within a Liferay workspace, it includes additional commands.

While you can run many Blade CLI commands from anywhere, some require you to be within a Liferay Workspace. To ensure commands execute as expected, navigate to the desired workspace directory.

Exercise: Installing Liferay Cloud CLI

Liferay Cloud CLI focuses on managing your cloud environments and deployments, particularly for Liferay's PaaS and SaaS offerings. Here, you’ll install Liferay Cloud CLI.

  • For *nix Systems
    Open your terminal, and run this command:
    curl https://cdn.liferay.cloud/lcp/stable/latest/install.sh -fsSL | bash
    

    If you get a permissions error, replace bash with sudo bash and run it again.
  • For Windows Systems
    Download the latest version of the Windows installer, and follow the steps in the wizard. After the installation completes, Liferay Cloud CLI should be ready to use!

Once finished, run the following commands to verify Liferay Cloud CLI is ready to use and up to date.

Validating Your Installation

  1. Open a terminal window and run this command to check your Liferay Cloud CLI version:

    lcp version
    
  2. Run this command to ensure Liferay Cloud CLI is up to date:

    lcp update
    
  3. Run this command to view available Liferay Cloud CLI commands:

    lcp help
    

To use the core Liferay Cloud CLI features, you must have a Liferay PaaS or SaaS project. You’ll learn more about this tool in Module 7: Working with Liferay Cloud.

Conclusion

Congratulations! You’ve installed the Liferay CLI tools that Clarity’s developers need to streamline their development workflows, efficiently building, deploying, and managing solutions both locally and in the cloud. Next, you’ll learn about available IDE tools that Clarity can use to further accelerate development.

  • Exercise: Installing Blade CLI

  • Exercise: Installing Liferay Cloud CLI

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy