Similar to MuleSoft Surat Live Demonstration Virtual Meetup#4 - Automate Anypoint VPC, VPN and DLB Application Deployment and Platform Setup With Anypoint CLI
Serverless in production, an experience report (linuxing in london)Yan Cui
Similar to MuleSoft Surat Live Demonstration Virtual Meetup#4 - Automate Anypoint VPC, VPN and DLB Application Deployment and Platform Setup With Anypoint CLI (20)
MuleSoft Surat Live Demonstration Virtual Meetup#4 - Automate Anypoint VPC, VPN and DLB Application Deployment and Platform Setup With Anypoint CLI
1. [Surat] MuleSoft Meetup Group
Automate Anypoint VPC, VPN and DLB Application Deployment
and Platform Setup With Anypoint CLI
2. 2
Organizers
Jitendra Bafna
Senior Solution Architect
Capgemini
About the organizer:
Working as Senior Solution Architect at Capgemini.
MuleSoft Ambassador
Surat MuleSoft Meetup Leader.
12.5+ Years of Experience in Integrations and API Technologies.
Certified MuleSoft Integration Architect and platform Architect.
3. 3
Organizers
Nitish Jain
Consultant
IBM
About the organizer :
Working as Consultant at IBM.
Surat MuleSoft Meetup Leader.
2.5+ Years of Experience in Integrations and API Technologies.
Certified MuleSoft Developer and Platform Architect.
4. CHEERS..!!
We have prizes to give away!
3 Winners a special prize is ready
4
A SHOW OF HANDS:
New Members With Us.!!
5. Agenda
What is Anypoint CLI
Setting Up Anypoint CLI
Demo 1 – Setting Up Anypoint VPC and DLB
Demo 2 – Deploying Application and applying the policies
Demo 3 – Setting Up Anypoint Clustering
Trivia Quiz
1
2
3
4
5
6
6. What is Anypoint CLI?
Anypoint CLI is a command-line interface used with Anypoint Platform and
Anypoint Platform PCE. Anypoint CLI works with
Runtime
Manager
Design
Center
Anypoint
VPC
Anypoint
DLB
Access
Management
API Manager
Reference - https://docs.mulesoft.com/runtime-manager/anypoint-platform-cli
7. Setting Up Anypoint CLI
Prerequisites
Download and Install NodeJS
Install npm package for Anypoint CLI using the below command.
$ npm install -g anypoint-cli@latest
Anypoint CLI can be configured using one of the below authentication
mechanism.
Anypoint Username and Password with required access.
Client ID and Client Secret. This can be generated using Connected Apps in
the Anypoint Platform.
Bearer Token.
7
8. Anypoint CLI Credentials File
Approach 1 - It is recommended to create a credentials file within ~/.anypoint
folder. This folder is not created automatically, and you need to create it at
location C:/Users/Username in case of windows. Provide correct credentials,
organization and environment details.
8
{
"default": {
"username": "yourAnypointUserName",
"password": "yourAnypointPassword",
"organization": "",
"environment": "",
"host": ""
},
"otherProfile": {
"username": "",
"password": "",
"organization": "",
"environment": "",
"host": ""
},
"connAppProfile": {
"client_id": "",
"client_secret": "",
"organization": "",
"environment": "",
"host": ""
}
}
ANYPOINT_USERNAME="username"
ANYPOINT_PASSWORD="password"
ANYPOINT_ENV="environment"
ANYPOINT_ORG="organization"
Approach 2 – Setup Environment Variables
9. Use Case 1 – Deploying and Managing the
MuleSoft Application Using CLI
Step 1 – Deploy Mule Application
Step 2 – Check Application Information
Step 3 – Download Application Logs
9
runtime-mgr cloudhub-application deploy [options] <name> <zipfile>
e.g. - runtime-mgr cloudhub-application deploy --workers "1" --workerSize "0.1" --region "us-east-1" --objectStoreV1 "false" --runtime
"4.3.0" "server-info-app" "C:UsersjbafnaDesktopserver-info-5.3.0-mule-application.jar"
runtime-mgr cloudhub-application describe [options] <name>
e.g. - runtime-mgr cloudhub-application describe “server-info-app”
runtime-mgr cloudhub-application download-logs [options] <name> <directory>
e.g. - runtime-mgr cloudhub-application download-logs "server-info-app" "C:Logs"
10. Use Case 2 – Creating Anypoint Clustering
Step 1 – Create Cluster With CLI
Step 2 – List the Cluster
10
runtime-mgr cluster create [options] <name>
e.g. - runtime-mgr cluster create "mule-demo-cluster" --server <id:ip>
runtime-mgr cluster list
e.g. - runtime-mgr cluster list -o json
15. Get ready to WIN a Special Gift from MuleSoft Community
Quiz Time
16. Question 1
Which is not correct environment variable used by Anypoint
CLI?
a. ANYPOINT_USERNAME
b. ANYPOINT_PASSWORD
c. ANYPOINT_ORG
d. ANYPOINT_GROUP
16
17. Question 2
What is Full Form of CLI in Anypoint CLI?
a. Command Line Interface
b. CloudHub Line Interface
c. CloudHub Line Integration
d. Command Line Integration
17
18. Question 3
Can we created Anypoint VPC and DLB with Anypoint CLI?
a. True
b. False
18
19. 19
Share:
○ Tweet your pictures using the hashtag #SuratMuleSoftMeetup
○ Invite your network to join: https://meetups.mulesoft.com/surat/
Feedback:
○ Fill out the survey feedback and suggest topics for upcoming events
○ Contact MuleSoft at meetups@mulesoft.com for ways to improve the program
○ Reach out to either Jitendra Bafna or Nitish Jainto suggest topics for next Meetup
What’s next?