Virtualization2.0 简明教程
Virtualization 2.0 - Openstack
在本章中,我们将讨论 Openstack 及其在虚拟化中的作用。
In this chapter, we will discuss regarding Openstack and its role in Virtualization.
Understanding Openstack
OpenStack 是一款软件,用于构建和管理公有云和私有云的云计算平台。OpenStack 拥有一个最大的社区。它由 OpenStack Foundation 管理,这是一个非营利性组织,它负责监督开发和社区建设。它的官方网页是 – https://www.openstack.org/ 。
OpenStack is a software for building and managing cloud-computing platforms for public and private clouds. Openstack has one of the biggest communities. It is managed by the OpenStack Foundation, a non-profit organization that oversees both development and community building. Its official webpage is – https://www.openstack.org/.
OpenStack 用于部署虚拟机和其他用于管理云环境的不同任务的实例。OpenStack 被认为是 - 基础设施即服务 (IaaS)。基于 Openstack,请查看以下原理图,它说明了它是如何进行管理的。
OpenStack is used to deploy virtual machines and other instances that handle different tasks for managing a cloud environment. OpenStack is considered as – Infrastructure as a Service (IaaS). Based on Openstack, please see the following schematic illustration, which describes how it is managed.
Source - https://www.openstack.org/
Source − https://www.openstack.org/

Openstack 平台由 Web UI 仪表板进行管理。它包含九个核心关键组件。
Openstack platform is managed by a web UI dashboard. It comprises of nine Core key components.

以下是对这些核心概念的详细描述:
These key concepts are described in detail as follows −
-
Nova is a computing engine. It is used for deploying and managing large numbers of virtual machines.
-
Swift is a storage system for objects and files.
-
Cinder is a block storage component. It accesses specific locations on a disk drive.
-
Neutron provides the networking capability.
-
Horizon is the dashboard of Openstack. It is the only graphical interface (WEB UI).
-
Keystone provides identity services. It is essentially a central list of all the users.
-
Glance provides image services to OpenStack. In this case, "images" refers to images (or virtual copies) of hard disks.
-
Ceilometer provides telemetry services, which allow the cloud to provide billing services to individual users of the cloud.
-
Heat allows developers to store the requirements of a cloud application in a file that defines what resources are necessary for that application.
下图解释了 Openstack 的发布版本。
The release versions of Openstack are explained in the following illustration.

Installing Openstack
由于 Openstack 是一个开源平台,因此可以通过不同的软件发行版来安装和部署它。它们各自为云操作系统增加了自己的价值。
As Openstack is an open source platform, there are many ways to install and deploy it through different software distributions. Each one of them adds their own value to the cloud operating system.
对于想使用 Openstack 的新系统管理员,可以获得预先安装的 Openstack 平台 ISO 映像。它们可以从以下链接下载 https://docs.openstack.org/image-guide/obtain-images.html
For a new system administrator, who wants to play with Openstack will get pre-installed ISO images of the Openstack platform. They can be downloaded from the following link https://docs.openstack.org/image-guide/obtain-images.html

要手动安装,主要发行版包括:
To install them manually, the main distributors are −
我们必须了解 Openstack 适用于企业环境,并且要安装它,我们应该具备下列硬件要求。
We must understand that Openstack is for enterprise environment and to install it we should have the following hardware requirements.
Installation Requirements
Openstack 的安装要求如下:
The installation requirements for Openstack are as follows −
-
A minimum of 5 machines with the following roles − 1 machine for the MAAS server. 1 machine for the Autopilot. 3 or more machines for the cloud − At least one must have 2 NICs. At least 3 must have 2 disks.
-
A dedicated switch to create a private cloud LAN.
-
Internet access through a router on that LAN.
对于此实验室,我们有一个虚拟机,我们将安装 Devstack 。它设计用于安装在单个笔记本电脑、个人电脑或虚拟机上。它包括用于开发评估的原始上游代码。它受以下支持:
For this laboratory, we have a virtual machine and we will install Devstack. It is designed for installation on a single laptop, PC or VM. It includes the raw upstream code for development evaluation. It is supported on −
-
Ubuntu 14.04/16.04
-
Fedora 23/24
-
CentOS/RHEL 7
-
Debian and
-
OpenSUSE
The link for this version is – https://docs.openstack.org/devstack/latest/#install-linux
Installing Openstack on Ubuntu 14.04
要在 Ubuntu 14.04 上安装 Openstack,我们应遵循以下给定的步骤。
For installing Openstack on Ubuntu 14.04, we should follow the steps given below.
Step 1 — 从以下链接下载安装脚本 - https://git.openstack.org/cgit/openstack-dev/devstack
Step 1 − Download the installation script from the following link - https://git.openstack.org/cgit/openstack-dev/devstack
使用此命令 – git clone [role="bare"]https://git.openstack.org/openstack-dev/devstack
Use this command – git clone [role="bare"]https://git.openstack.org/openstack-dev/devstack


Step 2 — 通过键入以下命令浏览 Devstack 文件夹 – $ cddevstack 。
Step 2 − Browse the folder Devstack by keying in the following command – $ cddevstack.

Step 3 — 使用以下命令执行文件 stack.sh ,安装过程将继续,如下所示:
Step 3 − Execute the file stack.sh with the following command ./stack.sh and installation process will continue as shown below −

Step 4 — 输入您的密码。
Step 4 − Enter your password.

Step 5 — 现在完成安装过程大约需要 15-20 分钟,它将在期间下载并安装所有库。
Step 5 − Now it will take about 15-20 minutes to finish the installation process, while it downloads and installs all the libraries.

Step 6 — 在安装结束时,我们将看到主机的 IP、用于管理它的 URL、用户名和用于管理它的密码。
Step 6 − At the end of the installation, we will see the IP of the host, URL for managing it, username and password to administrate it.

Step 7 — 要登录,您必须在浏览器中输入:主机 IP、用户名和我们在安装期间输入的密码。
Step 7 − To sign in, you have to type in the browser: Host IP, username and password that we entered during the installation.

Step 8 — 在主仪表盘中,您将看到“实例”概述。
Step 8 − In the main dashboard, you will see “Instances” overview.

Step 9 — 要创建新实例或简单地说创建虚拟机,请单击“实例”。
Step 9 − To create new instances or in simple words to create Virtual machines click on “Instances”.

Step 10 — 单击“启动实例”。
Step 10 − Click on “Launch Instances”.

Step 11 — 填写所有字段,如下所示。
Step 11 − Fill in all the fields as shown below.

Step 12 − 我们将看到创建的实例,如下图所示。
Step 12 − We will see the instance created as shown in the following screenshot.
