[OpenStack] 透過 DevStack 在 AWS EC2 Linux 上安裝 OpenStack

  1. Create a stack user
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
$ echo “stack ALL=(ALL) NOPASSWD: ALL” | sudo tee /etc/sudoers.d/stack
$ sudo su — stack

3. Download DevStack

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

4. create a local.conf in project

cd devstack
vim local.conf



5. start the install: ./stack.sh. This will take a 15–20 mins. Once the installation done, all is done.

DevStack Component Timing
(times are in seconds)
run_process 15
test_with_retry 2
apt-get-update 12
pip_install 287
osc 112
wait_for_service 15
git_timed 193
dbsync 23
apt-get 265
— — — — — — — — — — — — -
Unaccounted time 341
Total runtime 1265
This is your host IP address:
This is your host IPv6 address: ::1
Horizon is now available at
Keystone is serving at
The default users are: admin and demo
The password: secret
Using lib/neutron-legacy is deprecated, and it will be removed in the future
Services are running under systemd unit files.
For more information see:
DevStack Version: queens
Change: 28b4be186105888b72300d27166deb771857df06 Merge “Make stackenv file visible” 2018–01–03 23:19:46 +0000
OS Version: Ubuntu 16.04 xenial
2018–01–08 05:30:33.155 | stack.sh completed in 1265 seconds.


- DevStack 已經安裝好 keystone, glance, nova, cinder, neutron, 和 horizon,可以試著輸入指令看看
- Floating IPs will be available, guests have access to the external world.
- 可以試著存取 Web Interface horizon (URL 在最後的安裝訊息中)
- `source devstack/openrc 後會多了一個 openstack 指令來管理 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.

Note for Using AWS EC2 Ubuntu 16.04

因為 EC2 是在 AWS VPC 中所建立的 VM,所以預設認知到的網卡也是區網內的 private IP,因此上面所匹配的 IP Address 173.x.x.x 是 private IP,只需要替換成這個 instance 的 Public IP 就可以成功連線到 dashboard portal 了



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store