Today more than ever, growing businesses are interconnecting multiple cloud environments for greater network reliability, better workload migration, and optimal application performance. As businesses grow, their IT infrastructure becomes more complex; implementing a hybrid multicloud architecture can help them meet their evolving IT needs.
As more and more enterprise workloads migrate to the cloud, many are choosing to connect to Amazon Web Services (AWS) and Microsoft Azure to have flexibility in application deployment and to avoid vendor lock-in.
By interconnecting IT architectures to these two clouds, organizations have the advantage of choosing
“best-of-breed” IaaS, SaaS, and tools available on each platform, thereby staying at the forefront of cloud technology capabilities. In addition, working with different cloud platforms broadens the skills and expertise within IT teams and makes organizations more adaptable to changes in technology landscapes.
To support your business connectivity needs, we present you a do-it-yourself tutorial that will run you through all the steps you need to connect your cloud workloads between AWS and Azure using the Megaport platform. We'll show you how to create a virtual cloud router, create a connection to AWS, create a connection to Microsoft Azure, and then run a ping test between those two cloud environments. And yes, you can do all this in minutes, not months!
For more than a decade Megaport has made hybrid multicloud connectivity easy for thousands of businesses. With Megaport Cloud Router (MCR), companies can interconnect multiple cloud providers in minutes and without hardware. Megaport's MCR is a virtual router that allows you to privately peer between leading public cloud, IaaS, and SaaS providers while at the same time enabling you to route data to and between various providers without hairpinning your traffic back to a data center or your on-premises environment.
Okay, but back to the mission at hand: Connecting your two cloud workloads.
This tutorial provides a full multicloud demonstration environment including networking and compute instances. It requires account credentials for Megaport, Amazon Web Services, and Azure. The following steps are needed in order to build a private AWS to Azure multicloud deployment using Megaport and cURL.
First thing's first - make sure you have signed up for your Megaport account.
- API Key: rm1qki0li8qh6trgsec071234
- API Key Secret: 1pdk5isbd862kd2h14omj6937n8nst0ea7oi77s6fult9j1234
curl 'https://auth-m2m.megaport.com/oauth2/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-u'rm1qki0li8qh6trgsec071234:1pdk5isbd862kd2h14omj6937n8nst0ea7oi77s6fult9j1234' \
--data-urlencode "grant_type=client_credentials" | json_pp
Result:
curl --location 'https://api.megaport.com/v2/locations?locationStatuses=Active&metro=Frankfurt' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' | json_pp
Result:
Within the result you would then search for either of the following:
In the case of the Frankfurt Metro you have two locations that support MCR, namely Interxion FRA6 (id=130) and Equinix FR5 (id=131) and the supported speeds:
curl --location 'https://api.megaport.com/v3/networkdesign/validate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' \
--data '[
{
"locationId":130,
"term": 1,
"productName":"stackexchange-mcr",
"productType":"MCR2",
"portSpeed":1000,
"config": {
"mcrAsn": 133937
}
}
]' | json_pp
Result:
The order is valid.
curl --location 'https://api.megaport.com/v3/networkdesign/buy' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' \
--data '[
{
"locationId":130,
"term": 1,
"promoCode": "stackexchangemcrvxcpromo",
"productName":"stackexchange-mcr",
"productType":"MCR2",
"portSpeed":1000,
"config": {
"mcrAsn": 133937
}
}
]' | json_pp
Result:
The MCR is created:
Please note the MCR2 product id is detailed in the results tab in Step 6C i.e.
This is also confirmed visually in the portal next to the product name which we have called
“stackexchange-mcr” #9aac5caf
curl --location 'https://api.megaport.com/v2/products?provisioningStatus=LIVE' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' | json_pp
Result:
The MCR productUid is 9aac5caf-2351-410c-958f-ac7dcf5eb44b
Important consideration before you continue: Note that from Step 6 onwards you will need valid AWS and Azure credentials to complete the tutorial.
If you want a Megaport expert to help you deploy this tutorial, you can schedule a demo with us.
Our solutions architects will walk you through the process and provide testing keys for both AWS and Azure. Just submit a request below.
curl --location 'https://api.megaport.com/v2/secure/awshc' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' | json_pp
Within the result you could then search for country, location ID, etc.
"country" : "Germany",
In the case of the Frankfurt Metro, you have two locations that support AWS HC, namely Interxion FRA6 (id=130) and Equinix FR5 (id=131). You would then use the first productUid as your port reference.
curl --location 'https://api.megaport.com/v3/networkdesign/buy' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' \
--data '[
{
"productUid": "9aac5caf-2351-410c-958f-ac7dcf5eb44b",
"associatedVxcs": [
{
"rateLimit": 100,
"productName": "awshc",
"term": 1,
"shutdown": false,
"promoCode": "stackexchangemcrvxcpromo",
"aEnd": {
"locationId": 130,
"vlan": 0,
"partnerConfig": {
"connectType": "VROUTER",
"interfaces": [
{
"ipAddresses": [
"169.254.96.46/29"
],
"bfd": {
"txInterval": 300,
"rxInterval": 300,
"multiplier": 3
},
"bgpConnections": [
{
"peerAsn": 62512,
"localIpAddress": "169.254.96.46",
"peerIpAddress": "169.254.96.41",
"password": "cnn6eaeaETSjvjvjvjv",
"shutdown": false,
"description": "BGP with MED and BFD enabled",
"bfdEnabled": true
}
],
"natIpAddresses": []
}
]
}
},
"bEnd": {
"locationId": 130,
"ownerUid": "605cb850-dfb4-4a05-a171-8bf17757b3a2",
"productUid": "4348e355-5e76-470b-988b-ac245c48663b",
"vlan": 0,
"partnerConfig": {
"name": "awshc",
"ownerAccount": "ABCDEFGHIJKL",
"connectType": "AWSHC"
}
},
"productType": "VXC",
"connectType": "AWSHC"
}
]
}
]' | json_pp
Result:
The AWS Direct Connect Hosted VXC is created:
The MCR Interface and Layer 3 BGP configuration is complete:
curl --location 'https://api.megaport.com/v2/secure/azure/e478a815-2993-4a9d-bb14-123456789123' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer xxxx' | json_pp
Result: Within the results response, note the “name” is detailed as either “Primary” or “Secondary”.
This allows you to deploy the VXC as a primary or backup connection..
curl --location 'https://api.megaport.com/v3/networkdesign/buy' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXX' \
--data ' [
{
"productUid": "9aac5caf-2351-410c-958f-ac7dcf5eb44b",
"associatedVxcs": [
{
"productName": "Azure Primary VXC from MCR",
"promoCode": "stackexchangemcrvxcpromo",
"rateLimit": 200,
"aEnd": {
"vlan": 0
},
"bEnd": {
"productUid" : "f53112ac-6979-4abd-8197-33220415d4e3",
"vlan": "0",
"innerVlan": 12,
"partnerConfig" : {
"connectType": "AZURE",
"serviceKey": "e478a815-2993-4a9d-bb14-123456789123",
"peers": [{"type": "private"}]
}
}
}
]
}
]
' | json_pp
Result:
The Azure VXC is created:
The Azure private peering configuration has also auto-populated:
If you have reached this step, you should be proud of yourself because you have successfully finished this tutorial! Congratulations on connecting your AWS and Azure environments!
- Learn how to terminate a VXC
- Learn how to terminate an MCR
- Please note that to delete an Azure ExpressRoute VXC, you first have to delete the peering information directly within the Azure portal. Once this is removed, you can then delete the VXC.
With Megaport, interconnecting your clouds for cross-cloud has never been easier. Megaport Cloud Router’s virtual network function capabilities allow you to connect at Layer 3 in an instant, taking the complexity out of setup.
There’s no need to learn the ins and outs of network engineering: Simply log in to your Megaport account and start building your virtual network in a few clicks. MCR supports multicloud and allows you to privately peer between leading cloud providers such as AWS and Azure.
No matter your unique needs, Megaport has scalable and flexible solutions ready to help. Did we mention that this private cloud-to-cloud architecture can be deployed in an afternoon?