前言
正式工作了,方向由深度学习转为了云计算。以此来开启职业生涯的第一篇博文。
准备条件:虚拟机(centos7 、内存6g、硬盘40g、处理器4核并开启intel vt-x,网络模式设置为NAT,虚拟机网络一定要设置好,不然有中途掉IP的情况发生)
装好centos虚拟机后,在系统配置界面先配置好固定ip。以下命令均以root用户身份进行
1.换源
我这里使用的是阿里源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup && \
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo && \
yum makecache
2.关闭防火墙等设置
systemctl disable firewalld &&\
systemctl stop firewalld &&\
systemctl disable NetworkManager &&\
systemctl stop NetworkManager &&\
systemctl enable network &&\
systemctl start network
3.seliunx设置
vi /etc/selinux/config
修改SELINUX=disabled
setenforce 0
4.安装openstack queens版本库
yum install -y centos-release-openstack-queens
yum update -y
5.安装packstack库
yum install -y openstack-packstack
6.开始部署openstack
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.101.128_controller.pp
192.168.101.128_controller.pp: [ DONE ]
Applying 192.168.101.128_network.pp
192.168.101.128_network.pp: [ DONE ]
Applying 192.168.101.128_compute.pp
192.168.101.128_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.101.128. To use the command line tools you nee
d to source the file. * To access the OpenStack Dashboard browse to http://192.168.101.128/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host 192.168.101.128 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.101.128 was not deleted for deb
ugging purposes.
根据Additional information:
我们可以访问http://192.168.101.128/dashboard 进入OpenStack的管理界面,登录名和密码在用户目录的keystonerc_admin文件中:
在这最后一步中,最容易出问题,先将我碰到的问题总结如下,如有其它问题,大家可以评论区讨论分享:
leatherman版本过高
如下图
解决方案:降级leatherman
yum downgrade leatherman
该解决方案来源于:
Packstack安装OpenStack问题:facter: error while loading shared libraries: leatherman_curl.so.1.3.0
执行到如下卡死
Testing if puppet apply is finished: 192.168.101.128_controller.pp [ \ ]
原因:这一步本身执行的时间就很久,耐心等待,我在这里,电脑放了一个晚上,大概几个小时候结果就出来了。如果还是不行的话,检查是否是自己的虚拟机配置设置得过低
该解决方案来源于
https://developer.aliyun.com/article/227481
参考资料:
https://blog.youkuaiyun.com/weixin_43905458/article/details/104898789
https://developer.aliyun.com/article/227481