Skip to main content

Multi-Cloud Deployments

MonkOS clusters are capable of spanning across multiple cloud environments while MonkOS handles all cloud specific aspects of such setup.

Prerequisites

You need a cluster with at least two cloud providers added. See: how to add cloud providers.

Pick a pair of clouds you have credentials for eg. let cloud A be AWS and cloud B be GCP. The instructions apply to any pair of clouds and you can always add more than two if you wish.

Step 1: Add instances on cloud A

We will start by provisioning two nodes on one of the clouds:

monk cluster grow

MonkOS will ask several questions about new instances, see example answers below:

? Cloud provider gcp
? Name for the new instance gcp-example
? Tags (split by whitespace) gcp-tag
? Instance region (gcp) us-central1
? Instance zone (gcp) us-central1-a
? Instance type (gcp) n1-standard-1
? Disk Size (GBs) 10
? Number of instances (or press ENTER to use default = 1) 2

After completing the survey, MonkOS will create instances according to your choices. Output from a successful run looks like this:

✔ Creating a new instance(s) on gcp... DONE
✔ Creating node: gcp-example-1 DONE
✔ Creating node: gcp-example-2 DONE
✔ Initializing node: gcp-example-1 DONE
✔ Initializing node: gcp-example-2 DONE
✔ Connecting: gcp-example-1 DONE
✔ Syncing peer: gcp-example-1 DONE
✔ Connecting: gcp-example-2 DONE
✔ Syncing peer: gcp-example-2 DONE
✔ Syncing nodes DONE
✔ Cluster grown successfully

The output will be similar for each cloud environment.

Step 2: Add instances on cloud B

Go back to Step 1 and repeat the process for your second cloud.

Step 3: Check the cluster's layout

After completing above steps, you should have a multi-cloud MonkOS cluster running. To confirm that all nodes were started issue the following command:

monk cluster peers

The output should look similar to:

✔ Got the list of peers
ID Name Tag Cloud ID Provider Containers IP Started At Active
QmQZLKddAoPFJedJu3MCoEm4Xhf56kWBmpM3siQUb7C6rW gcp-example-1 gcp 0 35.225.9.50 7m 59s true
QmRY6n5riCmD7u6xAtTrWXmfYfJ4Kga8u8SmnPshy63SYT aws-example-1 aws 0 52.18.236.209 14s true
QmSfRGKwTuGwJkGE2jWcUrshfasUNX155uQBfWC9L4838y gcp-example-2 gcp 0 34.122.16.154 7m 49s true
QmZ7nxemDrgqg5ZCUD3KxzB7oNKKSwoEoACevPPVZN16PS aws-example-2 aws 0 3.249.243.60 23s true
local local unknown 0 127.0.0.1 46m 42s true

Note the contents of Provider column, both cloud A and cloud B should be present.

Conclusion

You are now running a MonkOS cluster spanning across two clouds. This cluster will behave as any other MonkOS cluster as MonkOS manages all supported cloud environments in a transparent manner. This new cluster is capable of running any Monk Kit and the workloads will be distributed to all instances available.

Rate this page