For full information regarding the Rancher installation you can refer to the official documentation.
You can install Rancher within your OpenNebula cloud by using one of the following options:
Once the machine is created, you can proceed to install the Rancher server on the Docker host using the following command:
$ docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher:latest
For all the different options to run Rancher on a single Docker Host, you can check the Rancher documentation
For production environments, it is recommended to install Rancher in a high-availability configuration. Rancher can be installed on a Kubernetes Single Node or on a multiple-node Kubernetes Clusters using Helm.
Once you setup a Kubernetes cluster within OpenNebula you can follow the documentation to install Rancher on a Kubernetes Cluster by using Helm.
Adding OpenNebula Provider to Rancher
Once Rancher is up and running, you can connect to it and bring up the Rancher UI.
To add OpenNebula as a provider to Rancher, we need to add the OpenNebula docker machine driver to the Rancher Node Drivers that are used to provision hosts which Rancher uses to launch and manage Kubernetes clusters.
A Linux binary of the OpenNebula machine driver is available at https://downloads.opennebula.io/packages/opennebula-6.0.0/opennebula-docker-machine-6.0.0.tar.gz
Once you added the OpenNebula docker machine driver, it should be active and available in Rancher for creating Kubernetes Clusters.
Create OpenNebula Kubernetes Clusters
In order to deploy Kubernetes clusters with Rancher on OpenNebula, you need to add node templates
In the node template, select the OpenNebula driver, and insert in the available options at the least the following ones:
- Authentication: user, password
- OpenNebula endpoint: xmlrpcurl (http://one:2633/RPC2)
Once you have created the OpenNebula node templates
you can proceed to create the first OpenNebula Kubernetes cluster in Rancher
Once the cluster has been provisioned, you can deploy containers on it using Rancher.