CentOS7下三步安装单点OpenStack【KVM、VMwareOK】

本文档详细记录了在CentOS7环境下使用Packstack快速安装OpenStack的过程,包括环境准备、软件源设置、安装Packstack工具和运行安装脚本等步骤。在安装过程中遇到的网络、IP配置和错误处理等关键问题进行了说明,以帮助读者成功部署单点OpenStack环境。
摘要由CSDN通过智能技术生成

失败7次后成功。

注意:

1、必须CENTOS7,主要是python要2.7,yum要能用

2、关闭NetworkManager

3、多次安装,千万别修改IP,否则,必然失败

4、安装过程中,失败多次,处理各不同:【不知道是否与我的网络情况有关,导致失败多次】


使用配置参考:

https://www.linuxtechi.com/launch-instance-from-openstack-dashboard/

安装成功后的部分截图:

网络:


路由接口:

虚拟机网络测试:




开始安装:

KVM:

test@test-Vostro-2421:~$ qemu-img create -f qcow2 -o size=60G,preallocation=metadata /media/test/Seagate\ Expansion\ Drive/bak/kvm/Cos7Openstack.img
Formatting '/media/test/Seagate Expansion Drive/bak/kvm/Cos7Openstack.img', fmt=qcow2 size=64424509440 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off
test@test-Vostro-2421:~$ virt-manager
挂载IMG到GUI【virt-manager】
修改VirtIO Disk1的Storage format 为qcow2;
添加centos7.iso光盘,挂载ISO为CDROM
设置Boot Option 为 cd-rom在第1引导
启动虚拟机

虚拟机上,安装centos7,选择的base web server +Large System Performance +Laod Balancer +MariaDB Database Client +Python+Compatibility Libraries+Development Tools 【583】,空间/boot +/swap +/ =120G,单网卡,【最好配2网卡,NAT方式,模拟RTL8139】,4G内存,1CPU【物理机i5+8G】,测试样例最好分5G内存,2CPU【物理机i5+8G】

ROOT PASSWORD ->123456->Done -> USER CREATION -> Full name:test ->Password:123456 ->Done
test
#:
root->chmod u+w sudoers-> vi /etc/sudoers -> 添加 test  ALL......->chmod u-w sudoers
vi ifcfg-eth0-> boot on -> ifup eth0 -> ip addr ->ping baidu ok
vim /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=1

vi /etc/hostname 修改为
openstack01
vi /etc/hosts 添加
192.168.122.130    openstack01
systemctl stop NetworkManager
systemctl disable NetworkManager.service
chkconfig NetworkManager off

