Centos 7
Front-end node
Prerrequisites
OpenNebula
You have to install OpenNebula (i.e. installing the opennebula-node package, the shared directories, the network bridge, etc.). That means that the OpenNebula node should be installed as if it was going to run KVM Virtual Machines. You can follow the instructions in the official OpenNebula documentation.
If you have issues with the nfs service enable first the rcpbind service and try again. To enable rcpbind use the following commands:
Docker
Then you have to install Docker, according to the official Docker documentation.
Warning
We recommend using docker version 1.9. If you use docker engine versions greater than 1.9, we can not ensure that OneDock works correctly. If you have doubts about installing an scpecific version of docker, please check the installation scripts in this repository: install/centos/install-docker
You need to install a Docker Registry v2.0 that is usable from all the nodes. Its name must be included in the variable LOCAL_SERVER
in the file /var/lib/one/remotes/onedock.conf
.
REMEMBER to install the certificates of your Docker registry in the proper directories. The most easy way to install the certificate is to copy it into the folder /etc/docker/certs.d/$HOSTNAME:5000/
. But you should copy it for the whole system in case that you want to use other commands (e.g. curl).
In case of CentOS 7, you can use the following code:
Required packages
Now install the required packages: jq, xmlstarlet
Installation of ONEDock and activating it in ONE
From package
You must have the epel repository enabled:
Then you have to download the required package:
And install its dependencies and the main package:
Finally restart the opennebula service:
Manually
Once OpenNebula, Docker, a Docker Registry and the required packages have been installed, you can install ONEDock as follows (as root user):
ONEDock will be installed. Then you should adjust the variables in /var/lib/one/remotes/onedock.conf
according to your deployment. In particular:
LOCAL_SERVER points to the local docker registry
DATASTORE_DATA_PATH points to the folder in which the images in the docker registry are stored
In order to activate ONEDock in ONE, you just need to update the /etc/one/oned.conf file.
Then you must add onedock to be available as transfer manager and datastore. Please locate the proper lines in /etc/one/oned.conf file and append the onedock
keyword. In the default installation, the result will be similar to the next one:
Computing nodes
Installation of OpenNebula, Docker and the required packages
OpenNebula
You have to install OpenNebula (i.e. installing the opennebula-node package, the shared directories, the network bridge, etc.). That means that the OpenNebula node should be installed as if it was going to run KVM Virtual Machines. You can follow the instructions in the official OpenNebula documentation.
Docker
You have to install Docker, according to the official Docker documentation.
Warning
We recommend using docker version 1.9. If you use docker engine versions greater than 1.9, we can not ensure that OneDock works correctly. If you have doubts about installing an scpecific version of docker, please check the installation scripts in this repository: install/centos/install-docker
REMEMBER to install the certificates of your Docker registry (from the frontend) in the proper directories (of the nodes). In case of CentOS 7, you can use the following code:
Required packages
Now install the required packages: jq, xmlstarlet
Installation of ONEDock and activating it in ONE
From package
You must have the epel repository enabled:
Then you have to enable the INDIGO - DataCloud packages repositories. See full instructions here. Briefly you have to download the repo file from INDIGO SW Repository in your /etc/yum.repos.d folder.
And then install the GPG key for the INDIGO repository:
Finally install the Onedock package.
Manually
You need to update the file /etc/sudoers.d/opennebula
to add the file that will configure the network. You need to add the line
And to activate this alias appending the alias in the following line
Also you need to add the oneadmin
user to the docker
group, in order to be able to run docker containers.
Finally you need to create the onedock log file and give permission to the oneadmin user
Issues
Most of the issues come from an incorrect configuration of OpenNebula or the docker registry. The main way to find what is causing the issue is checking the log files.
The log file for ONEDock can be found in /var/log/onedock.log
. The log of the OpenNebula daemon is located in /var/log/one/oned.log
.
Job for nfs-server.service failed because the control process exited with error code
This error can happen during the OpenNebula installation. If you have issues with the nfs service enable first the rcpbind service and try again. To enable rcpbind use the following commands:
Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory
If the frontend fails to add a new host and you see this error in the /var/log/one/oned.log
file, make sure that you have the libvirt daemon running in the node that you want to add. To enable the daemon execute:
Can't connect to the NFS server - mount.nfs: Connection timed out
Most of the times this means that the firewall is blocking our NFS server. A nice tutorial to set up a nfs server and connect a client can be found here.
Last updated