OpenStack 一鍵部署體驗
- 環境配置
- 1、配置靜態地址、主機名
- 在/etc/resolv.conf中添加
- 重啟網卡
- 2、關閉(設定開機不啟動)防火墻、核心防護、NetworkManager
- 3、安裝時間同步服務
- 4、配置yum源
- 5、重啟、查看服務狀態
- 6、下載OpenStack 管理工具包、在線部署OpenStack
- 創建br-ex網卡組態檔
- 7、查看用戶資訊
- 8、網頁登陸
- 上傳鏡像
- 環境需求
| 系統 | CentOS 7.6 |
|---|---|
| CPU: | 雙核雙執行緒/開啟虛擬化功能 |
| 記憶體 | 4G |
| 硬碟 | 30G+300G |
| 網卡 | NAT模式 |
| 選做 | net.ifnames=0 biosdevname=0 (創建時可修改為eth0網卡) |
- 這步是為了將網卡變為eth0

環境配置
1、配置靜態地址、主機名
BOOTPROTO=static
IPADDR=192.168.199.88
NETMASK=255.255.255.0
GATEWAY=192.168.199.2

在/etc/resolv.conf中添加
nameserver 8.8.8.8

重啟網卡
systemctl restart network

2、關閉(設定開機不啟動)防火墻、核心防護、NetworkManager
systemctl stop firewalld
systemctl disable firewalld
systemctl stop NetworkManager
setenforce 0

3、安裝時間同步服務
- 同步阿里云時鐘服務器(ntp1、ntp2…)、設定周期性任務及設定開機自啟
yum install -y ntpdate
ntpdate ntp.aliyun.com >>/var/log/ntpdate.log
crontab -e
*/30 * * * * /usr/sbin/ntpdate ntp.aliyun.com
4、配置yum源
[root@muzi ~]# cd /etc/yum.repos.d/
[root@muzi yum.repos.d]# mkdir bak
[root@muzi yum.repos.d]# mv C* bak/
[root@muzi yum.repos.d]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@muzi yum.repos.d]# yum -y install centos-release-openstack-train
[root@muzi yum.repos.d]# yum clean all
[root@muzi yum.repos.d]# yum makecache (fast) #()部分可選擇添加
5、重啟、查看服務狀態
reboot
6、下載OpenStack 管理工具包、在線部署OpenStack
yum -y install openstack-packstack
packstack --allinone
Installation completed successfully


Additional information:
* Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
* A new answerfile was created in: /root/packstack-answers-20201018-191715.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.226.150. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.226.150/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20201018-191715-BH2Wcy/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20201018-191715-BH2Wcy/manifests

創建br-ex網卡組態檔
cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-br-ex
sed -i "100d" ifcfg-br-ex
cat <<EOF >> ifcfg-br-ex
TYPE=Ethernet
BOOTPROTO=none
NAME=br-ex
DEVICE=br-ex
ONBOOT=yes
IPADDR=172.24.4.1
PREFIX=24
EOF
systemctl restart network
#ifconfig 查看



7、查看用戶資訊
- 可以用這個查詢自己的賬號和密碼
cd /root && cat keystonerc_admin

8、網頁登陸
- 賬戶和密碼都在上面都有查找方式,輸入就好了


上傳鏡像
兩種方式,我這里就先只使用命令列的方式來進行一次操作,
命令列
source keystonerc_admin
openstack image create "muzi" --file CentOS-7-x86_64-DVD-1810-7.6.iso --disk-format qcow2 --container-format bare --public
- 在原本的openstack中只有一個鏡像

- 將鏡像傳入到該機器中


- 重繪一次就會發現增加了一個鏡像

轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/266758.html
標籤:其他
上一篇:Linux基礎回顧
下一篇:go語言學習—go語言原始碼檔案
