How to Automate Deployments Like a Pro — Adding a new Digital Ocean host to Rancher

Luis Güette
typeiqs
Published in
2 min readJan 1, 2019

This is the second article about automate deployments like a pro. Today, we will learn to add a new host to Rancher. Below you can find the whole series:

  1. Installing Docker Rancher with SSL.
  2. Adding a new Digital Ocean host to Rancher.
  3. Adding a new service to our Digital Ocean Host.
  4. Adding a Drone CI service.
  5. Configuring Github repository with Drone CI.
  6. Deploy your application.

For this tutorial, We are going to add a service server to host our services, like a web app or whatever you want.

On the Rancher, we need to go to Infrastructure > Hosts and click add host button. You will find the next view:

You can select between custom, Amazon EC2, Azure, DigitalOcean, and Packet. So, we click on DigitalOcean, and we will be asked for an Access Token from DigitalOcean.

Now, we go to DigitalOcean dashboard and click on API > Token/Keys. Then click on Generate New Token:

We will see a prompt window where give it a name, and select if you want to allow to Write or not, in this case, we will select read and write options:

Once you click on generate token, you will see the new generated token:

Now, copy and paste on Rancher, and click on Configure Droplet. You will see the next form:

It is very similar to the configuration when we create a new droplet on DigitalOcean. Finally, we click on Create, and that's it! Rancher will create a new Droplet for us.

In the next article, we will create a new service inside a host.

--

--

Luis Güette
typeiqs
Editor for

Electrical engineer UCV, Venezuela. Self-Driving Cars, Deep Learning, Developer, web, mobile, IoT, DataScience.