A quick tutorial on installing and running Mesosphere (DCOS) on AWS via a CloudFormation template! Enjoy!
Navigate to the mesosphere landing page for the DCOS environment via a CloudFormation template (https://mesosphere.com/amazon/). This is a self made template that you can modify once in the automation builder in the AWS console. I did modify the settings to add more nodes and larger instances.
The AWS EC2 Key Pair needs to be established if you don’t have one in place already. I have several key pairs for security so I opted to use one of my own but also created a dummy one for this tutorial.
Note: the key pair has been deleted.
Next, create the cluster via the CloudFormation template discussed earlier. You can save the template to an S3 bucket for later use or just copy and paste the URL into the builder.
This is a critical step in making sure your costs don’t run out of control as well as specifying what AZ (availability zone) you deploy your resources in. Please make sure you specify the region that you intend to either deploy into production or that you work in. You might have to adjust your network ACL’s and security groups to let traffic in or not or adjust your NAT instance.
This steps illustrates where you could enter a sample template, upload a template from your local machine or S3 bucket or from the mapping template provided my Mesosphere.
The CloudFormation template above outlines where, how and the output of resources in the template. Remember, AWS is API and SDK driven so all calls can be made via an API or by the SDK.
Select the appropriate key pair for the mesosphere cluster as well as accept the EULA. At this point you could also specify additional slave nodes.
The completed CloudFormation template is ready to fire off should everything pass the review phase.
A cost breakdown via the Simple Monthly Calculator that helps clarify costs for running this template for “x” number of hours in a day/week/month. You can also adjust the instances. billing options for spot instances, etc. As you can see, the total monthly cost for me to run this 24/7 from the provisioned resources is roughly $1,491.49. Not bad when you consider all the time, energy, power, networking, etc that went into deploying this template in less than 3 minutes.
Finally, you can see al the instances being spun up in US-EAST-1. At this point, once the instances are in a “healthy” status check, you can begin to consume the DCOS in your environment by navigating to the outputs tab on the CloudFormation stack builder with the associated IP address.