DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workkloads.

Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Deep Dive Into Architecture of MuleSoft Anypoint VPC, VPN and Dedicated Load Balancer
  • Transit Gateway With Anypoint Platform
  • Importance of Transit Gateway in Anypoint Platform
  • MuleSoft Operational and API Management Capabilities

Trending

  • Unlocking AI Coding Assistants Part 2: Generating Code
  • My LLM Journey as a Software Engineer Exploring a New Domain
  • The 4 R’s of Pipeline Reliability: Designing Data Systems That Last
  • The Modern Data Stack Is Overrated — Here’s What Works
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. MuleSoft Anypoint Platform Complete Setup Guide

MuleSoft Anypoint Platform Complete Setup Guide

In this blog, we are going to look into the Anypoint platform setup. This is a complete end to end guide for setting up the platform.

By 
Gaurav Dhimate user avatar
Gaurav Dhimate
DZone Core CORE ·
Dec. 09, 20 · Analysis
Likes (8)
Comment
Save
Tweet
Share
12.2K Views

Join the DZone community and get the full member experience.

Join For Free

In this blog, we are going to look into the Anypoint platform setup. This is a complete end to end guide for setting up the platform.

customer VPC

So we are going to look into the below steps:

  • Creating Environment
  • Creating VPC
  • Creating Load balancer
  • Creating VPN

Creating Environment:

access management

Lets create "dev", "UAT" and "Prod" environment:

sandbox

prod

So now we have the below environments:

environments

Creating VPC: 

A Virtual Private Cloud (VPC) allows you to create a private and isolated network in the cloud virtually. This ensures that each customer's data remains isolated from other customer's data, both in transit and inside the cloud provider's network.

As a normal practice, we create 2 VPC's for Production and others for all non-production environments.  

Now lets create non-prod-vpc VPC  , go to Runtime manager --> VPC's

Note: VPC does not come with a trial account.

no VPCs

You will need to fill in the below details:

create vpc

Name: The name to identify your Anypoint VPC. Also, it should be

  • Be unique within the organization. 
  • Between 3 - 42 characters long.
  • Contain only lowercase letters, numbers, and dashes
  • You cannot change the name of a VPC after you create it. To change the name, delete and recreate the VPC.               

Region: The region to which the Anypoint VPC is bound, The recommended region to use might vary depending on how you connect to your Anypoint VPC. 

  • If you are using a VPN tunnel, you might want to choose the CloudHub region closest to your data center. 
  • However, if you are peering with your private AWS VPC, you need to create your Anypoint VPC in the same AWS region.    

CIDR Block: The size of the Anypoint VPC in Classless Inter-Domain Routing (CIDR) notation.

  • CIDR Blocks you choose for the Anypoint VPC come from a private IP space and should not overlap with any other Anypoint VPC’s CIDR Blocks or any CIDR Blocks in use in your corporate network.
  • This setting is configurable only during this initial creation of an Anypoint VPC. Once the Anypoint VPC instance is created, you cannot resize it or edit your selected CIDR block.

How to Decide on the Size of CIDR Block

To calculate the proper sizing for your Anypoint VPC, you first need to understand that the number of dedicated IP addresses is not the same as the number of deployed workers.

For each worker deployed to CloudHub, the following IP assignation takes place:

  • At least two IP addresses per worker to perform at zero-downtime.
  • For better fault tolerance, the VPC subnet may be divided into up to four Availability Zones. 
  • A few IP addresses are reserved for infrastructure.
  • The safe rule of thumb for deciding the size of your Anypoint VPC subnet is to calculate 10 times the maximum number of expected apps to deploy in the VPC.

Note:  Due to this structure, the smallest network subnet block you can assign for your Anypoint VPC is /24 and the largest /16.

So you are planned to have 100 APIs in the VPC, then calculations should be as below.

  • 100 * 2  = 200
  • 200 * 4 (no of  Availability Zones) = 800
  • 800 + 20% (for infrastructure) = 960

So we should assign at least 960 private IPs, which is almost 10 times the maximum number of expected apps to deploy in VPC.

Environments: 

Select an environment to which to bind Anypoint VPC.

  • If you don’t select an environment, all applications deployed to the selected region are associated with this Anypoint VPC.
  • Don’t associate Anypoint VPC with a design environment. You can deploy apps to the design environment only from Design Center, not from Runtime Manager.

Set as Default VPC: 

Select this option to set the Anypoint VPC as the default for the region you set. 

  • This means that all environments in this region not associated with an Anypoint VPC will be, by default, associated with this Anypoint VPC.

Firewall Rule:

firewall ruleBy default, all inbound traffic is blocked, and you need to configure firewall rules to allow traffic to your worker.

When you create an Anypoint VPC, four firewall rules are created by default:

  • Two rules to allow inbound connections from within your local Anypoint VPC through ports 8091 and 8092: 
JSON
 




x
11


 
1
{
2
  "CIDR Block": "10.113.0.0/24", // (Local VPC)
3
  "Protocol": "TCP",
4
  "From port": 8092,
5
},
6

          
7
{
8
  "CIDR Block": "10.113.0.0/24", // (Local VPC)
9
  "Protocol": "TCP",
10
  "From port": 8091,
11
}



These firewall rules allow traffic from within the Anypoint VPC to reach your workers through 8091 and 8092. These are the only ports used by your CloudHub-dedicated load balancer to proxy all external communications to your workers. 

