We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Install OpenNebula Front-end on Ubuntu 20.04|18.04|16.04

Learn how to – Install OpenNebula Front-end on Ubuntu 20.04|18.04|16.04.

In this guide, I’ll take you through the steps of Installing OpenNebula Front-end on Ubuntu 20.04|18.04|16.04 LTS. OpenNebula is an opensource, feature-rich and flexible Virtualization solution that helps you build and manage Virtualized Data Centers and enterprise clouds.

For CentOS 7, use: Installing OpenNebula Front-end on CentOS 7

Why OpenNebula

OpenNebula combines existing virtualization technologies like KVM and VMware with advanced features for multi-tenancy, automatic provision, and elasticity. Its aim is to make management of cloud simple. It can be compared with other Cloud Management platforms like Openstack and Cloudstack.

OpenNebula Components

OpenNebula has two main components:

  1. OpenNebula Front-end – This is the management engine that executes the OpenNebula services.
  2. OpenNebula Hypervisor Nodes – These are the hypervisors which provide the resources needed by the VMs.

The minimum recommended specs for the OpenNebula front-end are:

Resources Minimum Recommended configuration
Memory 2 GB
CPU 1 CPU (2 cores)
Disk Size 100 GB
Network 2 NICS

The OpenNebula Front-end machine needs network connectivity to all the hosts, and possibly access to the storage Datastores (either by direct mount or network). The base installation of OpenNebula takes less than 150MB.

Install OpenNebula Front-end on Ubuntu 20.04|18.04|16.04

Here we’ll walk through all steps to get OpenNebula Front-end engine up and running on Ubuntu 20.04/18.04 /16.04 server. I assume you already have a running instance of one of this operating systems, this can be a virtual machine or a physical server.

Step 1:  Add OpenNebula and Debian repositories

Run the following commands to add epel and OpenNebula repositories on Ubuntu.

Import Repository Key:

wget -q -O- https://downloads.opennebula.org/repo/repo.key | sudo apt-key add -

Add the repository to the system:

Ubuntu 20.04:

echo "deb https://downloads.opennebula.org/repo/6.1/Ubuntu/20.04 stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list

For Ubuntu 18.04:

echo "deb https://downloads.opennebula.org/repo/6.1/Ubuntu/18.04 stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list

For Ubuntu 16.04:

echo "deb https://downloads.opennebula.org/repo/6.1/Ubuntu/16.04 stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list

Please check the recent version of OpenNebula as you install.

Step 2: Install and Configure MySQL database

Since we’re going to configure our OpenNebula to use MySQL instead of SQLite, let’s configure it. First, install MariaDB server:

sudo apt update
sudo apt -y install mariadb-server

Initiate security settings of MariaDB database server:

sudo mysql_secure_installation

Once MariaDB is installed and running, create a database and user for OpenNebula.

$ sudo mysql -u root -p
CREATE DATABASE opennebula;
GRANT ALL PRIVILEGES ON opennebula.* TO 'oneadmin' IDENTIFIED BY 'StrongPassword';
FLUSH PRIVILEGES;
EXIT;

Step 3: Install OpenNebula Front-end packages

These are the packages available on OpenNebula CentOS repository:

  • opennebula-common: Provides the user and common files.
  • ruby-opennebula: Ruby API.
  • libopennebula-java: Java API.
  • libopennebula-java-doc: Java API Documentation.
  • opennebula-node: Prepares a node as an opennebula-node.
  • opennebula-sunstoneSunstone (the GUI).
  • opennebula-tools: Command Line interface.
  • opennebula-gateOneGate server that enables communication between VMs and OpenNebula.
  • opennebula-flowOneFlow manages services and elasticity.
  • opennebula: OpenNebula Daemon.

Install all OpenNebula packages by running the commands:

sudo apt update
sudo apt install opennebula opennebula-sunstone opennebula-gate opennebula-flow

Besides /etc/one, the following files are marked as configuration files:

  • /var/lib/one/remotes/etc/datastore/ceph/ceph.conf
  • /var/lib/one/remotes/etc/vnm/OpenNebulaNetwork.conf

Step 4:  Ruby Runtime Installation.

Some OpenNebula components need Ruby libraries. OpenNebula provides a script that installs the required gems as well as some development libraries packages needed.

sudo /usr/share/one/install_gems

You’ll get a prompt asking you to select OS and confirm.

