Micro Learning: Enhancing Developer Productivity with ENT CLI

This micro learning series will help you get familiar with Entando CLI (ENT) which simplifies building and deploying applications for Kubernetes. ENT CLI is your starting point and guide to all development on the Entando platform.

Ed Shin - martedì 1 giugno 2021
Tags: Technical

Micro Learning Series: ENT CLI

We’ll cover how to easily configure your environment, spin up your own Entando instance, package applications for deployment on Kubernetes, generate micro frontends and microservices from a database model, and use diagnostic utilities to debug your application when something goes wrong.

  1. Enhancing Developer Productivity
  2. Environment Setup
  3. Quickstart
  4. Packaging and Deployment
  5. Working with Multiple Environments
  6. Micro Frontend & Microservice Generation
  7. Component Repository
  8. Utilities & Diagnostics

Each lesson is designed to take ~5 minutes so you can learn without disrupting your workday.

What You’ll Learn

In this lesson, we’ll install ENT CLI, and explore its capabilities. In the next lesson, we’ll use ENT CLI to quickly spin up an instance of Entando.

Install ENT CLI

Let’s dive right in, and install ENT CLI.

bash <(curl -sfL https://get.entando.org/cli) --update

Next, we’ll activate it so we can use the “ent” command.

source "$HOME/.entando/activate"

Check Install

To check that the “ent” command is working, type:

ent which

This tells you where ENT is installed, and which version you’re using.

ENT Commands

Now let’s check out ENT’s capabilities.

ent help

~~~~~~~~~~~~~~~~~~~
 Entando CLI 
~~~~~~~~~~~~~~~~~~~

> Essentials:
  - Activate using:  /Users/ed/.entando/ent/v6.3.2/cli/v6.3.2/activate
  - Dectivate using: /Users/ed/.entando/ent/v6.3.2/cli/v6.3.2/deactivate

> Available commands:
  - app                    => Helps managing an EntandoApp
  - app-info             => Displays information about an entando app
  - bundler              => Wrapper for the ENT private installation of the entando bundle tool.
  - check-env          => Checks the environment for required dependencies and settings
  - diag                   => Runs some diagnostic and collects the related info in a tgz file
  - ecr                     => Helps managing an the Entando ECR
  - ent                     => Helps managing an the local ents
  - help                   => Helps in having help
  - host                   => Helps managing the system that hosts the quickstart VM
  - jhipster              => Wrapper for the ENT private installation of jhipster.
  - kubectl              => Helper for using kubectl in ent managed scenarios
  - npm                  => Wrapper for the ENT private installation of npm. This is mostly for internal use
  - pod                   => Displays information related to a set of pods
  - prj                     => Helps managing Entando bundle projects
  - profile               => Helps managing an EntandoApp
  - quickstart          => Helps locally installing entando instances
  - run-tests            => Run the internal tests

You can get detailed information by using the help command, but it can be useful to have a high level overview of the commands and the use cases they were designed for.

Packaging & Deployment

Command: prj

One of the most useful commands, ent prj (project) is how you package Entando sources for distribution across your Kubernetes cluster.

In addition to automatically generating everything you need to get a Spring Boot microservice running in Kubernetes, ENT coordinates the deployment of your frontend components that talk to your microservices on a micro frontend architecture.

ENT automates the process of creating and publishing Docker images, Helm templates (deployments), and custom resources. It also applies these updates to your cluster.

Environment Setup

Command: check-env

Easily set up your development environment for a specific Entando version and instance.

Quickstart

Command: quickstart

Spin up a new Entando instance in your local development environment or Kubernetes cluster.

Working with Multiple Environments

Command: profile

Use profiles to easily switch between different Entando applications on different clusters using different kubernetes contexts, kubeconfig files, namespaces where your application is deployed, and other configuration data.

Component Repository

Command: ecr

View components or packaged components (bundles) that are available for your application. Install, uninstall, and deploy them via the command line. A convenient way for developers to update a running application in your Kubernetes cluster without having to manually complete the steps as a site administrator.

Code Generator

Command: jhipster

Generate database entities, microservices and micro frontends.

Bundle Export / Import

Command: bundler

Snapshot an entire application at a specific point in time, publish snapshots (or application templates) to a shared component repository, migrate applications from one environment to another, and use base templates to easily create new Entando applications.

Utilities & Diagnostics

Commands: app, app-info, bundler, diag, host, kubectl, npm, pod

Simplify development environment setup by automatically checking, installing, and configuring all dependencies required for development. View the current state of your application, extract all Kubernetes logs including Entando pods, container logs, and scripts, including Kubernetes level logs, infrastructure level logs, status, and Kubernetes objects.

What’s Next?

In the next lesson, we’ll use the quickstart command to set up our own Entando instance on Kubernetes.

 

ADDITIONAL RESOURCES

Additional Resources

Vuoi modernizzare le tue App?

 

Scopri come una Application Composition Platform può aiutarti.

Veloce, personalizzabile, facilmente scalabile: sono queste le tre caratteristiche principali che la tua applicazione web deve avere se vuoi che rappresenti un vero vantaggio competitivo per la tua azienda.

SCARICA IL WHITEPAPER
Entando_WhitePaper.png