This post is about a simple tool called miniONE, which allows you to easily install OpenNebula on a single host from the freshly deployed system to the ready-to-use OpenNebula installation just by a single command.
Let’s say that you just want to check out how OpenNebula looks like when starting evaluation or you want to see if something particular is done in v5.6. This might be the case when you can use miniONE.
So, just get it:
$ wget https://github.com/OpenNebula/minione/raw/v5.6.0/minione
and run it:
$ sudo bash minione
At first, there needs to be some checks done. You can see all of them by running with –verbose.
$ sudo bash minione --verbose ### Checks & detection Checking distribution and version [CentOS 7] OK Checking cpu virtualization capabilities OK Check free disk space OK Using local interface [ens3] OK Checking directories from previous installation OK Checking user from previous installation OK Checking sshd service is running OK Checking bridge-utils are installed SKIP will try to install Checking minionebr interface is not present OK Check given VN 172.16.100.0/24 is not routed OK Checking SELinux OK Checking for present ssh key SKIP Generating ssh keypair in /root/.ssh/id_rsa OK Checking presence of the market app: "CentOS 7 - KVM" OK
Mainly you need to run it on a supported system — Centos 7 and recently Ubuntus so far. Then, you need CPU capable to perform virtualization, some free space to allocate the images and virtual machines itself, etc.
It may happen that you hit some non critical check to fail
### Checks & detection Checking directories from previous installation FAILED
But you might try to force it using -f.
$ sudo bash minione -f ### Checks & detection Checking directories from previous installation IGNORED will be deleted
Once you get through that, you may start the installation.
### Main deployment steps: Purge previous installation Configure bridge minionebr with IP 172.16.100.1/24 Enable NAT over ens3 Using ssh public key /root/.ssh/id_rsa.pub Install OpenNebula version 5.6 Do you agree? [yes/no]: ### Installation Install bridge-utils OK Creating bridge interface minionebr OK Restarting network OK Enabling ipv4 forward OK Configuring nat using iptables OK Saving iptables changes OK Installing DNSMasq OK Starting DNSMasq OK Configuring repositories OK Installing epel OK Installing OpenNebula packages OK Installing ruby gems OK Installing OpenNebula node packages OK ### Configuration Switching onegate endpoint in oned.conf OK Switching scheduler interval to 10sec OK Setting initial password for current user and oneadmin OK Starting opennebula services OK Checking OpenNebula is working OK Disabling ssh from virtual network OK Adding localhost ssh key to known_hosts OK Testing ssh connection to localhost OK Add ssh key to oneadmin user OK Updating datastores, TM_MAD=qcow2, SHARED=yes OK Creating host OK Creating virtual network OK Exporting [CentOS 7 – KVM] from marketplace to local datastore OK Updating template OK
What is happening? Apart from the installation itself, which simply adds the repositories and installs the OpenNebula packages, some configuration changes must be done. Above all, the networking needs be prepared to somehow allow you to connect to the virtual machines later.
For that purpose the bridge interface is created with dedicated network segment and NAT is configured on the installing host. Also, DNS server (DNSMasq) is started for the virtual machines.
miniONE comes with default parameter values for most cases. See them all in the Help:
$ bash minione --help -h --help List of supported arguments --version [5.6] Specify OpenNebula version -f --force Skip non-fatal validation errors (e.g., traces of existing inst.) -v --verbose Be verbose --yes Don't ask --password [random generated] Initial password for oneadmin --ssh-pubkey [~/.ssh/id_rsa.pub] User ssh public key --bridge-interface [minionebr] Bridge interface for private networking --nat-interface [first net device] Interface to configure for NAT --vnet-address [172.16.100.0] Virtual Network address --vnet-netmask [255.255.255.0] Virtual Network netmask --vnet-gateway [172.16.100.1] Virtual Network gateway (i.e. bridge IP) --vnet-ar-ip-start [172.16.100.1] Virtual Network AR start IP --vnet-ar-ip-count  Virtual Network AR size --marketapp-name [CentOS 7 - KVM] Name of Marketplace appliance to import --vm-password [opennebula] Root password for virtual machine
Before the installation finishes, it also bootstraps the OpenNebula to be ready to use. At first it enables KVM hypervisor on localhost and downloads one appliance from the market place. So, once that is complete, you may easily login using the printed credentials:
### Report OpenNebula 5.6 was installed Sunstone (the webui) is runninng on: http://192.168.100.101:9869/ Use following to login: user: oneadmin password: o6ARsMAdGe
And that’s it! It won’t take us to Mars, but it might be handy, nonetheless.