Introduction to Cloud Infrastructure Technologies Notes

LinuxFoundationX: LFS151.x Introduction to Cloud Infrastructure Technologies course notes


Last Updated: December 31, 2018 by Pepe Sandoval



Want to show support?

If you find the information in this page useful and want to show your support, you can make a donation

Use PayPal

This will help me to create more stuff and fix the existent content... or probably your money will be used to buy beer


Introduction to Cloud Infrastructure Technologies Notes

Index

Chapter 1: The Linux Foundation and Introduction

Chapter 2: Infrastructure as a Service (IaaS)

Chapter 1: Virtualization

Introduction

  • Cloud computing is a model for enabling on-demand network access to a shared pool of configurable computing resources (resources meaning networks, servers, storage, applications, and services). Cloud computing providers offer different kinds of services that usually fall into one of the following categories:

    • Infrastructure as a Service (IaaS)
    • Platform as a Service (PaaS)
    • Software as a Service (SaaS).
  • Virtual machines are created on top of a hypervisor, which runs on top of the host machine's operating system

  • hypervisors allow us to emulate hardware like CPU, disk, network, memory, etc

Virtualization Products

KVM

  • KVM for (Kernel-based Virtual Machine) is an open source full virtualization solution for Linux on x86 hardware, low-cost, scalable and high security features
  • KVM does not perform any emulation itself, but it exposes the /dev/kvm interface, by which an external userspace host can do emulation. QEMU is one such host.
  • Overcommitting allocate more virtualized resources (CPUs or memory) than the available resources on the system

Virtual Box

  • VirtualBox is an x86 and AMD64/Intel64 virtualization product from Oracle. It is an easy-to-use open source multi-platform hypervisor
    • It is not part of the mainline kernel. So, to use it on Linux, we have to compile and insert the respective kernel module.
    • It provides two virtualization choices: software-based virtualization and hardware-assisted virtualization.

Vagrant

  • Vagrant is a cross-platform tool that helps us automate the setup and deletion of one or more VMs (using other VM providers like Virtual Box, Docker, KVM, etc.)

  • Vagrant commands:

    • use vagrant up in the folder where the vagrantfile is to setup and start a VM specified by that vagrantfile
    • use vagrant status to check status of current VMs
    • use vagrant shh login a VM
    • use vagrant halt to shutdown a VM
    • use vagrant destroy to destroy a VM
  • Vagrantfile: It is a text file with the Ruby syntax, which has all the information about configuring and provisioning a set of machines. It has details like the machine type, image, networking, provider-specific information, provisioner details, etc.

    • Boxes in Vagrant refers to OS images. We need to provide an image in the Vagrantfile, which we can use to instantiate machines
    • Providers are the underlying engine/hypervisor used to provision a machine
    • Provisioners allow us to automatically install software, make configuration changes, etc. after the machine is booted. For example shell will be a provisioner in Vagrant

      # -*- mode: ruby -*-
      # vi: set ft=ruby :
      
      Vagrant.configure(2) do |config|
       # Every Vagrant development environment requires a box. You can search for
       # boxes at https://atlas.hashicorp.com/search.
       config.vm.box = "centos/7"
      
       # Create a private network, which allows host-only access to the machine
      
       # using a specific IP.
       config.vm.network "private_network", ip: "192.168.33.10"
      
       # config.vm.synced_folder "../data", "/vagrant_data"
      
       config.vm.provider "virtualbox" do |vb|
          # Customize the amount of memory on the VM:
          vb.memory = "1024"
       end
      
       config.vm.provision "shell", inline: <<-SHELL
             yum install vim -y
       SHELL
      end
      

Chapter 2: Infrastructure as a Service (IaaS)

  • Infrastructure as a Service (IaaS) is a form of cloud computing which provides on-demand physical and virtual computing resources (storage, network, firewall, load balancers, etc.)

  • Infrastructure as a Service is the backbone of all cloud services, providing the compute resources. After getting the compute resources, we provide other services on top of that.

  • Amazon Elastic Compute (Amazon EC2)
    • Uses XEN and KVM hypervisors to provision compute resources
    • Allows you to choose between different compute instances each with different resources (t2.nano, c4.large, d2.8xlarge)
    • provides preconfigured images, called Amazon Machine Images (AMIs) to boot the instances and allows the creation of custom AMIs
    • Uses Amazon Elastic Block Store (EBS) to attach/detach persistent storage
    • You can configure Auto Scaling to dynamically resize your resources
    • To Create instance:
      1. Setup your key pair
      2. Create and insatnce by clicking on: Services -> EC2 -> Launch Instance
      3. Select AMI,
      4. Select instance type, click launch and select key pair
  • Azure Virtual Machine
    • Provides compute provisioning and management
    • Offers predefined VMs and also offers different tiers based on the usage and OS
    • To create a VM instance:
      1. From the menu select Virtual machines click on Create virtual machine
      2. Select OS or VM template, select Resource Manager on deplyment model and click create
      3. Give name, username, use SSD for VM disk, select SSH public key and paste your publick key, give a name for Resource group and click OK
      4. Select size of instance. e.g. B1ms or B1s
      5. Select No public inbound ports on Select public inboud ports and keep other default settings then click OK
      6. Click on Create
  • DigitalOcean
    • All of the VMs are created on top of the KVM hypervisor and have SSD (Solid-State Drive) as the primary disk
    • Offers diffent plans, each include different computing resources and prices
    • It offers a one-click installation of a multitude of application stacks like MEAN and Docker.
    • To create a VM:
      1. Click on: Create -> Create Droplet
      2. Select image and size, skip backup and storage options,
      3. (Recommended) Set an SSH key
      4. Select 1 droplet to set the creation of one VM, set a name and click on Create
  • Google Compute Engine (GCE)
    • It is part of Google Cloud Platform which is Google cloud offering platform and allows management of compute instances through GUI, APIs or command line.
    • Supports different preconfigured machine types and allows the creation of custom machines
    • To create an instance:
      1. Go to console and create a project to attach you instance to it
      2. Go to menu and to Compute Engine, tehn click on Create
      3. Give a name, select region, selct machine type resources, select boot image
      4. Leave other options as default and clikc on Create
  • OpenStack
    • Open source IaaS solution that evolved to provide other services
    • OpenStack Components:
      • Keystone - Provides Identity, Token, Catalog, and Policy services to projects.
      • Nova - Provides on-demand compute resources.
      • Horizon - Provides the Dashboard, which is a web-based user interface to manage the OpenStack service.
      • Neutron - Implements the network as a service and provides network capabilities to different OpenStack components.
      • Glance - Provides a service where users can upload and discover data assets, like images and metadata.
      • Swift - Provides a highly available, distributed, eventually consistent object/blob store.
      • Cinder - Provides block storage as a service.
      • Heat - Provides a service to orchestrate composite cloud applications, using a declarative template format through an OpenStack-native REST API.
      • Ceilometer - It is part of the Telemetry project and provides data collection services for billing and other purposes.
    • To deploy an instance with Openstack:
      1. We need to use DevStack
      2. Go to Project and in the Compute section click on Instances and then clcik on Launch Instances
      3. Give a name, set Count to 1
      4. Use the arrows button In the Source tab to select image and in the Flavor tab to select type of machine depending on resources. e.g. ds1G
      5. Click on Launch

SaaS, PaaS, IaaS

Want to show support?

If you find the information in this page useful and want to show your support, you can make a donation

Use PayPal

This will help me to create more stuff and fix the existent content... or probably your money will be used to buy beer