Deploying Applications to Exoscale using Registered Servers

Today we are going to show you how to deploy to Exoscale using Registered Servers feature.

We take you by the hand to deploy a Docker, Rails or Node project under 5 minutes including load balancing, Let’s Encrypt SSL and all the cool feature we support.

As you might know, we integrate with all the major cloud providers and we love it. A lot of our customers, due to legislation or other legal issues, need to deploy their applications on servers which are running physically in their own country and also owned and operated by local companies.

Unfortunately, not all supported public cloud providers can comply with those rules. We provide a feature called Registered Servers to make this happen.

What? Registered Servers?

Exoscale?

Great. Let’s see how to get this thing going using Exoscale.

Let do this!

  • Cloud 66 account — signup here for a two-week free trial account.
  • Exoscale account — signup here and get $5 of Exoscale free credits; Limited offer.

We are going to deploy a Docker Project with one load balancer, a two server docker cluster and a separated DB server. We need to provision 4 servers for this example.

NOTE: The following steps can also be used to deploy a Rails or Node project.

Sign in with Exoscale and setup the security group.

Security groups

We make sure we open the ports we need to manage our stack. Although we are opening the ports to the world wide web with the security groups, after bringing the servers to Cloud 66, those ports are managed by Cloud 66 and port like 22 and the inter docker container networking is secured (= no access from the internet).

Sign in with Exoscale.

Go to https://portal.exoscale.ch/compute/firewalling and click on the default security group.

Make sure your security group looks like this:

Provision the servers

ContainerNet is a private and secure network (based on Weave) between all containers across all the servers and components in your stack, including databases. This network provides an internal IP address to each container, automatically updating with DHCP and DNS and is fully integrated with the life-cycle management of your services.

Provision the loadbalancer

Choice the Micro option (1 CPU / 512MB memory / 10GB disk). Don’t use a Keypair. Cloud 66 will generate a new one as soon as you bring the server over.

When Cloud 66 is deploying to your servers, a firewall will be installed and also SSH access only works with public/private key access and is closed by default to the outside world.

Hit CREATE to create the server.

Provision the Docker nodes

If your services need persistency, choice a larger disk size.

Provision the Database node

Bring them to Cloud 66

Now it’s time to log into your Cloud 66 account. Before we create any project, make sure we put our Exoscale servers into our inventory. Go to the Register Server panel and you find a command to run on each server to bring them on board.

SSH to each server and login with your username root and password. You can find the root password on the dashboard, when you hit the root password it will be automagically copied to you clipboard.

~$ ssh root@xxx.xxx.xxx.xxx

Register the server

When the command is executed, you see the following message.

Approve the servers

You can also tag the server to make them easy findable if you deploy a stack.

Create a Docker project

We create a new deployment for a production environment.

We start with a deployment of 1 Docker host and 1 Database host. And select the right servers we want our application to be deployed to.

And we add another server for our MongoDB, MySQl database and RabbitMQ message queue.

Of course one of our Docker services need access to the internet. Cloud 66 gives you an UI to set the port mapping and take care of all the load balancing and firewall management.

Hit deploy stack and Cloud 66 will provision (= install all the packages, networking, db and security) the servers and start building and deploying your application. You get an e-mail when Cloud 66 is done setting up your application.

Scale up!

Go to the Docker cluster and hit the button Add Docker Server. Choose the right registered server and hit Add. Cloud 66 will provision this server and add this one to the Docker cluster and make sure all the intra-service networking is setup and secure.

Last but not least, we need a load balancer. Hit the link Scale up your site — add a load balancer and choice the last remaining server. Hit Add Loadbalancer and let Cloud 66 do all the heavy lifting. When this is done! Point your traffic to the load balancer. Happy scaling!

Security

The combination Cloud 66 and Exoscale give you the power of DevOps right in your hand still comply with all the Swiss legislation or legal issues.

Originally published at blog.cloud66.com on February 16, 2017.

DevOps-as-a-Service to help developers build, deploy and maintain apps on any Cloud. Sign-up for a free trial by visting: www.cloud66.com