0% found this document useful (0 votes)
50 views8 pages

OpenStack Victoria Lesson 2

This document outlines steps to install OpenStack using DevStack on Ubuntu. It includes: 1. Downloading and configuring DevStack from the stable/victoria branch 2. Creating a user and configuring permissions for running DevStack 3. Running DevStack which installs and configures OpenStack components and provides access and login credentials on completion.

Uploaded by

Cá Xấu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views8 pages

OpenStack Victoria Lesson 2

This document outlines steps to install OpenStack using DevStack on Ubuntu. It includes: 1. Downloading and configuring DevStack from the stable/victoria branch 2. Creating a user and configuring permissions for running DevStack 3. Running DevStack which installs and configures OpenStack components and provides access and login credentials on completion.

Uploaded by

Cá Xấu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

12/9/2020

Outline
1. What is Cloud computing & OpenStack

2. LAB1: Install OpenStack with DevStack

3. Project Keystone

4. Project Glance

5. LAB2: Install manual OpenStack (1)

6. Project Nova & Placement

7. Project Neutron (1)

8. Project Neutron (2)

9. LAB3: Install manual OpenStack (2)

10. Project Cinder

11. Project Horizon

12. LAB4: Install manual OpenStack (3)

35 © Copyright 2020 ITFORVN.


35

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

1. Cài đặt được một máy chủ OpenStack all-in-one

37 © Copyright 2020 ITFORVN.


37

37

https://pt.slideshare.net/haribabukasturi/topologies-of-openstack/2

38 © Copyright 2020 ITFORVN.


38

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 © Copyright 2020 ITFORVN.


39

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

iface ens160 inet static

address 172.20.0.10

netmask 255.255.255.0

gateway 172.20.0.1

dns-nameservers 1.1.1.1 8.8.8.8

EOF
https://github.com/TrongTan124/ghi-chep-devstack/blob/master/su-dung-devstack-ubuntu-20.04-victoria.md

40 © Copyright 2020 ITFORVN.


40

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

$ echo "nameserver 8.8.8.8" >> /etc/resolv.conf


5. Gỡ bỏ netplan:
$ echo "nameserver 1.1.1.1" >> /etc/resolvconf/resolv.conf.d/head
$ systemctl stop networkd-dispatcher
$ echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/head
$ systemctl disable networkd-dispatcher
$ service resolvconf restart
$ systemctl mask networkd-dispatcher

$ apt purge nplan netplan.io -y


7. Khởi động lại máy chủ trước khi cài đặt OpenStack:

$ init 6

https://github.com/TrongTan124/ghi-chep-devstack/blob/master/su-dung-devstack-ubuntu-20.04-victoria.md

41 © Copyright 2020 ITFORVN.


41

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

12. Thực hiện cài đặt:

$ byobu

$ ./stack.sh

https://github.com/TrongTan124/ghi-chep-devstack/blob/master/su-dung-devstack-ubuntu-20.04-victoria.md

42 © Copyright 2020 ITFORVN.


42

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”:

$ echo 'source /opt/stack/devstack/openrc admin admin' >> /opt/stack/.bashrc

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 © Copyright 2020 ITFORVN.


44

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

# Neutron ML2 with OpenVSwitch

Q_PLUGIN=ml2

Q_AGENT=openvswitch

45 © Copyright 2020 ITFORVN.


45

45

Install OpenStack
Horizon

46 © Copyright 2020 ITFORVN.


46

46

6
12/9/2020

Install OpenStack
Step-by-step
Tạo máy ảo trên giao diện Horizon:

1. Đăng nhập: http://172.20.0.10/dashboard

2. Chuyển project admin

3. Tạo Instance

4. Thiết lập security group

47 © Copyright 2020 ITFORVN.


47

47

Tổng kết

• Devstack
• Install OpenStack with DevStack

48 © Copyright 2020 ITFORVN.


48

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

 Chụp ảnh màn hình:

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 © Copyright 2020 ITFORVN.


49

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.

Copyright © for the entire content of this presentation: ITFORVN.


50 © Copyright 2020 ITFORVN.
50

50

You might also like