How to Deploy with Rancher

Deploying-Rancher-DigitalOcean

Why Rancher

  • A complete platform for running containers
  • Rancher is a open
  • Runs on Docker
  • Deploy Docker Containers
  • Manage Docker Containers
  • Support several Cluster types
  • Deploy Kubernetes Clusters on Google
  • Deploy Swarm Clusters with Docker
  • Deploy Mesos Clusters
  • Define access policies
  • Manage Multiple Clusters

Install Docker on Droplet

  • Update Ubuntu
  • $ sudo apt-get update
  • Add GPG for Docker repository
  • $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
  • Add Docker repository
  • $ echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
  • Update package Database
  • $ sudo apt-get update

Install Docker on Droplet: Step 2

  • Prepare for Docker repo instead of Ubuntu
  • apt-cache policy docker-engine
  • Install Docker
  • udo apt-get install -y docker-engine
  • Check status of Docker
  • sudo systemctl status docker

Install Docker on Droplet: Step 3

  • Launch Rancher server
  • $ sudo docker run -d --restart=always -p 8080:8080 rancher/server
  • Tail the server logs
  • sudo docker logs -f containerid
  • Note: Replace the containerid with the containerid reported on launch

Access Rancher UI

  • You can know access Rancher using the ipaddress:8080
  • Go to Admin->Access Controls to set up access rights
  • Active Directory
  • Azure AD
  • GitHub
  • Local
  • OpenLDAP
  • Start using Rancher