rdo方式安装openstack
一、安装方式
openstack安装方法有很多种,其中有手动一步一步安装,fuel安装,devstack安装,rdo安装,RDO是红帽的的一个开源项目,能够帮我们快速部署openstack开发环境,官方部署文档:https://www.rdoproject.org/install/packstack/
二、测试环境
环境使用vmware进行测试,内存12G,处理器为4,磁盘50G,2块网卡,一块为net,一块为仅主机模式。开启支持虚拟化
三、基本配置
配置net网卡与仅主机网卡,配置完成后可以连接外网
1 2 | vi /etc/sysconfig/network-scripts/ifcfg-ens33 vi /etc/sysconfig/network-scripts/ifcfg-ens37 |
修改主机名,关闭防火墙,selinux
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | hostnamectl set-hostname rdo-openstack systemctl stop firewalld.service systemctl disable firewalld.service firewall-cmd --state sed -i '/^SELINUX=.*/c SELINUX=disabled' /etc/selinux/config sed -i 's/^SELINUXTYPE=.*/SELINUXTYPE=disabled/g' /etc/selinux/config grep --color= auto '^SELINUX' /etc/selinux/config setenforce 0 #vi /etc/environment LANG=en_US.utf-8 LC_ALL=en_US.utf-8 #vi /etc/hosts 192.168.40.161 rdo-openstack 重启 reboot |
四、安装
1 2 3 4 | sudo yum update -y sudo yum install -y centos-release-openstack-train sudo yum install -y openstack-packstack sudo packstack --allinone |
五、报错记录
在执行sudo packstack --allinone时报错(看日志最下面一行)# packstack --answer-file=train.conf
问题一
1 | facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file or directory |
解决:
从打印信息看,是leatherman rpm包版本问题
已经安装版本是1.10.0-1
1 2 3 | # yum list | grep leatherman leatherman.x86_64 1.10.0-1.el7 @epel leatherman-devel.x86_64 1.10.0-1.el7 epel |
而facter需要1.3.0
1 2 | # facter -p facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file |
回退leatherman版本
1 | # yum downgrade leatherman |
问题解决
1 2 3 4 5 6 7 8 9 10 | # facter -p 2020-03-16 10:15:19.462412 WARN puppetlabs.facter - skipping external facts for "/var/lib/puppet/facts.d" : No such file or directory disks => { sda => { model => "ST1200MM0129" , size => "1.09 TiB" , size_bytes => 1200243695616, vendor => "SEAGATE" }, ...... |
问题二
1 | rhosp-director: Upgrade osp9->10->11 fails with Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: <br>Failed to call refresh: neutron-db-manage upgrade heads returned 1 instead of one of [0]mNotice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns: TypeError: __init__() got an unexpected keyword argument 'jitter' Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: Failed to call refresh: 'neutron-db-manage upgrade heads' returned 1 instead of one of [0]Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: 'neutron-db-manage upgrade heads' returned 1 mNotice: /Stage[main]/Nova::Db::Sync/Exec[nova-db-sync]/returns: Error: (pymysql.err.OperationalError) (1045, u "Access denied for user 'nova'@'rdo-openstack' (using password: YES)" ) (Background on this error at: http: //sqlalche.me/e/e3q8)^[[0mError: /Stage[main]/Nova::Db::Sync/Exec[nova-db-sync]: Failed to call refresh: '/usr/bin/nova-manage db sync' returned 1 instead of one of [0]^[[0Error: /Stage[main]/Nova::Db::Sync/Exec[nova-db-sync]: '/usr/bin/nova-manage db sync' returned 1 instead of one of [0]^[[0mError: Failed to apply catalog: Execution of '/usr/bin/openstack domain list --quiet --format csv' returned 1: Unable to establish connection to http://127.0.0.1:5000/v3/domains?: HTTPConnectionPool(host='127.0.0.1', port=5000): Max retries exceeded with url: /v3/domains (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fef30514b10>: Failed to establish a new connection: [Errno 111] Connection refused',)) (tried 40, for a total of 170 seconds)^[[0m看网友说是:没有安装Neutron编译安装需要的python依赖包,依赖包:python-networking-bigswitch没找到python-networking-bigswitch rpm包最终把python2升级为python3也没解决 |
完成后将会输出以下内容
**** Installation completed successfully ******
Additional information:
* A new answerfile was created in: /root/packstack-answers-20181011-174750.txt
* Time synchronization installation was skipped. Please note that
unsynchronized time on server instances might be problem for some
OpenStack components.
。。。。。
访问 http://192.168.40.161/dashboard
用户名密码则在 /root 目录下的keystone_admin 文件中,
参考:
https://mp.weixin.qq.com/s/K8eysDWQT1jxcweTvuto1Q
https://my.oschina.net/u/4270607/blog/4675658
https://mp.weixin.qq.com/s/K8eysDWQT1jxcweTvuto1Q 详细