O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OpenNebula 3 Cloud Computing

Book Description

This book will teach you to build and maintain a cloud infrastructure using OpenNebula, one of the most advanced, highly scalable toolkits for GNU/Linux. Walks you through from initial planning to advanced management techniques.

  • Take advantage of open source distributed file-systems for storage scalability and high-availability
  • Build-up, manage and maintain your Cloud without previous knowledge of virtualization and cloud computing
  • Install and configure every supported hypervisor: KVM, Xen, VMware
  • Step-by-step, focused on Ubuntu/Debian distributions, but with general how-to working with every GNU/Linux distribution

In Detail

OpenNebula is one of the most advanced and highly-scalable open source cloud computing toolkits. If you ever wanted to understand what Cloud Computing is and how to realize it, or if you need a handy way to manage your messy infrastructure in a simple and coherent manner, this is your way.

OpenNebula 3 Cloud Computing guides you along the building and maintenance of your cloud infrastructure, providing real-world examples, step-by-step configuration and other critical information. The book keeps you a step ahead in dealing with the demanding nature of cloud computing and virtual infrastructure management using one of the most advanced cloud computing toolkits– OpenNebula. The book takes you from a basic knowledge of OpenNebula to expert understanding of the most advanced features.

The book starts with a basic planning of hardware resources and presents the unique benefits of the supported hypervisors; you will go in deep with day-to-day management of virtual instances, infrastructure monitoring and integration with Public Clouds like Amazon EC2.

With this book you will be able to get started with fast and cheap configuration recipes, but also go deeper for a correct integration with your existing infrastructure.

You will deal with well-know virtualization technologies like Xen and VMware, but also with the promising KVM technology integrated in the Linux kernel. After the basic infrastructure set-up, you will learn how to create and manage virtual instance via both command-line and web interfaces, and how to monitor your existing resources.

At the end, the book acquaints you with integrating your local infrastructure with external Cloud resources but also publishing your resources to others via common API interfaces.

