Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to install Rancher Docker Container Manager on Ubuntu  (Read 1552 times)

0 Members and 1 Guest are viewing this topic.

sumesht

  • Guest
How to install Rancher Docker Container Manager on Ubuntu
« on: April 13, 2018, 06:59:41 pm »


You've been working with containers for some time now—maybe you're using docker commands to manage and deploy those containers. You're not ready to migrate to Kubernetes (and Docker has been treating you well), but you'd like to make use of a handy web-based management tool to make your container life a bit easier. Where do you turn?

There are a number of options available, one of which is the Rancher Docker Container Manager. This particular tool should be of interest, especially considering it supports Kubernetes and can deploy and manage full stacks, so when you're ready to make the jump, your tools are also ready.

But how do you get the Rancher Docker Container Manager (RDCM) up and running? The easiest way is (with a nod to irony) via Docker itself. I'm going to show you how to deploy a container for the RDCM quickly and easily. Once deployed, you can then log into the system, via web browser, and manage your containers.


What you'll need


I'll be demonstrating on Ubuntu Server 16.04. I will assume you already have Docker up and running. One very important factor is that the RDCM depends upon the hosting server having a valid SSL certificate. You cannot use a self-signed SSL certificate, as those are not supported by the certified Rancher templates. Without a valid SSL certificate, you will not be able to add hosts. Without hosts, you cannot deploy containers or stacks.

No sudo

Before I show you how to deploy the manager, I want to make sure you can run the docker command without using sudo (as that can lead to security issues). In order to do that, you must add a standard user to the docker group. Let's say you're going to add the user flotsam to the docker group. The command to do that would be:

Code: [Select]
sudo usermod -aG docker flotsam
Once you issue the command, the user flotsam would have to log out and log back in. At this point, that user could then issue the docker command without having to use sudo.

Deploying the container

The RDCM container can be deployed with a single command. I'll be demonstrating how to do this opening the container up on external port 8080. If you don't have port 8080 available on the server, you'll need to find another port to use. With that said, the deploy command is:

Code: [Select]
docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable
The command will pull the latest rancher container. Once it completes, point your browser to http://SERVER_IP:8080 and you should be greeted by the Rancher Docker Container Manager interface (Figure A).

Figure A



Final touches


Once you've successfully reached the web interface, you'll need to take care of two things before launching your first container. The first is to set up access to the interface. Click on Admin | Access Control. In the resulting window (Figure B), select the type of authentication you want to use and then configure.

Figure B




If you're going to use local authentication, click LOCAL and then configure an admin user.

Next you need to add a supported host. This will be another Docker server that can reach the RDCM. To do this, click on Infrastructure | Hosts. In the resulting window, click (Figure C), select the hosting service and fill out the necessary details.

Figure C



What host you opt to configure will determine how you set it up for the Rancher Docker Container Manager. For example, if you select Amazon EC2, you'll have to have the following information:

  • Region
  • Secret Key
  • Access Key

For Azure, you'll have to configure:

  • Placement
  • Account Access
  • Network
  • Instance

For Digital Ocean, you'll only need your Access Token.

For Packet, you must set up

  • Account Access
  • Instance
  • Region

If you're adding a custom host, you'll need:

  • The public IP of the host server
  • To run the provided command on the host

Once you've set up your host, you are ready to start deploying stacks or containers. To deploy a stack, Click on STACKS | All and then click either Add Stack (to add a local stack) or Add from Catalog to find a predefined stack to deploy. To deploy a container, click INFRASTRUCTURE | Containers and configure your first container.

Remember, however, that without adding a host first, you cannot deploy stacks or containers.

Ready to rock

At this point, you're ready to rock with the Rancher Docker Container Manager. So long as you have a proper host added, deploying and managing containers and stacks is not only simple, but very powerful. Kick the tires of this system and see if it doesn't take your container management to the next level.

Thank you