本文共 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。
Before we begin, ensure you have the following minimum prerequisites
在我们开始之前,请确保您具有以下最低先决条件
With the minimum requirements satisfied, we can now proceed.
在满足最低要求的情况下,我们现在可以继续进行。
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
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
样本输出
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
样品输出
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:
注意:
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 。 HOST_IP
is your system’s IP address that is obtained by running ifconfig
or ip addr
commands. HOST_IP
是通过运行ifconfig
或ip addr
命令获得的系统IP地址。 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:
将安装以下功能:
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。
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/