CentOS 6.4 Installs the method of deploying OpenStack cloud computing Platform _openstack

Source: Internet
Author: User
Tags auth administrator password qpid

Objective

OpenStack is an open source IaaS (infrastructure and services) cloud computing platform that allows anyone to build and deliver cloud computing services on their own.

OpenStack consists of a series of interrelated projects that provide various components of cloud infrastructure solutions, core projects (9):

1, calculation (Compute)-Nova;

2, Network and address management-neutron;

3, Object Storage (objects)-Swift;

4, block storage (blocks)-cinder;

5, Identity (identity)-Keystone;

6, mirror image (image)-glance;

7, UI Interface (Dashboard)-Horizon;

8, measurement (metering)-ceilometer;

9, Allocation (orchestration) –heat;

The related configuration is as follows:

System Centos6.4

Host name is: openstack.lisys.cn

IP address is: 192.168.1.195 (eth0)

Install the necessary tools:

Yum-y install vim wget make GCC automake yum-utils unzip

To install the necessary sources for OpenStack:

RPM-IVH http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

Install OpenStack components and dependencies: Don't be afraid, follow the steps; the other articles you read must not be so quick. Install so many packages;

Yum--enablerepo=epel-testing install Openstack-nova openstack-glance openstack-keystone Openstack-swift openstack-dashboard openstack-utils memcached qpid-cpp-server mysql-server

This these days with Epel-testin will be an error to say quantum-2013.1 can not find, installation time to --enablerepo=epel-testing remove it!

The message server is required, OpenStack defaults to QPID as the message server, so the qpid is installed here.

Safe now

vim/etc/qpidd.conf
auth=yes----->auth=no

: x save exit;

SELinux settings:

Vim/etc/selinux/config

Selinux=permissive This mode is free mode;

To set up DNS control:

Yum Install-y dnsmasq-utils

Database-related configuration:

Turn on MySQL, and set up the power-on self

Service mysqld start && chkconfig mysqld on
starting mysqld:                      [OK]

Initializing the Nova related database

Openstack-db--init--service Nova

MySQL User: Is the login database password, that is, the database administrator password;

Initializing glance related databases

OPENSTACK-DB--init--service Glance

Turn on the AMQP message function:

Service Qpidd start && chkconfig Qpidd on
starting qpid AMQP daemon:                 [OK]

Turn on the Libvirt function:

Service LIBVIRTD Restart; Chkconfig LIBVIRTD on
stopping LIBVIRTD daemon:                 [OK] Starting LIBVIRTD-daemon:2013-05-21 17:20:23.433+
0000:23858:info:libvirt version:0.10.2, package:18.el6_4.5 (CentOS buildsystem, 2013-05-16-14:53:18, C6b7.bsys.dev. centos.org)
2013-05-21 17:20:23.433+0000:23858:warning:virgethostname:2265:getaddrinfo failed for ' OpenStack ': Name or service not known
                              [OK]

Start Glance-api, Glance-registry features:

For the SVC in API registry; Do service openstack-glance-$svc start; Chkconfig openstack-glance-$svc on;d one
starting Openstack-glance-api:               [OK]
starting Openstack-glance-registry:            [OK]
dd if=/dev/zero of=/var/lib/nova/nova-volumes.img bs=1m seek=20k count=0
0+0 Records in
0+0 records out
0 bytes (0 B) copied, 1.8741e-05 s, 0.0 kb/s vgcreate-nova-volumes
$ (loset Up--show-f/var/lib/nova/nova-volumes.img)
 No Physical Volume label read from/dev/loop0 physical volume
 "/de V/loop0 "Successfully created
 Volume Group" Nova-volumes "successfully created

The following two points are important, if not done will cause the creation volume failure!

