搭建OpenStack测试环境,供初学者学习使用。
OpenStack提供一种最简单的安装方法,ALLinone。
只需要一条命令即可完成Openstack的整个安装
安装环境如下:
1、VMware Fusion 7 PRO 虚拟化平台(也可使用 VMware Workstation)
2、创建VM虚拟机(Redhat 7),vCPU*1/8G/100G,网卡模式为NAT可上网
3、安装CentOS7.1操作系统
4、计算机名称:Allinone IP地址:192.168.100.136/24 网关:192.168.100.2 DNS:192.168.100.2
操作步骤:
1、关闭本计算机防火墙以及SELINUX
2、配置本地网络参数
#修改网卡命名方式参见 [RHEL7.1]修改网卡命名方式 eno16777763变为eth0
nmcli connection add con-name eth0 ifname eth0 type ethernet autoconnect yes ip4 192.168.100.136/24 gw4 192.168.100.2
nmcli connection modify eth0 ipv4.dns 192.168.100.2
#修改计算机DNS解析
echo 192.168.100.136 allinone > /etc/hosts
#修改计算机名称
hostname allinone
3、升级本操作系统
yum update
4、添加Openstack YUM云
yum install http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm
5、清除YUM云
yum cleanall
6、缓存YUM云
yum makecache
7、安装Allinone的包
yum install openstack-packstack.noarch -y
8、开始安装Openstack ALLinone
packstack --allinone
Welcome to the Packstack setup utility
The installation log file is available at: /var/tmp/packstack/20150604-103248-mK_MC6/openstack-setup.log
Installing:
Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Preinstalling Puppet and discovering hosts‘ details [ DONE ]
Adding pre install manifest entries [ DONE ]
Adding AMQP manifest entries [ DONE ]
Adding MariaDB 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 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 FWaaS Agent manifest entries [ DONE ]
Adding Neutron LBaaS Agent manifest entries [ DONE ]
Adding Neutron Metering Agent manifest entries [ DONE ]
Adding Neutron Metadata 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 Demo manifest entries [ DONE ]
Adding Provisioning Glance 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 Nagios server manifest entries [ DONE ]
Adding Nagios host manifest entries [ DONE ]
Adding post install manifest entries [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.100.136_prescript.pp
192.168.100.136_prescript.pp: [ DONE ]
Applying 192.168.100.136_amqp.pp
Applying 192.168.100.136_mariadb.pp
192.168.100.136_amqp.pp: [ DONE ]
192.168.100.136_mariadb.pp: [ DONE ]
Applying 192.168.100.136_keystone.pp
Applying 192.168.100.136_glance.pp
Applying 192.168.100.136_cinder.pp
192.168.100.136_keystone.pp: [ DONE ]
192.168.100.136_glance.pp: [ DONE ]
192.168.100.136_cinder.pp: [ DONE ]
Applying 192.168.100.136_api_nova.pp
192.168.100.136_api_nova.pp: [ DONE ]
Applying 192.168.100.136_nova.pp
192.168.100.136_nova.pp: [ DONE ]
Applying 192.168.100.136_neutron.pp
192.168.100.136_neutron.pp: [ DONE ]
Applying 192.168.100.136_osclient.pp
Applying 192.168.100.136_horizon.pp
192.168.100.136_osclient.pp: [ DONE ]
192.168.100.136_horizon.pp: [ DONE ]
Applying 192.168.100.136_ring_swift.pp
192.168.100.136_ring_swift.pp: [ DONE ]
Applying 192.168.100.136_swift.pp
Applying 192.168.100.136_provision_demo.pp
Applying 192.168.100.136_provision_glance
192.168.100.136_swift.pp: [ DONE ]
192.168.100.136_provision_demo.pp: [ DONE ]
192.168.100.136_provision_glance: [ DONE ]
Applying 192.168.100.136_mongodb.pp
Applying 192.168.100.136_redis.pp
192.168.100.136_mongodb.pp: [ DONE ]
192.168.100.136_redis.pp: [ DONE ]
Applying 192.168.100.136_ceilometer.pp
192.168.100.136_ceilometer.pp: [ DONE ]
Applying 192.168.100.136_nagios.pp
Applying 192.168.100.136_nagios_nrpe.pp
192.168.100.136_nagios.pp: [ DONE ]
192.168.100.136_nagios_nrpe.pp: [ DONE ]
Applying 192.168.100.136_postscript.pp
192.168.100.136_postscript.pp: [ DONE ]
Applying Puppet manifests [ DONE ]
Finalizing [ DONE ]
**** Installation completed successfully ******
Additional information:
* A new answerfile was created in: /root/packstack-answers-20150604-103248.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* Warning: NetworkManager is active on 192.168.100.136. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.100.136. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.100.136/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* To use Nagios, browse to http://192.168.100.136/nagios username: nagiosadmin, password: 0a116e6696384797
* Because of the kernel update the host 192.168.100.136 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20150604-103248-mK_MC6/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20150604-103248-mK_MC6/manifests
9、安装完成以后即可登录Openstack
http://192.168.100.136/dashboard
管理员账号密码在 keystonerc_admin文件中
cat keystonerc_admin
export OS_USERNAME=admin
export OS_TENANT_NAME=admin
export OS_PASSWORD=3d90880019bb411c
export OS_AUTH_URL=http://192.168.100.136:5000/v2.0/
export OS_REGION_NAME=RegionOne
export PS1=‘[\u@\h \W(keystone_admin)]\$ ‘
10、登陆界面如下
本文出自 “知识改变命运科技改变生活” 博客,请务必保留此出处http://leoshi.blog.51cto.com/152597/1658404
原文地址:http://leoshi.blog.51cto.com/152597/1658404