一、安裝方式
openstack安裝方法有很多種,其中有手動一步一步安裝,fuel安裝,devstack安裝,rdo安裝,RDO是紅帽的的一個開源項目,能夠幫我們快速部署openstack開發環境,官方部署文檔:https://www.rdoproject.org/install/packstack/
二、測試環境
環境使用vmware進行測試,內存12G,處理器為4,磁盤50G,2塊網卡,一塊為net,一塊為僅主機模式。開啟支持虛擬化
三、基本配置
配置net網卡與僅主機網卡,配置完成后可以連接外網
vi /etc/sysconfig/network-scripts/ifcfg-ens33 vi /etc/sysconfig/network-scripts/ifcfg-ens37
修改主機名,關閉防火牆,selinux
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
四、安裝
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
問題一
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
# 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
# facter -p facter: error while loading shared libraries: leatherman_curl.so.1.3.0: cannot open shared object file: No such file
回退leatherman版本
# yum downgrade leatherman
問題解決
# 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" }, ......
問題二
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 o
ne 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)^[[0m
Error: /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]^[[0
Error: /Stage[main]/Nova::Db::Sync/Exec[nova-db-sync]: '/usr/bin/nova-manage db sync' returned 1 instead of one of [0]^[[0m
Error: 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 詳細