Installing openstack through an external network may require a large amount of events to be downloaded from the RPM package, and may be unable to access the external network environment at some customer sites, for convenient and quick installation, you can build a yum source by yourself. This article makes a complete summary from the creation of the yum source, to the installation of a single openstack node, and the problems encountered during the installation process.
Download various installation sources to the local device
Create the/root/centos directory and enter the directory. Run the following command:
The installation is performed under the centos release version. Therefore, the source of the latest centos version 6.5 is obtained locally. Go to the local path where the source is to be placed, and run the following command to perform the operation:
Wget-s-c-r-NP-lhttp: // mirrors.163.com/centos/6.5/--accept=rpm,gz,xml
The centos official website regularly upgrades the version and updates some installed dependent packages. We also need to regularly check the changes in the dependent packages and timely synchronize the upgraded packages to the local repository.
Create the/root/icehouse directory and enter the directory. Run the following command:
- Download the openstack-Icehouse package
Wget-c-r-NP -- reject = HTML, GIF, A, D-NH https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/
Create the/root/foreman_local_repo directory and enter the directory. Run the following command:
- Download Foreman plug-in package
Wget-s-c-r-NP-l http://yum.theforeman.org/plugins/1.5/el6/
Create the/root/epel_local_repo directory and enter the directory. Run the following command:
Wget-s-c-r-NP-l http://dl.fedoraproject.org/pub/epel/6.
Create the/root/puppet_local_repo directory and enter the directory. Run the following command:
Wget-s-c-r-NP-l https://yum.puppetlabs.com/el/6.
Create the/root/epel_test_local_repo directory and enter the directory. Run the following command:
- Download the epel test package
Wget-s-c-r-NP-l http://dl.fedoraproject.org/pub/epel/testing/6.
Delete unnecessary files
find ./-name index.html* | xarge rm -rffind ./-name fedora-20 | xarge rm -rffind ./-name fedora-19 | xarge rm -rffind ./-name isos | xarge rm -rffind ./-name i386 | xarge rm -rf
Configure ftp
Use vsftp for sharing
Install
Yum install vsftpd
Start
Servicevsftpd start
Configuration
Add the last line of/etc/vsftpd. conf
Use_localtime = Yes
Copy several local directory folders to the/var/FTP directory.
Delete the centos/6.5/xen4/directory. Otherwise, the following problems may occur on the installed Host:
"Libvirterror: Internal error cannot find suitable CPU model for given data
Create repodata Information
createrepo -p -d -o/var/ftp/centos /var/ftp/centoscreaterepo-p -d -o /var/ftp/icehouse_local_repo /var/ftp/icehouse_local_repocreaterepo -p -d -o/var/ftp/foreman_local_repo /var/ftp/foreman_local_repocreaterepo -p -d -o/var/ftp/epel_local_repo /var/ftp/epel_local_repocreaterepo -p -d -o/var/ftp/puppet_local_repo /var/ftp/puppet_local_repocreaterepo -p -d -o/var/ftp/epel_test_local_repo /var/ftp/epel_test_local_repo
Create a repo File
For the six folders created, create the corresponding repo file, take the Icehouse file as an example, create a rdo-release.repo file (one thing to note is that the container name in centos_local_repo must be base, the container name in epel_local_repo must be epel. You can start anything else)
[openstack-icehouse]name=OpenStackIcehouse Repositorybaseurl=ftp://192.168.40.148/icehouseenabled=1gpgcheck=0
Upload the generated repo file to the/etc/yum. Repos. d/directory of the client.
Install openstack
Perform the following operations on the machine where you want to install openstack:
Install openstack-packstack
Yum install-y openstack-packstack
Generate and modify the answer file of packstack
Config_provision_demo = N
Config_keystone_admin_pw = Admin
# Config_neutron_l2_plugin = openvswitch
Config_neutron_metering_agent_install = y
Config_neutron_l2_plugin = ml2
Config_neutron_ml2_type_drivers = GRE
Config_neutron_ml2_tenant_network_types = GRE
Config_neutron_ml2_tunnel_id_ranges = 100:1000
Config_neutron_ovs_tenant_network_type = GRE
Config_neutron_ovs_tunnel_ranges = 100:1000
Config_neutron_ovs_tunnel_if = eth1
Config_cinder_volumes_create = N
#########
Config_lbaas_install = y
Config_ceilometer_install = y
Config_heat_cloudwatch_install = y
Config_heat_cfn_install = y
Config_heat_install = y
Configure the NIC
DEVICE=eth0HWADDR=44:33:E7:D1:D4:C4TYPE=EthernetUUID=180283345-0a6f-478c-6f51-d87a128c5ab8ONBOOT=yesBOOTPROTO=staticIPADDR=192.168.40.248NETMASK=255.255.255.0GATEWAY=192.168.40.1DNS1=8.8.8.8
Configure/etc/hosts
#127.0.0.1 localhost localhost.localdomain localhost4localhost4.localdomain4127.0.0.1 localyumrepotest::1 localhost localhost.localdomainlocalhost6 localhost6.localdomain6
Run the packstack command
Packstack -- Answer-file gre_allinone.txt
If you do not need the local source, it may take 3-4 hours to install it. Now it only takes 20 minutes.
Create networks, images, and instances
After the installation is successful, log on to the system and create a network, image, and instance.
Configure the host network
After the above configuration, although you can successfully create an instance, the created virtual machine is isolated from the outside world and cannot communicate with the external environment, you need to configure the network of the host.
For how to configure, see: http://blog.csdn.net/eric_sunah/article/details/38303191
Openstack deployment Summary: Install a single-node openstack through a local Yum Source