One openstack study notes: The Basics

1. What is OpenStack
OpenStack is a set of solutions iaas
OpenStack and RackSpace is collaboration between NASA (NASA) designed to provide software development for the public cloud and private cloud open source project, which aims to provide reliable cloud deployment scenarios and good scalability. Simply put, OpenStack is the cloud operating system, or a cloud management platform level, does not provide its own cloud services, but provide deployment and management level platform.
2, what is cloud computing
increase in Internet-based services related to the use and delivery mode
- This mode offers available, editing, on-demand network access to a shared pool of computing resources can be configured
- these resources can be quickly provided just put minimal management effort, or very little interaction with the service provider
- usually involving the Internet to provide dynamic extensions clothes and often virtualized resources
3, three networks
One openstack study notes: The Basics
(1) infrastructure as server (IaaS ): infrastructure as a service, management of the physical machine, management, storage resource management for virtual machines.
--- service is available to consumers for the use of all computer infrastructure, including processing CPU, users can deploy and run arbitrary software, including operating systems and applications.
--- IaaS is usually divided into three uses: public cloud , private cloud, hybrid cloud,
(2) platform aS a service (PaaS): platform and service development platform to build virtual machines, such as configured Apache, MySql or PHP environment,
--- to the server platform or as a development environment services provided to become paas
service --- the operator needs to be provided, not merely a basic platform, but also for technical support services to the platform, and even application development for the platform to perform, and optimization services
--- Simply put, paas platform is a cloud application infrastructure services specified in the environment, it can be said that the middleware as a service
(3) software-as a service (SaaS): software as a service, such as shopping site, blog site , microblogging website.
--- is a software provided by the internet model, unified application software vendors to deploy their own servers
--- customers according to their actual needs, order the to the vendor via the Internet application services.
--- users do not purchase software, but leased to the provider. to manage the business activities of web-based software, not the software maintenance providers will fully manage and maintain the software, but also provides offline software and local data storage.
4 What is KVM
1) KVM sources
KVM- kernel-based virtual machine (kernel-based virtual machine), the Linux kernel into a Hypervisor virtualization technology, full virtualization solution is a hardware-level virtualization types . Linux is the kernel features, KVM requires two conditions: full hardware support for virtualization, the operating system is Linux.
2) KVM architecture shown in Figure 2-1.
One openstack study notes: The Basics
Hypervisor KVM as kernel running on host (Host OS Kernel), support for analog CPU, memory, I / O, the monitoring of the virtual machine, and provides physical support for the Qemu.
Qemu as a process running on a host user mode, and it is based on the characteristics KVM kernel, Guest OS is simulated CPU, memory, I / O hardware, Guest OS support to run in process.
There are many virtualization management service, most of them based on libvirt achieve, libvirt library is an implementation of Linux virtualization capabilities of Linux API, which supports a variety of hypervisors.
, Kvm, qemu-kvm, the relationship between the. 3 libvirt) qemu
(. 1) qemu
Qemu virtualization is a separate solutions to achieve full virtualization by intel-VT or AMD SVM, qemu installed system can be simulated directly another completely different system environments, create virtual machines by qemu-image systems can be implemented. QEMU itself can not rely on KVM, but if there is the presence of KVM and hardware (processor) support functions such as Intel VT, then the QEMU processor virtualization in this piece can take advantage of features provided by KVM to improve performance.
(2) KVM
KVM is integrated into the Linux kernel Hypervisor are X86 architecture and hardware support for virtualization technology (IntelVT or AMD-V) is a full Linux virtualization solutions. It is a small module for Linux, use Linux to do a lot of things, such as task scheduling, memory management hardware to interact with the equipment. Precisely, KVM is a Linux kernel module is. You can use the command modprobe to load the KVM modules. After loading the module, in order to further create a virtual machine by other tools. But only KVM module is not enough, because the user can not directly control the kernel module to do something, you must also have a job to run in user space tools. The user-space tools, kvm developers have chosen the open-source QEMU virtualization software already formed. Speaking is a QEMU virtualization software. It is characterized by different available virtual CPU. For example, on an x86 CPU can be a Power of virtual CPU, and can use it to compile a program can be run on the Power. KVM QEMU uses part of, and slightly modified, it becomes a controllable KVM user space tool. So you will see, KVM download the official offer has two major components (qemu and kvm) three files (KVM module, QEMU tools and two collection). In other words, you can upgrade only KVM module, you can upgrade only QEMU tools. This is the relationship between the KVM and QEMU.
KVM kernel module itself can only provide CPU and memory virtualization, so it must be combined to form a complete QEMU virtualization technology, which is to say the following qemu-kvm.
(. 3) KVM-QEMU
Qemu the KVM integration in, by calling ioctl / dev / kvm interface related to the instruction of the CPU referred kernel modules do. + cpu virtualization kvm responsible for memory virtualization to achieve the cpu and memory virtualization, but kvm can not simulate other devices. qemu analog IO devices (network card, disk, etc.), will be able to realize the true sense of server virtualization plus after kvm qemu. Because use of the above two things, so called qemu-kvm.
Qemu simulate other hardware, such as Network, Disk, which will affect the performance of these devices, so he had a pass through the paravirtualized device virtio_blk, virtio_net, improve equipment performance.
One openstack study notes: The Basics
(4) libvirt
A) the concept of
the virtual cloud to achieve the Rings: The virtualization technology -> Virtual Machine Management -> Cluster Resource Management (cloud management). Various virtualization technologies provide essential management tool. For example, activate, deactivate, configuration, connected consoles. Thus there are two problems when building cloud management:
((1)) if mixed virtual technology, top management needs to call different tools for different virtualization technologies, it is troublesome.
((2)) virtualization technology development is very rapid, system virtualization and virtual containers are in the development and evolution. There may be new virtualization technology is more in line with the current scenario, need to migrate past. Such management platform will need substantial changes.
In order to adapt to the changes, the means at our usual hierarchical, making it transparent to each other, an abstract set of management in the virtual machine and cloud management. libvirt is to play this role. libvirt offers a variety of API, for the upper to manage different virtual machines.
Libvirt is to manage virtual machines and other virtualization features, such as storage management, network management software collection. It includes an API library, a daemon (the libvirtd) and a command-line tool (virsh); libvirt itself is built on a conceptual abstract. It implements common functions of a supported hypervisor provides a common API.
libvirt main objective is to provide a convenient, reliable programming interfaces for a variety of virtualization tools, management of virtualization provides a variety of different ways in a single way.
b) function
VM management: including the life cycle of different operations, such as: start, stop, pause, save, restore, and migration. Support for multiple device types of hot-plug operation, including: disk, network cards, memory, and CPU.
Support remote machine: just run the libvirt daemon, including the remote machine on the machine, all the functions on libvirt can access and use. Support multiple network remote transmission, the easiest to use SSH, no additional configuration.
Storage Management: Any host running the libvirt daemon can be used to manage different types of storage: create mirrored file in different formats (qcow2, vmdk, raw, etc.), mount the NFS share, list the existing LVM volume group, create a new LVM volume group and a logical volume of untreated disk device partition, iSCSI mount sharing, and so on and so forth. Because libvirt can work remotely, all of which can be used by the remote host.
Network Management Interface: libvirt daemon running any host can be used to manage physical and logical network interface.
NAT-based routing and virtual networks: Any host running the libvirt daemon can be used to create and manage virtual networks.
c) architecture
does not use a virtual machine manager libvirt embodiment shown in FIG:
One openstack study notes: The Basics
To support various hypervisor scalability, libvirt implement an architecture-drivers, the architecture allows for a large number of potential common API hypervisor to provide services in a generic fashion. The following figure shows the hierarchy with libvirt API and associated drivers. There is also need to pay attention, libvirtd provide access to the local from the remote application.
One openstack study notes: The Basics
irt controlled in two ways:
((1)) and the domain management application on the same node. Libvirt management applications by working to control this area.
One openstack study notes: The Basics
(((2)) management applications and domains located on different nodes. This mode uses a run on a remote node, a special daemon called libvirtd The program will start automatically when libvirt is installed on the new node, and automatically determines and local hypervisor. the connection management application from the local to the remote libvirt libvirtd through a common protocol installs the driver.
One openstack study notes: The Basics
the relationship between 5) openstack, kvm, qemu- kvm libvirt and
the KVM is the most the underlying hypervisor, which is used to simulate the operation of the CPU, it lacks support for the network and peripheral I / O, so we can not use it directly. QEMU-KVM is a complete simulator, which is built on top of KVM, it provides a complete network and I / O support. Openstack does not directly control qemu-kvm, it will use a called libvirt library to indirect control qemu-kvm. libvirt provides cross-platform VM function, it can control the simulator in addition to QEMU, including vmware, virtualbox, xen, and so on. So in order to openstack of cross-VM, so openstack it will only be used directly without libvirt qemu-kvm. libvirt also provides some advanced features, such as pool / vol management.
6) openstack architecture
One openstack study notes: The Basics
Dashboard
Horizon
--- openstack for managing various services, web-based management interface
--- graphical user interface implementation creates, network management, and other operations by the instance of starting
Networking
Neutron
. 1), A software given network service, internet access services, such as OpenStack compute. User-defined API to provide network and use, plug-in-based architecture, which supports numerous network providers and technology.
--- used to create the network, subnets, routers, managed floating ip address
--- can achieve a virtual switch, a virtual router
--- managing OpenStack environment for all virtual network infrastructure (VNI), the physical network infrastructure (PNI) access layer.
neutron architecture:
One openstack study notes: The Basics
(1) located at the top of Neutron Server acts as a martial art in the "head" role (RESTful Server), responsible for receiving requests from an external API sects (project), such as Nova API request to create a network.
(2) an intermediate layer of Neutron plugin acts as a martial art in the "messenger" role, responsible for communicating the highest level instructions to the people below.
(3) located in the lower Neutron Agent acts as a martial art of "work" role, responsible for the implementation of specific tasks and operations.
2), Neutron respectively provided Layer (L2) vSwitch switching and Layer (L3) Router abstract routing function, corresponds to a physical network environment implemented switches and routers. Concrete realization of the following functions:
(1) Router: for tenants to provide routing, NAT and other services.
(2) Network: corresponds to a real physical network Layer 2 LAN (the VLAN), from the perspective of the tenant, the tenant is private.
(3) Subnet: the concept of a three-layer network, or a specified period of IPV4 and IPV6 address described in the relevant configuration information. It is attached to a Layer Network, belong to the specified IP address range of the virtual network machine may be used.
Storage
Object Swift the Storage ---
--- through a RESTful, HTTP-based application programming interface and stores the retrieved objects of any unstructured data.
--- It has high fault tolerance, based on data replication and scalable architecture.
--- Swift's aim is to use commodity hardware to build a redundant, scalable, distributed object storage cluster, storage capacity of up to PB level.
--- Swift is not a file system or real-time data storage system, which is object storage for long-term storage of permanent type of static data, these data can be retrieved, adjusted, if necessary, updated. Examples of the type of data storage is the most suitable for virtual machine images, photo storage, email storage and archiving backup.
--- Swift without using RAID (redundant array of disks), there is no central master unit or node. Swift at the software level by introducing consistent hashing technology and data redundancy, sacrifice a degree of data consistency to achieve high availability (High Availability, referred to as HA) and scalability to support multi-tenant model, containers and objects to read and write operation, for unstructured data storage problem solving Internet application scenarios.

