博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何使用DevStack在Ubuntu 18.04上安装OpenStack
阅读量:2531 次
发布时间:2019-05-11

本文共 5196 字,大约阅读时间需要 17 分钟。

is a free and opensource IaaS cloud platform that handles cloud compute, storage and network resources. It comes with an intuitive dashboard that enables systems administrators to provide and monitor these resources.

是一个免费的开源IaaS云平台,可处理云计算,存储和网络资源。 它带有直观的仪表板,使系统管理员可以提供和监视这些资源。

You can seamlessly install OpenStack locally on your Ubuntu 18.04 instance for learning and testing purposes using Devstack.

您可以在Ubuntu 18.04实例上本地无缝安装OpenStack,以使用Devstack进行学习和测试。

Devstack is a set of extensible scripts that facilitate OpenStack deployment. In this guide, you will learn how to deploy OpenStack on Ubuntu 18.04 with devstack.

Devstack是一组有助于OpenStack部署的可扩展脚本。 在本指南中,您将学习如何使用devstack在Ubuntu 18.04上部署OpenStack。

最低要求 (Minimum Requirements)

Before we begin, ensure you have the following minimum prerequisites

在我们开始之前,请确保您具有以下最低先决条件

  1. A fresh Ubuntu 18.04 installation

    全新的Ubuntu 18.04安装
  2. User with sudo privileges

    具有sudo特权的用户
  3. 4 GB RAM

    4 GB内存
  4. 2 vCPUs

    2个vCPU
  5. Hard disk capacity of 10 GB

    硬盘容量10 GB
  6. Internet connection

    网络连接

With the minimum requirements satisfied, we can now proceed.

在满足最低要求的情况下,我们现在可以继续进行。

步骤1:更新和升级系统 (Step 1: Update and Upgrade the System)

To start off, log into your Ubuntu 18.04 system using SSH protocol and update & upgrade system repositories using the following command.

首先,使用SSH协议登录到Ubuntu 18.04系统,并使用以下命令更新和升级系统存储库。

apt update -y && apt upgrade -y

Sample Output

样本输出

Next reboot the system using the command.

接下来,使用命令重新引导系统。

sudo reboot

OR

要么

init 6

步骤2:创建Stack用户并分配sudo权限 (Step 2: Create Stack user and assign sudo priviledge)

Best practice demands that devstack should be run as a regular user with privileges.

最佳实践要求devstack应该以具有特权的普通用户身份运行。

With that in mind, we are going to add a new user called “stack” and assign sudo privileges.

考虑到这一点,我们将添加一个名为“ stack”的新用户并分配sudo特权。

To create stack user execute

创建堆栈用户执行

sudo adduser -s /bin/bash -d /opt/stack -m stack

Next, run the command below to assign sudo privileges to the user

接下来,运行以下命令为用户分配sudo特权

echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack

Sample Output

样本输出

步骤3:安装git并下载DevStack (Step 3: Install git and download DevStack)

Once you have successfully created the user ‘stack’ and assigned sudo privileges, switch to the user using the command.

成功创建用户“堆栈”并分配sudo特权后,请使用以下命令切换到该用户。

su - stack

In most Ubuntu 18.04 systems, git comes already installed. If by any chance git is missing, install it by running the following command.

在大多数Ubuntu 18.04系统中,已经安装了git。 如果git丢失,请通过运行以下命令进行安装。

sudo apt install git -y

Sample output

样品输出

Using git, clone devstack’s git repository as shown.

如图所示,使用git克隆devstack的git仓库。

git clone https://git.openstack.org/openstack-dev/devstack

Sample output

样品输出

步骤4:创建devstack配置文件 (Step 4: Create devstack configuration file)

In this step, navigate to the devstack directory.

在此步骤中,导航到devstack目录。

cd devstack

Then create a local.conf configuration file.

然后创建一个local.conf配置文件。

vim local.conf

Paste the following content

粘贴以下内容

