Loading

How to Deploy CloudHub Applications Using Anypoint CLI Command Line Tool

Data pubblicazione: Mar 2, 2024
Operazione

GOAL

This article provides a tutorial for deploying Mule Applications or API's to MuleSoft's Anypoint Platform - CloudHub. The result will be a running application deployed into your organisations CloudHub environment.

The commands needed for this exercise are:
> cloudhub region list
> cloudhub runtime list
> runtime-mgr cloudhub-application deploy

PREREQUISITES

  • Anypoint CLI installed on your workstation
  • A built Mule Application (.zip or .jar)
  • A valid and operational Anypoint Platform Account configured in Anypoint CLI as per the document: logging in
Fasi
Log into Anypoint CLI and using the "use" command ensure you move to the desired business group and environment for this deployment.

The deploy command requires some options that are not always obvious, so we will go into some details concerning --runtime --workers --workerSize --region

--workers
Options are 1, 2, 3, 4, 5, 6, 7, 8
This option configures how many workers will be built to run the application

--workerSize
Options are 0.1, 0.2, 1, 2, 4, 8, 16
This option sets the vCore size of the worker

--runtime
Requires the numeric version number of the Runtime, example: 3.9.0, 3.9.1, 4.1.3, 4.1.4 etc
For full list of possible runtimes execute:
> cloudhub runtime list

--region
Requires the string name of the deployment region. To see the full list, execute:
> cloudhub region list

For the purposes of this tutorial, deployment of a simple "hello world" application will be deployed to Mule Runtime 4.1.4

To see the full list of options for the 'deploy' command:
> help runtime-mgr cloudhub-application deploy

This is the command:
> runtime-mgr cloudhub-application deploy --runtime "4.1.4" --workers "1" --workerSize "0.2" --region "us-east-1" --property "http.port:8081" --property "https.port:8082" --property "username:tutorialtest" "hello-world-deploy-tutorial" "/Users/Shared/hello-world.jar"

Deployment will take a few minutes as the instance and runtime is built and deployed.

To confirm success, execute:
> runtime-mgr cloudhub-application describe hello-world-deploy-tutorial

Resources:

Anypoint CLI 3.x Documentation
Anypoint CLI 2.x Documentation
 
Numero articolo Knowledge

001114555

 
Caricamento
Salesforce Help | Article