Rancher Server v1
- Rancher provides some very intriguing features:
- A docker image repository
- The ability to add target hosts running the Rancher agent.
- Secrets storage
-
The v1 Rancher server is effectively an all-in-one alternative to Kubernetes, ECS, EKS, et. al.,
- Rancher is very good as an on-prem datacenter solution, particularly for development.
- It is very easy to take a series of on-prem physical servers and provide the Rancher interface to developers or an entry-level ops team.
- Where Rancher falls short is in cloud deployments.
- The method of adding target hosts can be automated using the API, but there is almost as much heavy lifting to make Rancher work as you would invest with another product like Kubernetes, ECS, or EKS.
- Rancher doesn’t like it if the resolv.conf is set to lookup against localhost. It’s rare that localhost would be used as a DNS server, but little quirks like that will cause the Rancher agent to immediately fail.
- In the end Rancher will feel like using VMware VCenter for Docker. And maybe that’s ok.
- You have to add hosts manually to Rancher, and the experience is a bit unpredictable.
- However, the GUI for provisioning docker containers means that even the most inexperienced person can instantly start working with docker and all the myriad of parameters.
- Rancher is a great solution for a simple setup, but doesn’t make much sense outside of that environment.
- Rancher feels like a product trying desperately to get some traction in the container ecosystem rather than spend the time to make a polished solution.
Rancher Server
The Rancher Server is a central node which all Rancher Agents connect back to.
Start the Rancher Server
Visit the Rancher console
- Once the Rancher server is up and running, connect to the console
- http://127.0.0.1:8080/
Rancher Agent
- Install the Rancher Agent on any host where Docker agents will be run.
- The agent host must be Linux-based and running the Docker daemon.
Agent credentials
- The agent credentials are acquired by going to the rancher server console and adding a host.
- http://127.0.0.1:8080/env/1a5/infra/hosts/add?driver=custom
Start the Rancher Agent
Host stuck in the “Reconnecting” state
- Remove the rancher agent containers.
- Use the command that Rancher gives to start a custom host
Deploy a container using the Rancher server
Image, ports, and environment variables
Healthcheck
Network type
- Pay close attention to the network type.
- If you just want to use Rancher to start a container in the “normal” way ensure that you set the network type to bridged.