Two rules to allow inbound connections from anywhere through ports 8081 and 8082:

JSON
 




xxxxxxxxxx
1
11


 
1
{
2
  "CIDR Block": "0.0.0.0/0", // (Anywhere)
3
  "Protocol": "TCP",
4
  "From port": 8082,
5
},
6

          
7
{
8
  "CIDR Block": "0.0.0.0/0", // (Anywhere)
9
  "Protocol": "TCP",
10
  "From port": 8081,
11
}



These rules allow traffic from any host to reach your workers through ports 8081 and 8082. CloudHub’s shared load balancer uses these ports to proxy external requests to your workers. You can remove these rules if you don’t want your internal workers to be reached by the publicly accessible load balancer. 

Once this is completed, VPC will be created as below.

non-prod-vpc

Similarly, we will create a VPC for Production.

prod-vpc

Note: As shown in the above image, we can have only 2 VPC's per business group, so normal practice is to create one VPC for the non-prod environment and another for a production environment.

Creating Load Balancer:

For creating a load balancer, we need to go to Runtime Manager --> Load balancers.

Name: Should be unique across all DLBs defined in Anypoint Platform. (You cannot rename once created, so delete it and create it with a new name).

The domain name for your LB will be as <lb-name>.lb.anypointdns.net 

Target VPC: Select target VPC for which this LB should be created

Timeout in Seconds: Specify the amount of time the DLB waits for a Mule application response.

Whitelisted CIDR's: IP addresses which can access this LB, default is 0.0.0.0/0

whitelisted CIDRs

Inbound HTTP Mode: Specifies the behavior of the load balancer when receiving an HTTP request

  • Off: Causes the load balancer to silently drop the request.
  • On: Accepts the inbound request on the default SSL endpoint using the HTTP protocol.
  • Redirect: Redirects the request to the same URL using the HTTPS protocol.

Options : 

  • Disable static IPs: specifies to use dynamic IPs, which do not persist when the DLB restarts. 
  • Keep URL encoding: specifies the DLB passes only the %20 and %23 characters as is.
  • Support TLS 1.0 specifies to support TLS 1.0 between the client and the DLB. 
  • Upstream TLS 1.2 specifies to force TLS 1.2 between the DLB and the upstream CloudHub worker.

create

Add certificate:  You add the client CA-signed certificate and the private key here.

create load balancer

URL Mapping Rules :

url mapping rules

Input path: This will be the path used to invoke the application using LB.

Target app: This will be the app for which this mapping we are maintained.

Output path: This will be an actual path for your application.

Protocol:  You can use HTTP or HTTPS.

If you add more than one URL mapping rule, order the list's rules according to the priority in which they should be applied. The one on the top will take precedent to have specific mapping on top and a generic one at the bottom; otherwise generic one will affect all the mappings.  

Creating a VPN: 

So why we create a VPN connection? We create Anypoint VPN to create a secure connection between your MuleSoft Virtual Private Cloud (VPC) and your on-premises network. You can create multiple site-to-site VPNs if required.

Anypoint VPN supports site-to-site Internet Protocol security (IPsec) connections. A physical or software appliance, called a VPN endpoint, is the terminator on your side of the connection. The MuleSoft side of the connection is an implementation of a virtual private gateway (VGW). The MuleSoft VGW is associated with a single MuleSoft VPC but can support up to 10 VPN connections.

In Anypoint Platform, we can create VPN from Runtime Manager --> VPNs   VPNs

Once you click on Create VPN. 

create vpn

Name: Name must be unique

VPC: Select the VPC for which you want to create a VPN.

Remote IP Address: The public IP address of your VPN endpoint. This must be a single, static IP address.

Routing Type: 

  • Static: As the name suggests, it will use static routes
  • BGP (dynamic routing): BGP is a protocol for dynamic routing which will re-calculate routes after every network change.

Routing type can be decided depending on the device type of router.

Static Routes: Enter a subnet to make it accessible through the VPN; you can add a maximum of 95 entries per VPC.

static routesTunnel Configuration: 

  • Automatic: No other inputs are required. This option automatically configures the tunnel settings for your Anypoint VPN. The tunnel settings are visible after VPN creation.
  • Custom: If you need a custom configuration for a tunnel.

Click on the Create VPN button.

Initially, the VPN's status is Pending; after the status changes to Available, continue with the next steps.    

tunnel 1/2

vpn connections status

Click on Get VPN config to download the VPN config file; you will need to select the dropdown device type down. If you don't know the device type, then select Generic.

vpn config

Once done VPN is configured as below.

create vpn

From the target system, this VPN tunnel will need to be configured, which your network team will do. 

We are done with the Anypoint platform setup; now, you can test whether everything is working or not. I normally like to use the Network tool provide here https://help.mulesoft.com/s/article/How-To-Use-Network-Tools-Application. Using this, we can try connectivity to the VPN endpoint.

Also, for other testing, you can use tools such as Postman, SOAPUI, JMeter, and so on.

That's all, Thanks

Virtual private cloud vpn MuleSoft Load balancing (computing) Network Connection (dance) app Internet Protocol Blocks application

Opinions expressed by DZone contributors are their own.

Related

  • Deep Dive Into Architecture of MuleSoft Anypoint VPC, VPN and Dedicated Load Balancer
  • Transit Gateway With Anypoint Platform
  • Importance of Transit Gateway in Anypoint Platform
  • MuleSoft Operational and API Management Capabilities

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!