openstack-ussuri版本部署(环境centos8)

硬件条件
双网卡、4核、8G

步骤1)节点名称修改

[root@controller ~]# hostnamectl set-hostname "controller"
[root@controller ~]# exec bash
[root@controller ~]# cat /etc/sysconfig/network
/# Created by anaconda
HOSTNAME=controller
[root@controller ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.2.5.157 controller
[root@controller ~]# ping controller
PING controller (10.2.5.157) 56(84) bytes of data.
64 bytes from controller (10.2.5.157): icmp_seq=1 ttl=64 time=0.089 ms

步骤2)设置免密登陆

[root@controller ~]# ssh-keygen
[root@controller ~]# ssh-copy-id 10.2.5.157

步骤3)禁用NetworkManager并使用network-scripts配置网络并重启

Network-Manager是CentOS 8中用于管理网络的默认工具,但是对于Openstack,我们必须禁用它,因为Openstack网络无法与network-manager一起正常工作。为了替换NetworkManager,我们必须安装network-scripts。

[root@controller ~]# yum install -y network-scripts
[root@controller ~]# systemctl disable NetworkManager
[root@controller ~]# systemctl stop NetworkManager
[root@controller ~]# systemctl restart network
[root@controller ~]# systemctl enable network
[root@controller ~]# reboot

步骤4)关闭防火墙

[root@controller ~]# systemctl disable firewalld
[root@controller ~]# systemctl stop firewalld
[root@controller ~]# setenforce 0

步骤5)启用OpenStack repositories并安装packstack工具

[root@controller ~]# dnf config-manager --enable powertools
[root@controller ~]# yum install -y centos-release-openstack-ussuri
[root@controller ~]# yum install openstack-packstack

步骤6)生成答案文件并使用packstack安装openstack

使用packstack命令生成应答文件,并修改其中配置

[root@controller ~]# packstack --gen-answer-file /root/openstack-answer-u.txt

修改packstack --gen-answer-file /root/openstack-answer-u.txt中相关配置

CONFIG_MARIADB_PW=admin
CONFIG_KEYSTONE_DB_PW=admin
CONFIG_KEYSTONE_ADMIN_PW=admin
CONFIG_KEYSTONE_DEMO_PW=admin
CONFIG_GLANCE_DB_PW=admin
CONFIG_GLANCE_KS_PW=admin
CONFIG_CINDER_DB_PW=admin
CONFIG_CINDER_KS_PW=admin
CONFIG_CINDER_BACKEND=nfs
CONFIG_CINDER_NFS_MOUNTS=10.2.5.157:/share
CONFIG_NOVA_DB_PW=admin
CONFIG_NOVA_KS_PW=admin
CONFIG_NEUTRON_KS_PW=admin
CONFIG_NEUTRON_DB_PW=admin
CONFIG_NEUTRON_METADATA_PW=admin
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vxlan,flat
CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vxlan
CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=linuxbridge
CONFIG_NEUTRON_L2_AGENT=linuxbridge
CONFIG_SWIFT_KS_PW=admin
CONFIG_PROVISION_DEMO=n
CONFIG_GNOCCHI_DB_PW=admin
CONFIG_GNOCCHI_KS_PW=admin
CONFIG_CEILOMETER_KS_PW=admin
CONFIG_AODH_KS_PW=admin
CONFIG_AODH_DB_PW=admin

步骤7)创建/share目录

[root@controller ~]# mkdir /share 

步骤8)部署openstack

部署openstack-ussuri

[root@controller ~]# packstack -d --answer-file=/root/openstack-answer-u.txt

看到以下信息即部署成功

**** Installation completed successfully ******

Additional information:
 * 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 10.2.5.157. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://10.2.5.157/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/20210324-225145-li4obxjo/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20210324-225145-li4obxjo/manifests
 * Note temporary directory /var/tmp/packstack/3335f7bab74c45f0be9df82f1027d97f on host 10.2.5.157 was not deleted for debugging purposes.

步骤9)登陆dashboard查看

http://10.2.5.157/dashboard

猜你喜欢

转载自blog.csdn.net/qq_25650463/article/details/115211911