vim/etc/tgt/targets.conf
include/etc/nova/volumes/*
service TGTD start; Chkconfig tgtd on
starting SCSI Target daemon:                [OK]
service TGTD start Chkconfig TGTD on
starting SCSI target daemon:                [OK]
opens Tack-config--set/etc/nova/nova.conf DEFAULT libvirt_type KVM
ln-s/usr/libexec/qemu-kvm/usr/bin/ Qemu-system-x86_64

Reboot system

Reboot

Restart Libvirt

Service LIBVIRTD Restart

Start all services for Nova:

For the SVC in API ObjectStore Compute Network Volume Scheduler cert; Do service openstack-nova-$svc start; Chkconfig openstack-nova-$svc on; Done

After starting the service, use Ps-aux | grep Nova to see if all the services are up, these services include Nova-objectstore, Nova-network, Nova-volume, Nova-scheduler, Nova-cert, Nova-api, Nova-compute. To further confirm that the service is normal, be sure to check the log files for each service under/var/log/nova to see if there are any errors or warnings.

Note: This special emphasis is placed on the Nova-voluem service, the nova-volumes volume will be lost each time the system is restarted (for specific reasons), so the command executed above may fail to start the volume service, depending on the log. If this is the case, you can run it one more time:

Vgcreate Nova-volumes $ (losetup--show-f/var/lib/nova/nova-volumes.img)

Restart the volume service again, and try again if prompted incorrectly:

Service Openstack-nova-volume Restart

Initialize the Keystone Service:

Initializing Keystone-related databases

Openstack-db--init--service Keystone

VI creates a KEYSTONERC file and writes the following to the environment variable:

Vim Keystonerc
export admin_token=$ (OpenSSL rand-hex)
export os_username=admin
export os_password= Verybadpass
export os_tenant_name=admin
export os_auth_url=http://127.0.0.1:5000/v2.0/

Save and exit, and then execute:

source./keystonerc

Note: the contents of the above file, preferably added to the ~/.BASHRC, or each reboot the system, if the operation through the command line to find the Keystonerc file, and execute source./keystonerc

To set the Admin_token value in a configuration file

Openstack-config--set/etc/keystone/keystone.conf DEFAULT Admin_token $ADMIN _token

Start the Keystone Service

Service Openstack-keystone start && chkconfig openstack-keystone on

Create a simple tenant, user, roles, service

admin_password= $OS _password Service_password=servicepass openstack-keystone-sample-data

To test whether the Keystone service is working properly

Keystone User-list

Configure Nova to use the Keystone Authentication Service:

Openstack-config--set/etc/nova/api-paste.ini filter:authtoken admin_tenant_name service
openstack-config--set /etc/nova/api-paste.ini Filter:authtoken admin_user Nova
openstack-config--set/etc/nova/api-paste.ini Filter: Authtoken admin_password servicepass
openstack-config--set/etc/nova/nova.conf DEFAULT auth_strategy Keystone

Restart the Nova API and compute Services

For the SVC in API compute; Do service openstack-nova-$svc restart; Done

Verify that Nova and Keystone are connected

Nova Flavor-list

Configure glance to use the Keystone Authentication Service:

Openstack-config--set/etc/glance/glance-api.conf Paste_deploy Flavor Keystone Openstack-config
glance/glance-registry.conf Paste_deploy Flavor Keystone
openstack-config--set/etc/glance/ Glance-api-paste.ini filter:authtoken admin_tenant_name service
openstack-config--set/etc/glance/ Glance-api-paste.ini Filter:authtoken admin_user Glance
openstack-config--set/etc/glance/glance-api-paste.ini Filter:authtoken admin_password servicepass
openstack-config--set/etc/glance/glance-registry-paste.ini Filter : Authtoken admin_tenant_name Service
openstack-config--set/etc/glance/glance-registry-paste.ini filter: Authtoken admin_user Glance
openstack-config--set/etc/glance/glance-registry-paste.ini Filter:authtoken Password Servicepass

Two services to restart glance

Service Openstack-glance-api Restart
service openstack-glance-registry restart

Verify glance and Keystone are connected

Glance index

To configure the Dashboard service:

Start the httpd service

Service httpd Restart && chkconfig httpd on

If SELinux is open, we need to make the following settings to ensure that httpd can access other network services (dashboard need to communicate with the HTTP APIs of OpenStack other services)

Setsebool-p Httpd_can_network_connect=on

At this point, we can access the OpenStack through Http://192.168.1.195/dashboard, the user name is: Nova Password: Servicepass is the password we set in Keystone

To open access permission to the HTTP service in the firewall:

Lokkit-p http:tcp
lokkit-p https:tcp

The above is written after I have done;

Summarize

The above is in CentOS 6.4 installation OpenStack cloud computing platform all the content, I hope this article on the content of everyone's study or work can bring some help, if you have questions you can message exchange.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.