[[local|localrc]]# Password for KeyStone, Database, RabbitMQ and ServiceADMIN_PASSWORD=StrongAdminSecretDATABASE_PASSWORD=$ADMIN_PASSWORDRABBIT_PASSWORD=$ADMIN_PASSWORDSERVICE_PASSWORD=$ADMIN_PASSWORD# Host IP - get your Server/VM IP address from ip addr commandHOST_IP=10.208.0.10

Save and exit the text editor.

保存并退出文本编辑器。

NOTE:

注意:

  1. The ADMIN_PASSWORD is the password that you will use to log in to the OpenStack login page. The default username is admin.

    ADMIN_PASSWORD是用于登录OpenStack登录页面的密码。 默认用户名是admin
  2. The HOST_IP is your system’s IP address that is obtained by running ifconfig or ip addr commands.

    HOST_IP是通过运行ifconfigip addr命令获得的系统IP地址。

步骤5:使用Devstack安装OpenStack (Step 5: Install OpenStack with Devstack)

To commence the installation of OpenStack on Ubuntu 18.04, run the script below contained in devstack directory.

要在Ubuntu 18.04上开始安装OpenStack,请运行devstack目录中包含的以下脚本。

./stack.sh

The following features will be installed:

将安装以下功能:

  • Horizon – OpenStack Dashboard

    Horizo​​n – OpenStack仪表板
  • Nova – Compute Service

    Nova –计算服务
  • Glance – Image Service

    概览–图片服务
  • Neutron – Network Service

    中子–网络服务
  • Keystone – Identity Service

    Keystone –身份服务
  • Cinder – Block Storage Service

    煤渣–块存储服务
  • Placement – Placement API

    展示位置–展示位置API

The deployment takes about 10 to 15 minutes depending on the speed of your system and internet connection. In our case, it took roughly 12 minutes.

部署大约需要10到15分钟,具体取决于您的系统和Internet连接的速度。 在我们的案例中,大约花费了12分钟。

At the very end, you should see output similar to what we have below.

最后,您应该看到类似于下面的输出。

This confirms that all went well and that we can proceed to access OpenStack via a web browser.

这确认一切正常,我们可以继续通过网络浏览器访问OpenStack。

步骤6:在网络浏览器上访问OpenStack (Step 6: Accessing OpenStack on a web browser)

To access OpenStack via a web browser browse your Ubuntu’s IP address as shown.

要通过Web浏览器访问OpenStack,请如图所示浏览Ubuntu的IP地址。

https://server-ip/dashboard

https://server-ip/dashboard

This directs you to a login page as shown.

如图所示,这会将您定向到登录页面。

Enter the credentials and hit “Sign In

输入凭据,然后点击“ 登录

You should be able to see the Management console dashboard as shown below.

您应该能够看到管理控制台仪表板,如下所示。

For more on Devstack’s customization, check out their .

有关Devstack定制的更多信息,请查看其 。

Additionally, check out the for administration guide.

此外,请查看《 管理指南》。

翻译自:

转载地址:http://fuqzd.baihongyu.com/

你可能感兴趣的文章
收藏其他博客园主写的代码,学习加自用。先表示感谢!!!
查看>>
H5 表单标签
查看>>
su 与 su - 区别
查看>>
C语言编程-9_4 字符统计
查看>>
在webconfig中写好连接后,在程序中如何调用?
查看>>
限制用户不能删除SharePoint列表中的条目(项目)
查看>>
【Linux网络编程】使用GDB调试程序
查看>>
feign调用spring clound eureka 注册中心服务
查看>>
ZT:Linux上安装JDK,最准确
查看>>
LimeJS指南3
查看>>
关于C++ const成员的一些细节
查看>>
《代码大全》学习摘要(五)软件构建中的设计(下)
查看>>
C#检测驱动是否安装的问题
查看>>
web-4. 装饰页面的图像
查看>>
微信测试账户
查看>>
Android ListView上拉获取下一页
查看>>
算法练习题
查看>>
学习使用Django一 安装虚拟环境
查看>>
Hibernate视频学习笔记(8)Lazy策略
查看>>
CSS3 结构性伪类选择器(1)
查看>>