Quick Start
## Install Linux
Start with a clean and minimal install of a Linux system. Devstack attempts to support the two latest LTS releases of Ubuntu, the latest/current Fedora version, CentOS/RHEL 7, as well as Debian and OpenSUSE.
If you do not have a preference, Ubuntu 16.04 is the most tested, and will probably go the smoothest.
Add Stack User
Devstack should be run as a non-root user with sudo enabled (standard logins to cloud images such as “ubuntu” or “cloud-user” are usually fine).
You can quickly create a separate stack user to run DevStack with
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
useradd (http://www.runoob.com/linux/linux-comm-useradd.html)
-c<备注> 加上备注文字。备注文字会保存在passwd的备注栏位中。
-d<登入目录> 指定用户登入时的启始目录。
-D 变更预设值.
-e<有效期限> 指定帐号的有效期限。
-f<缓冲天数> 指定在密码过期后多少天即关闭该帐号。
-g<群组> 指定用户所属的群组。
-G<群组> 指定用户所属的附加群组。
-m 自动建立用户的登入目录。
-M 不要自动建立用户的登入目录。
-n 取消建立以用户名称为名的群组.
-r 建立系统帐号。
-s<shell> 指定用户登入后所使用的shell。
-u<uid> 指定用户ID。
Diff bwt useradd and adduser (https://blog.youkuaiyun.com/Pinto_ShadowKnight/article/details/84579832)
Since this user will be making many changes to your system, it should have sudo privileges:
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
$ sudo su - stack
Download DevStack
$ git clone https://git.openstack.org/openstack-dev/devstack
$ cd devstack
The devstack repo contains a script that installs OpenStack and templates for configuration files
Create a local.conf
Create a local.conf file with 4 passwords preset at the root of the devstack git repo.
[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
This is the minimum required config to get started with DevStack.
Start the install
./stack.sh
This will take a 15 - 20 minutes, largely depending on the speed of your internet connection. Many git trees and packages will be installed during this process.
## Profit!
You now have a working DevStack! Congrats!
Your devstack will have installed keystone, glance, nova, cinder, neutron, and horizon. Floating IPs will be available, guests have access to the external world.
You can access horizon to experience the web interface to OpenStack, and manage vms, networks, volumes, and images from there.
You can source openrc in your shell, and then use the openstack command line tool to manage your devstack.
You can cd /opt/stack/tempest and run tempest tests that have been configured to work with your devstack.
You can make code changes to OpenStack and validate them.
Going further
Learn more about our configuration system to customize devstack for your needs. Including making adjustments to the default networking.
Read guides for specific setups people have (note: guides are point in time contributions, and may not always be kept up to date to the latest devstack).
Enable devstack plugins to support additional services, features, and configuration not present in base devstack.
Use devstack in your CI with Ansible roles and Jobs for Zuul V3. Migrate your devstack Zuul V2 jobs to Zuul V3 with this full migration how-to.
Get the big picture of what we are trying to do with devstack, and help us by contributing to the project.
Linked from https://docs.openstack.org/devstack/latest/