A translation of the article was prepared ahead of the launch of the Linux Administrator course.

ITKarma picture

In this article, you will find a step-by-step guide to the basics of the OpenNebula cloud-based orchestration system on LXD. First, we will use the simple MiniONE tool to create a single-node cloud environment in a physical or virtual machine for users who want to try out the OpenNebula functionality, then look at a regular working session with a GUI and CLI and finally give some links that will help in creating a distributed production environment.

Automated Deployment with MiniONE

MiniONE is a tool that configures a physical host or virtual machine as a single-node cloud to quickly deploy a simple but fully functional test case.

To evaluate LXD, MiniONE requires a dedicated virtual machine or physical host with a fresh installation of Ubuntu 18.04 or 18.10 with at least 2GB of RAM and 20GB of free disk space, as well as privileged root access. For example, MiniONE makes it easy to build an LXD/OpenNebula environment on an Amazon virtual machine. The minimum recommended size is most likely CDMY0CDMY. Simple give her 25 GB of disk space and access to TCP port 9869, where WebUI is running.

Run the MiniONE script on the dedicated system:

wget https://github.com/OpenNebula/minione/releases/download/v5.8.0/minione chmod u+x minione sudo minione --lxd 

Get to know the GUI

After the step with MiniONE, you will receive instructions for connecting to the web interface like the following:

### Report OpenNebula 5.8 was installed Sunstone (the webui) is runninng on: following to login: user: oneadmin password: o6ARsMAdGe 

After completing MiniONE, the first thing we will do is log in as oneadmin and look at the Admin View in Sunstone , where there will be much more options than other interfaces for ordinary users. Look at all the downloaded cloud resources.

ITKarma picture

In Admin View you can do anything with OpenNebula, but you don’t need to give these same opportunities to end users! Switch to Cloud View and see what end users see in OpenNebula.

ITKarma picture

The Cloud View interface is much simpler because it is end-user oriented. Create a new virtual machine by clicking on the + button. Select the only template available and click the Create button. After clicking the Create button, you will be taken to the dashboard where you can see all running virtual machines.

ITKarma picture

To open the control panel, you can click on your virtual machine. There you can access it from VNC, save its state, reboot it, etc.:

ITKarma picture

By clicking on the console icon, you get to the console as root user via VNC

ITKarma picture

Using the oneadmin role, you can customize what your cloud users can see and do.

Get to know the CLI

OpenNebula starts as oneadmin, and the main administrator must execute commands on behalf of this user, so the first thing you need to do is switch to oneadmin :

su - oneadmin 

From the oneadmin account, you can see the downloaded resources:
We have one visualization node:

onehost list 

Created CentOS Image

oneimage list 

Registered Virtual Machine Template:

onetemplate list 

You can see the configuration of the template in more detail

onetemplate show 0 

MarketPlace Access

OpenNebula comes with pre-installed MarketPlace, from which you can get a lot of ready-made images (Apps). There is also integration with images , one of the public LXD image servers:

ITKarma picture

There are various Linux distributions: Alpine, Centos, Debian, etc., as well as some service images with pre-installed applications, such as WordPress or GitLab.

ITKarma picture

There are containers from the public LXD image server. You can find, for example, a completely fresh Ubuntu.

ITKarma picture

And download it to the repository.

ITKarma picture

Now, if you go to the Template - > VMs , you can instantiate it.

Build installation on production

If you want to deploy the cloud on production, you can read the documentation . Deploying a frontend and multiple LXD hosts requires the following steps:

Now you can deploy virtual machines using applications from MarketPlace.

Learn more about the course