OpenStack Victoria Lesson 2
OpenStack Victoria Lesson 2
Outline
1. What is Cloud computing & OpenStack
3. Project Keystone
4. Project Glance
35
Lesson 2
LAB1: Install OpenStack with DevStack
Trình bày: Nguyễn Trọng Tấn
36
1
12/9/2020
Mục tiêu
37
https://pt.slideshare.net/haribabukasturi/topologies-of-openstack/2
38
2
12/9/2020
Devstack
What is Devstack
DevStack is a series of extensible scripts used to quickly bring up a complete OpenStack
environment based on the latest versions of everything from git master. It is used interactively as a
development environment and as the basis for much of the OpenStack project’s functional testing
https://docs.openstack.org/devstack/latest/
39
Install OpenStack
Step-by-step
3. Cấu hình static IP:
Prepare:
$ cat << EOF > /etc/network/interfaces
1. Chắc chắn hệ điều hành đã được cập nhật mới
# loopback network interface
nhất
auto lo
$ apt update && apt dist-upgrade -y
iface lo inet loopback
2. Cài đặt ifupdown để thay thế cho netplan: # external network interface
$ apt install ifupdown -y auto ens160
address 172.20.0.10
netmask 255.255.255.0
gateway 172.20.0.1
EOF
https://github.com/TrongTan124/ghi-chep-devstack/blob/master/su-dung-devstack-ubuntu-20.04-victoria.md
40
3
12/9/2020
Install OpenStack
Step-by-step
6. Thiết lập DNS cho máy chủ:
4. Thiết lập IP vừa được cấu hình:
$ apt install resolvconf -y
$ ifdown --force ens160 lo && ifup -a
$ echo "nameserver 1.1.1.1" >> /etc/resolv.conf
$ init 6
https://github.com/TrongTan124/ghi-chep-devstack/blob/master/su-dung-devstack-ubuntu-20.04-victoria.md
41
Install OpenStack
Step-by-step
10. Tải bản Devstack với nhánh “Victoria”:
8. Tạo một username “stack” để chạy Dev
$ git clone https://git.openstack.org/openstack-
$ useradd -s /bin/bash -d /opt/stack -m stack
dev/devstack --branch stable/victoria
$ cd devstack
9. Cấu hình để “stack” chạy với quyền “root” mà không
11. Tải file chỉ dẫn thiết lập cấu hình khi cài đặt:
cần nhập password:
$ wget
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | tee
https://raw.githubusercontent.com/TrongTan124/ghi-chep-
/etc/sudoers.d/stack
devstack/master/Local_conf/local-stable-victoria.conf -O
$ su - stack
./local.conf
$ byobu
$ ./stack.sh
https://github.com/TrongTan124/ghi-chep-devstack/blob/master/su-dung-devstack-ubuntu-20.04-victoria.md
42
4
12/9/2020
Install OpenStack
Step-by-step
13. Kết quả sau khi hoàn thành cài đặt: This is your host IP address: 172.20.0.10
=========================
This is your host IPv6 address: ::1
DevStack Component Timing
(times are in seconds) Horizon is now available at http://172.20.0.10/dashboard
=========================
Keystone is serving at http://172.20.0.10/identity/
wait_for_service 18
pip_install 437 The default users are: admin and demo
apt-get 443 The password: secretadmin
run_process 48
dbsync 38
git_timed 625 Services are running under systemd unit files.
apt-get-update 8 For more information see:
test_with_retry 3
https://docs.openstack.org/devstack/latest/systemd.html
osc 241
-------------------------
Unaccounted time 414
DevStack Version: victoria
=========================
Total runtime 2275 Change: 7a0e578d19d269cfab15a6fe80b4717c0318e76e Workaround
for new pip 20.3 behavior 2020-11-30 23:06:46 +0000
OS Version: Ubuntu 20.04 focal
43 © Copyright 2020 ITFORVN.
43
43
Install OpenStack
Step-by-step
14. Thiết lập biến môi trường mặc định cho “stack”:
Lưu ý:
1. Không khởi động lại máy chủ sau khi cài đặt thành công
2. Máy chủ cài đặt Devstack là máy mới cài đặt xong hệ điều hành: Không có tiến trình Apache2, MySQL,.....
44
5
12/9/2020
Install OpenStack
Devstack’s local.conf
# Setup password
ADMIN_PASSWORD=secretadmin
DATABASE_PASSWORD=secretdatabase
RABBIT_PASSWORD=secretrabbit
SERVICE_PASSWORD=secretservice
SERVICE_TOKEN=111222333444
KEYSTONE_TOKEN_FORMAT=fernet
Q_PLUGIN=ml2
Q_AGENT=openvswitch
45
Install OpenStack
Horizon
46
6
12/9/2020
Install OpenStack
Step-by-step
Tạo máy ảo trên giao diện Horizon:
3. Tạo Instance
47
Tổng kết
• Devstack
• Install OpenStack with DevStack
48
7
12/9/2020
Bài tập
Thời gian làm bài: 40h
Hình thức nộp bài: Chụp ảnh màn hình lưu ra file pdf
Nộp bài qua: portal.itforvn.com
Bài tập:
Cài đặt OpenStack bằng Devstack theo hướng dẫn trong slide
1. Giao diện CLI: Kết quả cài đặt Devstack bằng dòng lệnh
2. Giao diện Horizon tại: Admin System System Information (Services tab)
49
Thank you
IMPORTANT NOTICE
The content of this presentation is strictly confidential. ITFORVN is the exclusive owner or licensee of the content, material, and information in this presentation.
Any reproduction, publication or reprint, in whole or in part, is strictly prohibited.
The information in this presentation may not be accurate, complete or up to date, and is provided without warranties or representations of any kind, either express or implied.
ITFORVN shall not be responsible for and disclaims any liability for any loss or damages, including without limitation, direct, indirect, incidental, consequential and special damages,
alleged to have been caused by or in connection with using and/or relying on the information contained in this presentation.
50