虚拟机配置
- 准备虚拟机3台,配置如下
- openstack controller
- 2cpu,8G内存,100G硬盘
- 配置静态IP:192.168.2.11
- nova01,nova02计算节点*2
- 2cpu,8G内存,100G硬盘
- 配置静态IP:192.168.2.12(13)
配置DNS
- 保证虚拟机可以访问互联网
[root@controller ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search network4
nameserver 192.168.122.254
nameserver 192.168.4.254
注意:删掉search开头的所有行
- 保证虚拟机三节点之间可以通过主机名互访
- /etc/hosts
时间服务
- nova服务器之间的时间必须保持一致
centos7,使用默认配置即可。
配置yum仓库
在centos7中使用系统自带的仓库CentOS-OpenStack-rocky.repo即可
yum install -y centos-release-openstack-rocky.noarch
配置packstack
- 安装packstack
yum install openstack-packstack -y
- 使用packstack创建通用应答文件
packstack --gen-answer-file=answer.ini
配置packstack
- 修改应答文件
CONFIG_SWIFT_INSTALL=n
CONFIG_CEILOMETER_INSTALL=n
CONFIG_AODH_INSTALL=n
CONFIG_COMPUTE_HOSTS=192.168.2.12,192.168.2.14
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vxlan,flat
CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eth0
CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=physnet1:br-ex
CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eth0
CONFIG_PROVISION_DEMO=n
安装
packstack --answer-file=test.ini
安装输出示例
[root@controller tmp]# packstack --answer-file=test.ini
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20230915-164902-eh9BdT/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron LBaaS Agent entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.2.11_controller.pp
192.168.2.11_controller.pp: [ DONE ]
Applying 192.168.2.12_network.pp
Applying 192.168.2.11_network.pp
192.168.2.11_network.pp: [ DONE ]
192.168.2.12_network.pp: [ DONE ]
Applying 192.168.2.12_compute.pp
192.168.2.12_compute.pp: [ DONE ]
Applying Puppet manifests [ DONE ]
Finalizing [ DONE ]
**** 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.
* Warning: NetworkManager is active on 192.168.2.12, 192.168.2.11. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.2.11. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.2.11/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/20230915-164902-eh9BdT/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20230915-164902-eh9BdT/manifests