Getting started with Maestro
Maestro is a full container management service. Once your Docker images are ready we’ll take care of deploying and managing your containers and infrastructure (servers, load balancers, etc).
What you’ll need
Before you start, please check you have the following:
- A Cloud 66 Account — If you don’t already have one, sign up for a Cloud 66 account. There is a free community plan and you’ll get full unlimited access to all products free for 14 days.
- Container Images to deploy — These can be images you’ve built with Skycap or your own pre-built images that are hosted in an image repository.
- A Cloud Account or Your Own Servers — See below.
An account with your cloud provider of choice. Cloud 66 supports AWS, Google Cloud, Azure, Linode, DigitalOcean, Packet, Rackspace and Cloud A.
Registered servers are a great way for operations teams to manage and allocate physical server resources for consumption by dev teams. Registered servers are a pool of your own servers (on a private or public cloud) that can be used for any application and configuration. For more information on how to add your own registered servers, we recommend this tutorial.
If you don't have images or code ready, you can use this simple visit counter application we've supplied on Github. (You can also use this project with our next tutorial on Clusters.)
Build your containers
This guide assumes that you already have container images that you want to deploy. If you need to learn how to build images or pull existing images from a repo please read Getting started with Skycap.
However we suggest you use a different sample application for Maestro than you did for Skycap (see the blue box above for details).
Set up your deployment
To get started with your deployment:
- Open to your applications overview page and click Set up a Deployment.
- Click on Deploy with Maestro in the Deployment Setup panel that appears:
- Choose any of the standard application environments
Configure your services
Our sample application is composed of a single Python service that we’ve named demo-app. This is a web app so we need to configure the service to handle web traffic.
At the moment we can see that 0 services are connected to the Internet. To change this we click on the plug icon to open the network setting panel.
Container network configuration
The demo-app service will run inside a container, so we need to configure that container to respond to web traffic. A standard web server listens on port 80 for HTTP traffic, so we’re going to use that as our Public Internet Port
The demo-app service listens to port 5000 so we need set the Container Port to 5000 to the Public Internet Port to 80:
Adding a data source
The application also needs a redis data store, so we should add one now:
- Click on Add Data Source
- Select Redis from the list of available source
- Click Done
Our application is now configured and ready to deploy.
Choose a cloud provider
Now we need to choose a cloud provider as a target for the deployment. You can do this using the dropdowns in the right-hand column.
For this demo we’ll use DigitalOcean and deploy the application to the London, UK region.
You can also deploy to your own servers. First you need to add them as registered servers.
Configure server size
The server size can be set by clicking on the cog at the top right the server.
Learn more about choosing the right size for your servers.
Deploy your app
Now everything is ready to go, just hit the Deploy button.
If this is your first deployment you’ll be prompted to enter your access credentials for your cloud hosting provider. Once you’ve added these the deployment will begin.
During the build and deployment process you can view the log to see what’s happening behind the scenes.
The initial deployment process may take 15 minutes or more, because Maestro needs to provision the new server from the ground up. You can close the window and Maestro will send you an email when the deployment is complete.
Test your app
Once deployment is complete, you can test your application by visiting your app’s detail page and clicking on the Visit Site link in the panel at the top of the Services tab.
If youre deployment has worked as planned, you will see the following text:
“Hello World! I have been seen X times”
…(where X is a positive integer). If you refresh the page, that number should increase by one. This dynamic data is coming from the redis data store that we added to the app.