Thursday, July 28, 2016

OPEN NEBULA INSTALLATION




OPEN NEBULA INSTALLATION ON UBUNTU 14.04




















To test if your host supports virtualization extensions, please run:

grep -E 'svm|vmx' /proc/cpuinfo

If you don’t get any output you probably don’t have virtualization extensions supported/enabled in your server.

Step 1. Installation in the Frontend


Commands prefixed by # are meant to be run as root. Commands prefixed by $ must be run as oneadmin.

1.1. Install the repo


Add the OpenNebula repository:

# wget -q -O- http://downloads.opennebula.org/repo/Ubuntu/repo.key | apt-key add -
# echo "deb http://downloads.opennebula.org/repo/Ubuntu/14.04 stable opennebula" \
> /etc/apt/sources.list.d/opennebula.list

1.2. Install the required packages


# apt-get update
# apt-get install opennebula opennebula-sunstone nfs-kernel-server

1.3. Configure and Start the services


There are two main processes that must be started, the main OpenNebula daemon: oned, and the graphical user interface: sunstone.

Sunstone listens only in the loopback interface by default for security reasons. To change it edit /etc/one/sunstone-server.conf and change :host: 127.0.0.1 to :host: 0.0.0.0.

Now we must restart the Sunstone:

# /etc/init.d/opennebula-sunstone restart

1.4. Configure SSH Public Key


OpenNebula will need to SSH passwordlessly from any node (including the frontend) to any other node.

To do so run the following commands:

# su - oneadmin
$ cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

Add the following snippet to ~/.ssh/config so it doesn’t prompt to add the keys to the known_hosts file:

$ cat << EOT > ~/.ssh/config
Host *
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOT
$ chmod 600 ~/.ssh/config

Step 2. Installation in the Nodes


2.1. Install the repo


Add the OpenNebula repository:

# wget -q -O- http://downloads.opennebula.org/repo/Ubuntu/repo.key | apt-key add -
# echo "deb http://downloads.opennebula.org/repo/Ubuntu/14.04 stable opennebula" > \
/etc/apt/sources.list.d/opennebula.list

2.2. Install the required packages


# apt-get update
# apt-get install opennebula-node nfs-common bridge-utils

2.3. Configure the Network


[Warning : Backup all the files that are modified in this section before making changes to them.]

You will need to have your main interface, typically eth0, connected to a bridge. The name of the bridge should be the same in all nodes.

If you were using DHCP for your eth0 interface, replace /etc/network/interfaces with:

auto lo
iface lo inet loopback

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

If you were using a static IP addresses instead, use this other template:

auto lo
iface lo inet loopback

auto br0
iface br0 inet static
address 192.168.0.10
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

After these changes, restart the network:

# /etc/init.d/networking restart

2.4. Configure Qemu


The oneadmin user must be able to manage libvirt as root:

# cat << EOT > /etc/libvirt/qemu.conf
user = "oneadmin"
group = "oneadmin"
dynamic_ownership = 0
EOT

Restart libvirt to capture these changes:

# service libvirt-bin restart

Step 3. Basic Usage



All the operations in this section can be done using Sunstone instead of the command line. Point your browser to: http://frontend:9869.

The default password for the oneadmin user can be found in ~/.one/one_auth which is randomly generated on every installation.
open nebula One admin panel






























To interact with OpenNebula, you have to do it from the oneadmin account in the frontend. We will assume all the following commands are performed from that account. To login as oneadmin execute su - oneadmin.

No comments:

Post a Comment