OpenStack云计算平台部署(单节点)
阅读原文时间:2023年07月10日阅读:1

虚拟机(centos7 、内存8G、硬盘300G、处理器4核并开启intel vt-x,网络模式设置为NAT,虚拟机网络一定要设置好,并可以ping通baidu,不然有中途掉IP的情况发生)

systemctl stop firewalld
systemctl disable firewalld
setenforce 0
vi /etc/selinux/config
修改SELINUX=disabled


systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl start network
systemctl enable network
reboot


cd /etc/yum.repos.d/
ls
rm -rf *
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
ls
yum clean all
yum makecache
yum -y update


yum -y install ntpdate
ntpdate ntp.aliyun.com
crontab -e
写入:*/2 * * * * /usr/sbin/ntpdate ntp.aliyun.com >> /var/log/ntpdate.log
crontab -l
systemctl restart crond
systemctl enable crond
#安装openstack-train版本
yum -y install centos-release-openstack-train.noarch
#或安装openstack queens版本
yum install -y centos-release-openstack-queens


yum -y install openstack-packstack


packstack --allinone 或 packstack -d --allinone
#执行结果如下:

点击查看执行结果

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20200801-142057-L4DQX3/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

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 Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.10.10_controller.pp
192.168.10.10_controller.pp:                       [ DONE ]
Applying 192.168.10.10_network.pp
192.168.10.10_network.pp:                          [ DONE ]
Applying 192.168.10.10_compute.pp
192.168.10.10_compute.pp:                          [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]
 **** Installation completed successfully ******
Additional information:
 * A new answerfile was created in: /root/packstack-answers-20200801-142058.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.10.10. To use the command line tools you nee
d to source the file. * To access the OpenStack Dashboard browse to http://192.168.10.10/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * Because of the kernel update the host 192.168.10.10 requires reboot.
 * The installation log file is available at: /var/tmp/packstack/20200801-142057-L4DQX3/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20200801-142057-L4DQX3/manifests
 * Note temporary directory /var/tmp/packstack/32ea00925ee24993af64f518367d97ae on host 192.168.10.10 was not deleted for debugging purposes. 

ls /root
cat keystonec_admin
#根据Additional information:
#就可以访问http://192.168.10.10/dashboard 进入OpenStack的管理界面