目錄
資源列表
基礎環境
安裝packstack
安裝OpenStack
本文記錄了基于CentOS操作系統使用packstack快速部署openstack。
資源列表
操作系統 | 配置 | 磁盤 | IP | 數量 |
---|---|---|---|---|
CentOS7.9 | 4C8G | 50G | 192.168.207.155 | 1 |
基礎環境
-
服務器開啟虛擬化,我這里使用的是VMware虛擬機,所以勾選?????虛擬化Intel VT-x/EPT或AMD-V/RVI(V)
-
關閉防火墻
systemctl stop firewalld
systemctl disable firewalld
-
關閉內核安全機制
sed -i "s/.*SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
-
修改IP為靜態IP,若已經是靜態IP可以跳過
nmcli con mod ens33 ipv4.method static ipv4.address 192.168.207.155/24 ipv4.gateway 192.168.207.2 ipv4.dns 192.168.207.2
-
修改主機名
# 注意這里修改的主機名不能有下劃線
hostnamectl set-hostname openstack
-
關閉NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
-
添加hosts
echo "192.168.207.155 openstack" >> /etc/hosts
-
重啟服務器
reboot
安裝packstack
# 更新軟件包
yum -y update
# 安裝train版本包
yum -y install centos-release-openstack-train
# 安裝packstack
yum -y install openstack-packstack
安裝OpenStack
# 該過程耗時較長,約30分鐘左右
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-20200221-143136.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.207.131. To use the command line tools you need to source the file.
- To access the OpenStack Dashboard browse to http://192.168.207.131/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/20200221-143136-tbr4ug/openstack-setup.log
- The generated manifests are available at: /var/tmp/packstack/20200221-143136-tbr4ug/manifests
?
# 查看keystonerc_admin文件獲取賬號密碼(通常在用戶的家目錄)
# 以此為例用戶就是admin,密碼則是4dc0395edf0a4fe7
[root@openstack ~]# cat /root/keystonerc_admin
unset OS_SERVICE_TOKENexport OS_USERNAME=adminexport OS_PASSWORD='4dc0395edf0a4fe7'export OS_REGION_NAME=RegionOneexport OS_AUTH_URL=http://192.168.247.3:5000/v3export PS1='[\u@\h \W(keystone_admin)]\$ 'export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
如果有問題的可以使用該命令指定應答文件再次執行
packstack --answer-file=[應答文件]
在安裝完openstack以后會有一個br-ex網卡這個是臨時的需要寫個配置文件
[root@openstack ]# ifconfig br-ex
br-ex: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 172.24.4.1 netmask 255.255.255.0 broadcast 0.0.0.0inet6 fe80::5cde:dcff:fe75:fb43 prefixlen 64 scopeid 0x20<link>ether 5e:de:dc:75:fb:43 txqueuelen 1000 (Ethernet)RX packets 15 bytes 420 (420.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 8 bytes 648 (648.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0[root@openstack network-scripts]# cat ifcfg-br-ex
TYPE=Ethernet
BOOTPROTO=none
NAME=br-ex
DEVICE=br-ex
ONBOOT=yes
IPADDR=172.24.4.1
PREFIX=24
查看openstack相關服務
yum -y install openstack-utils
openstack-service --help
openstack-service list
openstack-service restart openstack-swift-proxy