Openstack is an open-source cloud platform that works collaboratively with various components and is very complicated to install. RedHat has a project rdo about openstack, which can simplify the installation process. However, if you install rdo in three steps, you will find many errors during the installation process, you have to query the official openstack documentation. I was prepared to install it on the new rhel7. I found that the libselinux (epel7) Additional package is missing and may not be compiled yet. Select redhat6.5 as the underlying operating system.
Installation environment preparation 1. hardware environment:
Dell r410 quad-core 4G memory, dual NIC (only one Nic is used in this instance), two GB hard disks
2. software environment:
Install RedHat 6.5 (minimize installation)
Eth0 interface IP Address: 192.168.11.120/24
Host Name: osnode. demostack
Operation User: Root (other users can also be used, just add sudo before all commands)
Rdo official documentation: http://openstack.redhat.com/Quickstart
Openstack official documentation: http://docs.openstack.org/
Operating system installation configuration 1. Install the underlying operating system RHEL
The Installation Process of the operating system will not be repeated. Here we will minimize the installation of RedHat 6.5. Remember to configure the hostname during the installation process. The hostname must be long enough and never be a pure number, for example 189. localdomain. Set osnode. demostack here
(This is the first error I encountered. I thought this hostname didn't matter. I directly filled in the last segment of the IP address (189. localdomain). As a result, puppet reported an error during installation ,)
2. Configure the host file
Edit the host file and add the Host Name and corresponding IP address to the host file.
vi /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6127.0.0.1 Node.OpenStack
Bytes -----------------------------------------------------------------------------------------------------------------
It is best to enter 127.0.0.1 as the IP address in front of this location. It should be that MySQL installed in rdo can only connect to this IP address by default. If you enter the IP address of the local Nic, the following error will be reported.
Error: error appeared during puppet run: 192.168.11.120 _ Keystone. PP
Error:/stage [main]/keystone: Roles: admin/keystone_role [_ member _]: cocould not evaluate: execution of '/usr/bin/keystone -- OS-endpoint http: // 127.0.0.1: 35357/V2.0/role-list' returned 1: an unexpected error prevented the server from fulfilling your request. (HTTP 500)
3. Configure the network
Edit the/etc/sysconfig/network-scripts/ifcfg-** File
[[email protected] network-scripts]# vi ifcfg-eth0DEVICE=eth0TYPE=EthernetUUID=11ed2c17-9098-4519-b388-9f3824b6c531ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=noneHWADDR=00:0C:29:D1:80:BBIPADDR=192.168.11.120PREFIX=24GATEWAY=192.168.11.1DNS1=114.114.114.114
Configure the IP address, gateway, and DNS. You are advised to ping 163.com to check whether the communication is normal. 4. Open the system firewall
By default, rhel6.5 is enabled. Do not disable it. Many network functions of openstack are implemented through the firewall.
Service iptables status
5. Disable SELinux
VI/etc/SELinux/config
SELinux = disabled
Restart takes effect
6. Configure the local Yum Environment
Upload the RedHat 6.5 IOS image to the Home Directory, create a directory named rhel6, mount the ISO file to the local_yum directory, and modify the repo file. perform the following steps:
#cd /home#mkdir rhel6#mount -o loop RHEL6.5.iso rhel6/
#vi /etc/yum.repos.d/RHEL6.5.repo[rhel6]name=rhel6baseurl=file:///root/rhel6/enabled=1gpgcheck=0~
Update Yum Cache
Yum clean all
Yum update
Yum makecache
7. Restart the machine
Reboot
Rdo installation Step 1. Set LVM partitions for storage (optional)
To improve the performance of virtual machines, you can place the storage on the second hard disk and create an LVM partition on the second hard disk (SDB.
1.1 create a physical partition sdb1
#fdisk /dev/sdbCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1
1.2 change the partition type to 8E
Command (m for help): tPartition number (1-4): 1Hex code (type L to list codes): 8eChanged system type of partition 1 to 8e (Linux LVM)
1.3 create PV and VG
# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created# vgcreate cinder-volumes /dev/sdb1 Volume group "cinder-volumes" successfully created
1.4 cancel the boot mounting of the newly created LVM.
Check the/etc/fsta file and comment out the boot mount of cinder-volumes.
2. Install the rubygems package of centos6.5
yum install -y http://mirrors.163.com/centos/6.5/os/x86_64/Packages/rubygems-1.3.7-5.el6.noarch.rpm
Because the local Yum of RedHat does not have the rubygems package, you must install the rubygems package of centos. Otherwise, the following error will be reported during packstack installation.
Error: Package: rubygem-json-1.5.5-1.el6.x86_64 (puppetlabs-deps)
Requires: rubygems
3. Install the packstack package
yum install -y http://rdo.fedorapeople.org/rdo-release.rpmyum install -y openstack-packstack
Update yum
Yum-y update
Yum makecache
Restart the machine
Reboot
4. Execute rdo Installation
packstack --allinone --provision-demo=n
If you have set partitions for Cinder above, You can execute the following command
packstack --allinone --provision-demo=n CONFIG_CINDER_VOLUMES_CREATE=n
After the installation is complete, the keystonerc_admin file is in the root directory, which contains the username and password required for Web management login. http: // 192.168.11.120/dashboard5. error handling during the installation process 1. when keystone encounters an http500 error, first check whether the host name is set to 127.0.0.1. If no problem occurs, run the following command to synchronize the database to MySQL:
keystone-manage db_sync
Then run the packstack -- Answer-file/root/packstack-answers-20140701-091539.txt command again.
The packstack name can be repeated, but the configuration file for the first installation must be included. During the first installation, no matter whether the packstack-answers-20140701-091539.txt configuration file is generated in the root directory.
2. Cinder's volume group 'cinder-V olumes 'could not be created
Run Rm-RF/var/lib/cinder-volumes
Reinstall
Packstack -- Answer-file/root/packstack-answers-20140701-091539.txt
3. Download of other installation packages is interrupted during installation.
Because the yum server is installed abroad, it is easy to cause installation interruption due to network reasons. In this case, you can simply reinstall it.