作者:@郑琰
本文转载请注明出处!:https://www.cnblogs.com/zhengyan6/p/16215439.html
环境配置
虚拟机(centos7 、内存8G、硬盘300G、处理器4核并开启intel vt-x,网络模式设置为NAT,虚拟机网络一定要设置好,并可以ping通baidu,不然有中途掉IP的情况发生)
关闭防火墙和selinux
| systemctl stop firewalld |
| systemctl disable firewalld |
| setenforce 0 |
| vi /etc/selinux/config |
| 修改SELINUX=disabled |
关闭Network管理服务
| systemctl stop NetworkManager |
| systemctl disable NetworkManager |
| systemctl start network |
| systemctl enable network |
| reboot |
删除所有的yum源并重新下载yum源,并更新yum源
| 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 |
安装ntp时间同步服务器,并同步时间及写入计划任务
| 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 |
| |
| yum -y install centos-release-openstack-train.noarch |
| |
| yum install -y centos-release-openstack-queens |
安装openstack-packstack软件包
| yum -y install openstack-packstack |
执行packstack --allinone命令进行安装
| 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. |
| |
查看keystone-admin文件,随后在浏览器输入对应的IP地址和用户名密码进行登录
| ls /root |
| cat keystonec_admin |
| |
| |


【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)