OpenNebula - OpenNebula and tips for CentOS 7

18
1/18 OpenNebula - Latest Innovations in Private Cloud Computing OpenNebula OpenNebula and tips for CentOS 7 Javi Fontán Project Engineer © OpenNebula Project. Creative Commons Attribution-NonCommercial-ShareAlike License CentOS Dojo Paris, France – August 25 th 2014

description

Talk held by Javier Fontan at the CentOS Dojo in Paris, August 25th (http://wiki.centos.org/Events/Dojo/Paris2014) In this talk we talk about OpenNebula from the perspsective of the CentOS, explaining tips and considerations for power users.

Transcript of OpenNebula - OpenNebula and tips for CentOS 7

Page 1: OpenNebula - OpenNebula and tips for CentOS 7

1/18OpenNebula - Latest Innovations in Private Cloud Computing

OpenNebulaOpenNebula and tips for CentOS 7

Javi FontánProject Engineer

© OpenNebula Project. Creative Commons Attribution-NonCommercial-ShareAlike License

CentOS DojoParis, France – August 25th 2014

Page 2: OpenNebula - OpenNebula and tips for CentOS 7

What is OpenNebula?

Page 3: OpenNebula - OpenNebula and tips for CentOS 7

3/18OpenNebula - Latest Innovations in Private Cloud Computing

The OpenNebula TechnologyAn Uniform Management Layer

Page 4: OpenNebula - OpenNebula and tips for CentOS 7

4/18OpenNebula - Latest Innovations in Private Cloud Computing

The OpenNebula TechnologyCloud Architecture - The Internals of the Cloud

Interfaces Tools & API• CLI & Sunstone (GUI)

• API

• Hybrid (EC2, Azure, SoftLayer)

• Service Management &Catalogs

Compute Hosts• Grouped into logical clusters

• Multiple hypervisors

• Monitoring

Storage• VM disks (file & block)

• Image Distribution

• Multiple Backends

Multi-tenancy• AAA Services

• Scheduling

• Permissions & roles

Network• VLAN

• Firewalling

• Multiple Technologies

Page 5: OpenNebula - OpenNebula and tips for CentOS 7

5/18OpenNebula - Latest Innovations in Private Cloud Computing

The Power of Simplicity

The OpenNebula Vision

Simple for Users

• Single-click provision, manage and access to virtual servers

• Just enough details of the underlying chaos

Simple for Sys Admins

• Do not hide the complexity

• Easy to inspect, understand and adapt

• Ease task automation

• Be prepared for different application types

• Just enough components and simple protocols

• Simplicity is the path to scale!

Page 6: OpenNebula - OpenNebula and tips for CentOS 7

Installing OpenNebula

Page 7: OpenNebula - OpenNebula and tips for CentOS 7

7/18OpenNebula - Latest Innovations in Private Cloud Computing

A Typical OpenNebula EnvironmentPlanning the Installation

• Repository of VM images• Multiple Backends (LVM, Ceph)

Monitoring,Virtualization, Storage and Network

• Provides physical resources for the VMs• Must have a hypervisor installed

Page 8: OpenNebula - OpenNebula and tips for CentOS 7

8/18OpenNebula - Latest Innovations in Private Cloud Computing

Installation Frontend and NodeInstalling

●Add EPEL repository●Add OpenNebula repository● Install Packages

●Configure OpenNebula Services

# yum install opennebula-server opennebula-sunstone opennebula-node-kvm opennebula-flow opennebula-gate# yum install opennebula-server opennebula-sunstone opennebula-node-kvm opennebula-flow opennebula-gate

Page 9: OpenNebula - OpenNebula and tips for CentOS 7

9/18OpenNebula - Latest Innovations in Private Cloud Computing

Installing GlusterFSPlanning the Installation

● CentOS 7 does not come with GlusterFS server

● qemu and libvirt packages support GlusterFS

● GlusterFS packages are compatible with stock qemu/libvirt:

– curl -O /etc/yum.repos.d/glusterfs-epel.repo http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo

– yum install glusterfs{,-server,-fuse,-geo-replication}

● Start GlusterFS daemon (systemctl start glusterd)

● Make sure there is a name for the local machine, gluster wont let you use localhost

Page 10: OpenNebula - OpenNebula and tips for CentOS 7

10/18OpenNebula - Latest Innovations in Private Cloud Computing

More informationOpenNebula web pages

● http://opennebula.org

● http://opennebula.org/tryout

● http://docs.opennebula.org

● http://docs.opennebula.org/4.8/design_and_installation/quick_starts/qs_centos7_kvm.html

● http://dev.opennebula.org

● http://github.com/OpenNebula/one

Page 11: OpenNebula - OpenNebula and tips for CentOS 7

Tips for CentOS 7

Page 12: OpenNebula - OpenNebula and tips for CentOS 7

12/18OpenNebula - Latest Innovations in Private Cloud Computing

Disable FirewallTips for CentOS 7

● Only do this for testing!

● Service iptables does not exist anymore

● Stop firewalld instead– systemctl stop firewalld

● Enable it after finished testing!– Systemctl start firewalld

Page 13: OpenNebula - OpenNebula and tips for CentOS 7

13/18OpenNebula - Latest Innovations in Private Cloud Computing

Use OpenNebula with qemuTips for CentOS 7

● When testing inside a VM you don't have VT extensions

● You can still test creation of VMs using qemu emulation

● Modify /etc/one/oned.conf:– VM_MAD = [

– name = "kvm",

– executable = "one_vmm_exec",

– arguments = "-t 15 -r 0 kvm",

– default = "vmm_exec/vmm_exec_kvm.conf",

– type = "qemu" ]

Page 14: OpenNebula - OpenNebula and tips for CentOS 7

14/18OpenNebula - Latest Innovations in Private Cloud Computing

Tips for CentOS 7

● It's possible to allow the use of specific host devices

● KVM module creates a device (10, 232)

● Add this line to the LXC container config– lxc.cgroup.devices.allow = c 10:232 rwm

● Create the device in your container:– mknod /dev/kvm c 10 232

● Change de permissions

Use Host KVM from an LXC container

Page 15: OpenNebula - OpenNebula and tips for CentOS 7

15/18OpenNebula - Latest Innovations in Private Cloud Computing

TMP directoriesTips for CentOS 7

● lock and run directories now reside in memory

● Manually created directories won't exist anymore after a reboot

● systemd has way to create those directories

● Create a .conf file in /etc/tmpfiles.d:– d /var/run/one 0750 oneadmin oneadmin

● Execute directory creation manually:– systemd-tmpfile --create

Page 16: OpenNebula - OpenNebula and tips for CentOS 7

16/18OpenNebula - Latest Innovations in Private Cloud Computing

qcow formatTips for CentOS 7

● qemu creates qcow images with newer features by default

● Use -o compat=0.10 so the image is compatible with older qemu/kvm versions

● Create new image:– qemu-img create -f qcow2 -o compat=0.10 image.qcow2 10G

● Convert image:– qemu-img convert -f qcow2 -O qcow2 -o compat=0.10 image.qcow2

image2.qcow2

Page 17: OpenNebula - OpenNebula and tips for CentOS 7

17/18OpenNebula - Latest Innovations in Private Cloud Computing

Use virtio!Tips for CentOS 7

● CentOS 6.x stock kernel supports virtio

● Greatly enhances performance

● User virtio-scsi for disks. You get the speed improvements and the number of devices is increased

● virtio network interfaces are called ETH*!

Page 18: OpenNebula - OpenNebula and tips for CentOS 7

18/18OpenNebula - Latest Innovations in Private Cloud Computing

We Will Be Happy to Answer Your Questions

Questions?

OpenNebula.org @OpenNebula