Block Storage --- Cinder
persistent storage block provided to run instances. It pluggable drive architecture helps to create and manage block storage device.
1) understanding Block Storage, operating system obtains storage space, there are two general ways:
(1) a bare hard drive attached via a protocol (SAS, SCSI, SAN, iSCSI, etc.), then partition, format, create a file system ; or directly using raw data stored in a hard disk (database)
(2) via NFS, CIFS protocol, etc., mount a remote file system of
a first embodiment of the hard disk is called a bare block storage (memory block), also commonly referred to each of the bare hard Volume (volume).
The second is called the file system storage. NAS and NFS server, and a variety of distributed file storage system provides all this.
2), Block Storage Servicet provides management of volume from creation to delete the entire life cycle. From the point of view instance, mount each Volume is a hard drive. OpenStack Block Storage Service is provided Cinder, specific functions are:
(1) provide a REST API enables users to query and manage volume, volume snapshot, and volume type.
(2) provide scheduler scheduling request to create a volume, optimize allocation of storage resources.
(3) support a variety of back-end (back-end) storage by driver architecture, including LVM, NFS, Ceph and others, such as EMC, IBM and other commercial storage products and solutions.
Shared Services
Identity service - Keystone
--- centralized identity management services for unified authentication between the components to provide authentication and authorization
--- provides a centralized directory service
--- supports multiple authentication modes, such as password authentication, token authentication, that is to AWS (Amazon web services) login
--- providing SSO user authentication services and other services for the
Image service - the Glance
--- storage and retrieval virtual machine disk image, OpenStack calculation will use this service when an instance deployment.
--- user to run directly copy storage server images
--- these images can be used to create a new virtual machine template
Telemetry - Ceilometer
provide monitoring and metering for the OpenStack cloud accounting purposes, benchmarks, scalability and statistics.
High-level service
Orchestration - Heat
Orchestration Services supports a variety of integrated cloud applications, by calling OpenStack-native REST API and CloudFormation-compatible Query API, support: term: HOT <Heat Orchestration Template (HOT)>format template or AWS CloudFormation format template
Compute
Nova
--- in OpenStack examples computing environment lifecycle management.
--- comprises generating in response to demand, scheduling, and other operations recovered virtual machine.
--- for service virtual machine on the node
--- Nova is a distributed service
--- Nova is designed to scale horizontally on standard hardware
Nova Openstak architecture at the center, to provide support for the other components Nova:
--- for the VM image to provide the Glance
--- Cinder Swift and VM, respectively, and provide block storage object stores
--- VM Neutron to provide network connectivity
nova compute by libvirt management kvm, compute nodes is a real place to run a virtual machine

One openstack study notes: The Basics

Guess you like

Origin blog.51cto.com/8355320/2480556
Recommended