Distribution "debian" detected.
About to install these dependencies:
* gcc
* rake
* libxml2-dev
* libxslt1-dev
* patch
* g++
* libsqlite3-dev
* libcurl4-openssl-dev
* default-libmysqlclient-dev
* ruby-dev
* make

Press enter to continue...

Press enter to start the installation.

Step 5: Configure OpenNebula DB

Then open the fileoned.conf and edit to add MySQL db settings.

sudo vim /etc/one/oned.conf

Uncomment the line:

#DB = [ BACKEND = "sqlite" ]

Then add:

DB = [ backend = "mysql",
 server = "localhost",
 port = 0,
 user = "oneadmin",
 passwd = "StrongPassword",
 db_name = "opennebula" ]

Replace StrongPassword with the password you specified earlier for the DB. Confirm that the user can log in to DB.

$ mysql -u oneadmin -p

Step 6: Configure oneadmin credentials

A randomly generated file is usually placed on the file /var/lib/one/.one/one_auth.

$ sudo cat /var/lib/one/.one/one_auth
oneadmin:b82f13701914afc9e3c6aea69f180109

If you need to change the password, do it here.

$ sudo su - oneadmin
$ echo "oneadmin:mypassword" > ~/.one/one_auth

This will set the oneadmin password on the first boot. From that point, you must use the command below to change oneadmin’s password.

$ oneuser passwd

Step 7: Configure Firewall (UFW)

We’re close to the final step. If you have an active UFW firewall, you need to allow specific ports required by OpenNebula.

If running, open the port required to access Sunstone web interface.

sudo ufw allow proto tcp from any to any port 9869

Step 8: Start OpenNebula daemons.

Used systemd service management command to start OpenNebula services.

sudo systemctl start opennebula opennebula-sunstone
sudo systemctl enable opennebula opennebula-sunstone

Step 10: Verifying the Installation and Accessing Sunstone UI

After OpenNebula is started for the first time, you should check that the commands can connect to the OpenNebula daemon. You can do this in the Linux CLI or in the graphical user interface: Sunstone. From CLI in the Front-end, run the following command as oneadmin:

$ sudo su - oneadmin -c "oneuser show"
USER 0 INFORMATION
ID : 0
NAME : oneadmin
GROUP : oneadmin
PASSWORD : 8d516557789b40a3d6e8964f8f926da8970a09ab
AUTH_DRIVER : core
ENABLED : Yes

TOKENS

USER TEMPLATE
TOKEN_PASSWORD="d1889697b828156a14e1376b374184ed5d65dea2"

RESOURCE USAGE & QUOTAS

If you get an error message, then the OpenNebula daemon could not be started properly.

The OpenNebula logs are located in /var/log/one, namely:

  • oned.log – Core logs. Error messages will be located here. prefixed with [E]
  • sched.log – Scheduler logs are located here.

Accessing Sunstone UI

Now you can try to log in to Sunstone web interface. To do this point your browser to:

http://<fontend_address>:9869

If everything is OK you will be greeted with a login page.

The user is oneadmin and the password is the one in the file /var/lib/one/.one/one_auth in your Front-end. On logging in, you should get a dashboard like below.

OpenNebula Front-end Directory structure

The following table lists some notable paths that are available in your Front-end after the installation:

Path Description
/etc/one/ Configuration Files
/var/log/one/ Log files, notably: oned.logsched.logsunstone.log and <vmid>.log
/var/lib/one/ oneadmin home directory
/var/lib/one/datastores/<dsid>/ Storage for the datastores
/var/lib/one/vms/<vmid>/ Action files for VMs (deployment file, transfer manager scripts, etc…)
/var/lib/one/.one/one_auth oneadmin credentials
/var/lib/one/remotes/ Probes and scripts that will be synced to the Hosts
/var/lib/one/remotes/hooks/ Hook scripts
/var/lib/one/remotes/vmm/ Virtual Machine Manager Driver scripts
/var/lib/one/remotes/auth/ Authentication Driver scripts
/var/lib/one/remotes/im/ Information Manager (monitoring) Driver scripts
/var/lib/one/remotes/market/ MarketPlace Driver scripts
/var/lib/one/remotes/datastore/ Datastore Driver scripts
/var/lib/one/remotes/vnm/ Networking Driver scripts
/var/lib/one/remotes/tm/ Transfer Manager Driver scripts

We have installed OpenNebula Front-end on Ubuntu 20.04/18.04/16.04 LTS.  Next read

Cart

Your Cart is Empty

Back To Shop