ERR1:
ERROR : Failed to run remote script, stdout: Loaded plugins: fastestmirror, langpacks
stderr: Warning: Permanently added '192.168.122.130' (ECDSA) to the list of known hosts.
vi /etc/hostname 修改为
openstack01
vi /etc/hosts 添加
192.168.122.130    openstack01
[test@192 ~]$ packstack --allinone|tee pactstack2.log
ERR2:
ERROR : Error appeared during Puppet run: 192.168.122.130_prescript.pp
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install iptables-services' returned 1: Error downloading packages
yum install iptables-services
[test@192 ~]$ packstack --allinone|tee pactstack3.log
ERR3:
192.168.122.130_api_nova.pp:                 [ ERROR ]
Applying Puppet manifests                    [ ERROR ]
* Warning: NetworkManager is active on 192.168.122.130. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager.service
sudo chkconfig NetworkManager off
[test@192 ~]$ packstack --allinone|tee pactstack4.log
ERR4:
192.168.122.130_neutron.pp:         [ ERROR ]
Applying Puppet manifests           [ ERROR ]
ERROR : Error appeared during Puppet run:192.168.122.130_neutron.pp
Error: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]: Failed to call refresh: Command exceeded timeout
[test@192 ~]$ packstack --allinone|tee pactstack5.log
ERR5:
192.168.122.130_osclient.pp:        [ DONE ]
假死,发现IP掉了
ifup eth0
[test@192 ~]$ packstack --allinone|tee pactstack6.log

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20160609-232624-G8KIr7/openstack-setup.log

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 ]
Adding pre install manifest entries                  [ DONE ]
Setting up CACERT                                    [ DONE ]
Adding AMQP manifest entries                         [ DONE ]
Adding MariaDB manifest entries                      [ DONE ]
Adding Apache manifest entries                       [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Adding Keystone manifest entries                     [ DONE ]
Adding Glance Keystone manifest entries              [ DONE ]
Adding Glance manifest entries                       [ DONE ]
Adding Cinder Keystone manifest entries              [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Adding Cinder manifest entries                       [ DONE ]
Adding Nova API manifest entries                     [ DONE ]
Adding Nova Keystone manifest entries                [ DONE ]
Adding Nova Cert manifest entries                    [ DONE ]
Adding Nova Conductor manifest entries               [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Adding Nova Compute manifest entries                 [ DONE ]
Adding Nova Scheduler manifest entries               [ DONE ]
Adding Nova VNC Proxy manifest entries               [ DONE ]
Adding OpenStack Network-related Nova manifest entries[ DONE ]
Adding Nova Common manifest entries                  [ DONE ]
Adding Neutron VPNaaS Agent manifest entries         [ DONE ]
Adding Neutron FWaaS Agent manifest entries          [ DONE ]
Adding Neutron LBaaS Agent manifest entries          [ DONE ]
Adding Neutron API manifest entries                  [ DONE ]
Adding Neutron Keystone manifest entries             [ DONE ]
Adding Neutron L3 manifest entries                   [ DONE ]
Adding Neutron L2 Agent manifest entries             [ DONE ]
Adding Neutron DHCP Agent manifest entries           [ DONE ]
Adding Neutron Metering Agent manifest entries       [ DONE ]
Adding Neutron Metadata Agent manifest entries       [ DONE ]
Adding Neutron SR-IOV Switch Agent manifest entries  [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Adding OpenStack Client manifest entries             [ DONE ]
Adding Horizon manifest entries                      [ DONE ]
Adding Swift Keystone manifest entries               [ DONE ]
Adding Swift builder manifest entries                [ DONE ]
Adding Swift proxy manifest entries                  [ DONE ]
Adding Swift storage manifest entries                [ DONE ]
Adding Swift common manifest entries                 [ DONE ]
Adding Provisioning manifest entries                 [ DONE ]
Adding Provisioning Glance manifest entries          [ DONE ]
Adding Provisioning Demo bridge manifest entries     [ DONE ]
Adding Gnocchi manifest entries                      [ DONE ]
Adding Gnocchi Keystone manifest entries             [ DONE ]
Adding MongoDB manifest entries                      [ DONE ]
Adding Redis manifest entries                        [ DONE ]
Adding Ceilometer manifest entries                   [ DONE ]
Adding Ceilometer Keystone manifest entries          [ DONE ]
Adding Aodh manifest entries                         [ DONE ]
Adding Aodh Keystone manifest entries                [ DONE ]
Adding Nagios server manifest entries                [ DONE ]
Adding Nagios host manifest entries                  [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.122.130_prescript.pp
192.168.122.130_prescript.pp:                        [ DONE ]
Applying 192.168.122.130_amqp.pp
Applying 192.168.122.130_mariadb.pp
192.168.122.130_amqp.pp:                             [ DONE ]
192.168.122.130_mariadb.pp:                          [ DONE ]
Applying 192.168.122.130_apache.pp
192.168.122.130_apache.pp:                           [ DONE ]
Applying 192.168.122.130_keystone.pp
Applying 192.168.122.130_glance.pp
Applying 192.168.122.130_cinder.pp
192.168.122.130_keystone.pp:                         [ DONE ]
192.168.122.130_glance.pp:  

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值