Deploy cloud services over multiple regions in a few simple steps

Multi-Region Deployment can deploy any service across multiple cloud regions in an automated fashion, saving significant time.

I am excited to present another time-saving CLI feature, which has just been added to CAIOS. CAIOS is an innovative, portable cloud operating system with unique ‘Infrastructure from Code’ technology that automatically translates developers’ code into cloud infrastructure. CAIOS breaks down barriers to faster, lower-cost development and deployment over the cloud.

Multi-region deployment lets you deploy your services to multiple regions without the hassle of going through the manual process of deployment through the AWS console or using the AWS CLI/SDK. With just a few simple CAIOS CLI commands, your service is out there!

The motivation behind the feature

This feature is utilizing AWS StackSets to perform its operations

Deploy CAIOS CloudFormation stack to selected regions

Using a single command, you can clone and deploy CAIOS stack to multiple regions. To do so, run the following command from your CAIOS admin console:

caios install region-1 region-2 ...

This will create clones of your main CAIOS stack in every selected region.

These stacks will be managed by a CloudFormation StackSet. Here is an example of a CAIOS stack deployed with StackSets at AWS region ‘eu-west-2’.

CAIOS stack deployed at AWS region eu-west-2

Prepare and deploy your service

caios service release <my bucket name>

This will upload your service files to your admin bucket and will be used as a distribution source for every region you want to deploy to.

Note that for a successful service deployment, you must first install a CAIOS stack in the designated region.

Finally, to deploy your service, just type in the following command:

caios service launch <service name> region-1 region-2 ...
Service stack deployed at AWS region eu-west-2, operating on top of a clone of CAIOS stack in that region

Made changes to your service? Simply, release and launch it again the same way.

In order to shut down the service, use the following command:

caios service shutdown <environment name> <my service name>

This method has proven to reduce packaging and deployment time drastically as it encapsulates many repetitive operations backstage.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store