Table of Contents

  1. OpenNebula 3 Cloud Computing
    1. Table of Contents
    2. OpenNebula 3 Cloud Computing
    3. Credits
    4. Foreword
    5. About the Author
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    9. 1. OpenNebula and Why it Matters?
      1. The core features
        1. Standing on the shoulders of the giants
          1. Xen
          2. KVM
          3. QEMU/KVM
          4. Libvirt
          5. VMware
      2. Summary
    10. 2. Building Up Your Cloud
      1. Typical cloud hardware
        1. CPU
        2. Memory
        3. Disk and RAID
        4. Network card
      2. Book conventions
      3. Basic OS installation and partitioning
        1. Commonly required configurations
          1. Frontend software requirements
          2. Host software requirements
          3. Image Repository and storage
          4. Networking
          5. The oneadmin user
        2. OpenNebula installation through sources
        3. Ruby dependencies
      4. OpenNebula installation through pre-built packages
      5. Basic OpenNebula configuration
        1. SSH public-key authentication
        2. One daemon per oneadmin user
        3. Self-contained installations
        4. First start of oned
      6. OpenNebula frontend configuration
        1. MySQL backend configuration
        2. Virtual network configuration
        3. Image Repository configuration
        4. Information Manager driver configuration
        5. Virtualization Manager driver configuration
        6. Transfer Manager driver configuration
        7. Image Manager driver configuration
        8. Hook system configuration
        9. Managing users and groups
        10. Local and remote user login
        11. Creating custom groups with custom ACLs
        12. Quota
      7. Summary
    11. 3. Hypervisors
      1. Configuring hosts
        1. The oneadmin account and passwordless login
          1. Verifying the SSH host fingerprints
        2. Configuring a simple DNS with dnsmasq
        3. Configuring sudo
        4. Configuring network bridges
      2. Managing hosts in OpenNebula
      3. Networking drivers
        1. Configuring the fw support
        2. Configuring the ebtables support
      4. KVM installation
        1. Enabling kernel samepage merging
        2. Using an updated kernel in Ubuntu Lucid
      5. The Xen installation
        1. Installing on Debian Squeeze through standard repositories
        2. Installing Xen through sources
          1. A suitable kernel with dom0 support – Debian Squeeze
          2. A suitable Kernel with dom0 support – Oneiric backport
          3. Checking if your current kernel has Xen support
          4. Building a custom kernel with dom0 and domU support
          5. Autoloading necessary modules
          6. Onehost create for Xen hosts
      6. Installing VMware ESXi
        1. Required software on the frontend
      7. Installing Libvirt with ESX support
        1. Adding a oneadmin user with privileges
      8. Summary
    12. 4. Choosing Your Storage Carefully
      1. How a transfer manager works
      2. Non-shared storage through SSH/CP
        1. Non-shared storage scripts
      3. Shared storage through NFS on the frontend
      4. Shared storage through NFS using NAS/SAN
        1. Shared storage scripts
      5. Shared storage through distributed file systems
      6. Shared storage through GlusterFS
        1. GlusterFS hardware requirements
        2. GlusterFS server installation
        3. Setting up a GlusterFS volume
        4. Starting a GlusterFS volume
        5. Accessing GlusterFS data
        6. Tuning volume options
        7. Operations on volume
        8. Self-heal on replicated volumes
        9. Overview of GlusterFS integration with OpenNebula
      7. Shared Storage through MooseFS
        1. MooseFS hardware requirements
        2. MooseFS server installation through sources
        3. MooseFS server installation through PPA
        4. MooseFS master configuration
        5. MooseFS chunkserver configuration
        6. MooseFS metalogger configuration
          1. Master takeover with metalogger data
        7. MooseFS client mounting
          1. NFS fallback mount through unfs3
        8. MooseFS web interface
          1. Setting goals and fault tolerance
          2. Setting trash time and access to the trash bin
          3. Making snapshots
        9. MooseFS OpenNebula integration
      8. Summary
    13. 5. Being Operational—Everything Starts Here!
      1. Launch a test instance—ttylinux
      2. Managing the virtual networks
        1. Template for ranged networks
        2. Template for fixed networks
        3. Submitting and managing a network template
      3. Managing the disk images
        1. Template for operating system images
        2. Template for datablock images
        3. Template for CDROMs
        4. Specific image handling for VMware
        5. Submitting a new disk image
        6. Changing attributes of submitted templates
      4. Managing virtual machines
        1. Virtual machine life-cycle
        2. Managing the instances
      5. The virtual machine template
        1. The capacity section
        2. The OS and boot options section
        3. The disks section
        4. The network section
        5. The I/O devices section
        6. The placement section
        7. The context section
        8. The RAW section
        9. Simple examples
          1. KVM example
          2. Xen HVM example
          3. Xen pygrub example
          4. VMware example
      6. Contextualization
        1. The basic contextualization
        2. The generic contextualization
      7. The template repository
      8. Summary
    14. 6. Web Management
      1. Sunstone installation
        1. Deploying Sunstone on a different machine
        2. Configuring an SSL reverse proxy with nginx
          1. Generating a self-signed certificate
          2. Starting the nginx SSL proxy-machine
      2. First log in
        1. Dashboard
        2. Hosts
        3. Virtual machines
        4. VM Templates
        5. Virtual Networks
        6. Images
        7. Users
        8. Group
        9. ACLs
      3. Summary
    15. 7. Health and Monitoring
      1. Checking the status of the available hosts
      2. Host monitoring and failure recovery hooks
      3. VM monitoring and failure recovery hooks
      4. A custom hook: e-mail notification for each failure
      5. Expanding data collected by the IM
        1. Temperature attribute
        2. Load average attribute
      6. What is Ganglia?
      7. Ganglia architecture and deployment on the frontend
        1. Ganglia Monitoring Daemon (gmond)
          1. Multicast configuration
          2. Unicast configuration
          3. Metric modules configuration
          4. How to use a gmetric script
          5. How to use a gmond Python module
        2. Ganglia Meta Daemon (gmetad)
        3. Ganglia PHP web frontend
      8. Deploying gmond on the remaining hosts
      9. Multiple Ganglia cluster configuration (for VMs)
      10. Ganglia PHP web frontend usage
      11. Ganglia integration with OpenNebula IM
        1. Pointing to the local gmond
        2. Setting cron for updating VM information
        3. Adding new hosts using im_ganglia
        4. Web interface glitch fix
      12. Sending alerts when a metric reaches a user limit
      13. Summary
    16. 8. Hybrid Cloud Computing: Extending OpenNebula
      1. Why use an external Cloud provider?
      2. What is AWS
        1. How EC2 works
        2. EC2 Locations (Regions and Availability Zones)
        3. Instance types by purchasing options
        4. Instance types by size
        5. Available Amazon Machine Images (AMI)
        6. BitNami AMIs
      3. AWS signup and first login
        1. Free usage tier
      4. Requirements for using EC2 in OpenNebula
        1. Setting up an SSH Key Pair
        2. Setting up an X.509 Certificate
        3. Downloading and configuring Amazon EC2 API Tools
      5. OpenNebula configuration
        1. IM_EC2 configuration
        2. VMM_EC2 default template attributes configuration
        3. EC2 API Tools configuration
        4. Adding the first EC2 host
        5. Known Limitations
      6. Launching the first VM instance on EC2
        1. EBS Snapshots
        2. Creating a new AMI from a snapshot
      7. A more complex template example
        1. Using Elastic IP addresses
      8. Multi-region (or provider) support
      9. Windows instances
        1. Retrieving password from the command line
        2. Retrieving password from Management Console
      10. Adding storage to a running instance
        1. Mounting an EBS volume on Linux-based instances
        2. Mounting an EBS volume on Windows-based instances
      11. Moving data around different AZ
      12. A very simple EBS backup script
      13. Monitoring active instances
      14. Summary
    17. 9. Public Cloud Computing and High Availability with OpenNebula
      1. Setting up the EC2 Query interface
        1. Installing econe-server
        2. Configuring econe-server
        3. Starting and stopping econe-server
      2. Using the EC2 Interface
        1. EC2 example user session
        2. ElasticFox example user session
      3. OCCI Interface
        1. Setting up the OCCI interface
        2. Installing occi-server
        3. Configuring occi-server
        4. Configuring OCCI VM and network templates
        5. Starting and stopping occi-server
      4. Using the OCCI interface
        1. OCCI example user session
        2. Updating the already submitted resources
      5. OpenNebula Zones and VDC
        1. Why Zones?
        2. Why VDC?
      6. Setting up oZones server
        1. Configuring the Apache2 reverse-proxy
        2. Configuring ozones-server
      7. Managing the zones
        1. Adding a new zone
      8. Managing Virtual Data Centers
        1. Adding a new VDC
        2. Sharing hosts between VDCs
        3. Adding or removing hosts in a VDC
      9. Using a VDC
        1. Command line access
        2. Sunstone access
      10. Using the oZones GUI
      11. Summary
    18. Index