Note: This blog post is related to the legacy Containership Platform and the content is no longer relevant.
Rackspace is the leader in managed hosting, and offers services ranging from dedicated servers, managed colocation, architectural planning and 24x7 support to cloud hosting, and other scalable cloud services.
We’re really excited about this integration because of the rock solid service that Rackspace Cloud provides. We were impressed by how fast servers were launched, the performance, and how reliably servers came online in under a minute. Combining an outstanding service like Rackspace Cloud with ContainerShip Cloud creates an extremely flexible and powerful system for managing and scaling container hosting infrastructure. It takes only minutes to get started using ContainerShip with Rackspace Cloud, and in this tutorial we are going to walk you through the steps to get up and running. Once we have a cluster running on Rackspace, we’re going to quickly setup a multi-node Apache Cassandra database and show you how easy it is to interact with it.
Connecting Rackspace & ContainerShip
You will need two things to be able to complete this tutorial.
If you don’t have a ContainerShip Cloud account yet, you will be prompted to connect a hosting provider during account setup. In order to connect Rackspace Cloud, you will need your Rackspace API key.
Visit Account Settings in the Rackspace Cloud Control Panel
Once you have your API Key, you can input it during account setup.
Enter your username and API key, both will be stored encrypted
On the next screen in the setup process you will have the option to connect a Docker registry provider, and then will land in the control panel.
Got ‘em all hooked up? Good. Lets launch some stuff!
Launching a Cluster on Rackspace Cloud
In ContainerShip, a cluster is a group of servers running in the same datacenter or region of a hosting provider. You can scale clusters up and down to add or remove hosts, snapshot a cluster and it’s data, or clone it into a new cluster or even a different hosting provider altogether. Once a cluster is online, you can think of it as your own personal platform as a service with super powers.
Time to launch our first cluster!
On the cluster overview page, click on Create Cluster.
Choose Rackspace as the Provider.
Configure the settings for the cluster.
- Region: Which Rackspace data center to launch the cluster in.
- Leaders: The brains of ContainerShip run on your own hardware, select how many to launch based on the redundancy you want.
- Followers: Where your Docker containers will be launched and run.
For this example, we’re going to use the smallest instance type for the leaders, and run one of them.
For the followers, we selected the 4GB Standard instance and launched 2 of them.
The cluster will take about 3 minutes to launch, install Docker and ContainerShip, and become healthy.
In the Rackspace Control Panel we can see the servers have been created.
Once the servers are live, ContainerShip will automatically link them together into a highly available cluster, and the status will change to green/healthy.
Exploring Our New Cluster
Now that we have a cluster up and running, we can modify some settings and take a look around to get acquainted with the ContainerShip Cloud control panel. Start out by clicking on the cluster itself to view it’s details.
Click on the cluster to view details
The first thing we might want to do it give this cluster a more descriptive name so it’s easier to identify. To do so, click on “Edit Cluster”, and set a new name.
Giving our cluster a new name
The cluster name has been updated
Now that we have appropriately named the cluster, we can dive in to some of the submenus. Our first stop is the Applications menu, which will list all of the running applications on our cluster. In ContainerShip, an application is a unique Docker image and it’s settings. An application might be a database, or a Docker image we created ourselves. Applications can be scaled up and down across the hosts in the cluster, backed up, and restored.
Application overview for our cluster
In the image above, we can see that we already have one application running on our cluster. We automatically deploy our service discovery system which enables different applications to find each other on the cluster without the need to hardcore IP addresses or hostnames. This will come in very handy in a microservice architecture when you have many different services that all need to communicate easily.
Clicking on an application will allow you to view more details about it’s configuration, the containers that are running for it, and where, as well as more advanced features like volumes and load balancers associated with it.
The next thing to check is the Hosts overview. In this view we can see which servers are running in the cluster, we can scale them up or down, or click on any of them to view detailed information about them.
Alright, how do we run stuff on this?
ContainerShip makes it easy to run anything that can live in a Docker container. In this post we’re going to use our built in Integration Marketplace to launch a distributed database, and then connect to it from our local workstation to confirm it is working. Once it is, we will snapshot the entire cluster for safe keeping or to restore later. It’s easy to create your own applications as well using our Wizard interface.
In the Applications view, click on “Add Application”
The “Add Application” modal will ask you to select whether you would like to launch from the Marketplace, or from the Wizard. Choose Marketplace.
The Marketplace overview screen will load, and you can select the integration you would like to run on the cluster. We’re going to launch Apache Cassandra, the distributed NoSQL database.
Find Cassandra and click on “Deploy to Cluster”.
Give the Cassandra cluster a name it will identify itself by internally, and select the resources each container in the cluster should have, then click the “Deploy to Cluster” button.
It may take a minute for the hosts in the cluster to pull down the Cassandra docker image, but once they do and they have started and are healthy, the Application will show up as green.
That was easy! Time to connect to Cassandra.
Every application in ContainerShip Cloud is assigned a DNS entry that updates automatically as you scale your ContainerShip Clusters or Applications. To find it, you just need to click on the Application and find it. Go ahead and click on the cassandra Application and find it’s DNS entry.
Locating the DNS entry for Cassandra
In the terminal we can now connect to our running Apache Cassandra database and play around with it using the DNS entry. We will connect and create a keyspace called ‘demo’, then create a table under the keyspace called ‘users’ and insert some data into it.
Nice! Maybe it makes sense to see what other hosts are part of this cluster.
There is one other host in the cluster besides the one we are currently connected to. That makes sense, we launched two follower hosts in our ContainerShip Cluster! As we scale up our ContainerShip cluster, Apache Cassandra will automatically be deployed to them and join the existing cluster. Talk about easy scalability!
In this post we showed you how to launch a ContainerShip cluster on Rackspace Cloud, interact with the ContainerShip Cloud interface, and quickly setup a multi-host Apache Cassandra database. We have tons of advanced features that would take too long to show in this post
Want to learn more about ContainerShip and ContainerShip Cloud? Sign up for a hands on demo and consultation.