In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to install and deploy OpenStack cloud computing platform under CentOS 6.4". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "how to install and deploy OpenStack cloud computing platform under CentOS 6.4" can help you solve the problem.
Preface
Openstack is an open source iaas (Infrastructure and Services) cloud computing platform that allows anyone to build and provide cloud computing services themselves.
Openstack provides the various components of a cloud infrastructure solution by a series of interrelated projects, with 9 core projects:
1. Computing (compute)-nova
2. Network and address management-neutron
3. Object Storage (object)-swift
4. Block storage (block)-cinder
5. Identity-keystone
6. Image-glance
7. Ui interface (dashboard)-horizon
8. Measure (metering)-ceilometer
9. Orchestration-heat
The relevant configurations are as follows:
System centos6.4
Hostname is: openstack.lisys.cn
The 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 dependency packages: don't be afraid, follow the steps; the other articles you read certainly didn't install so many packages so quickly
Yum-enablerepo=epel-testing install openstack-nova openstack-glance openstack-keystone openstack-quantum openstack-swift openstack-dashboard openstack-utils memcached qpid-cpp-server mysql-server avahi
If you use epel-testin these days, you will mistakenly say that quantum-2013.1 can not be found. Just remove the-- enablerepo=epel-testing during installation.
The message server is required, and openstack defaults to qpid as the message server, so qpid is installed here.
Safe. Now.
Vim / etc/qpidd.confauth=yes- > auth=no
: X save exit
Selinux settings:
Vim / etc/selinux/config
Selinux=permissive this mode is free
Set up dns control:
Yum install-y dnsmasq-utils
Database-related configuration:
Turn on mysql and set it to boot.
Service mysqld start & & chkconfig mysqld onstarting mysqld: [ok]
Initialize nova-related databases
Openstack-db-init-service nova
Mysql user: the password to log in to the database, that is, the password for the database administrator
Initialize glance-related databases
Openstack-db-init-service glance
Enable amqp message function:
Service qpidd start & & chkconfig qpidd onstarting qpid amqp daemon: [ok]
Enable the libvirt function:
Service libvirtd restart Chkconfig libvirtd onstopping libvirtd daemon: [ok] starting libvirtd daemon: 2013-05-21 17 starting libvirtd daemon 20bank 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 virgethostname:2265 20V 23.433 openstack': name or service not known 0000: 23858: warning: virgethostname:2265: getaddrinfo failed for 'openstack': name or service not known [ok]
Start glance-api and glance-registry functions:
For svc in api registry; do service openstack-glance-$svc start; chkconfig openstack-glance-$svc on Donestarting 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=00+0 records in0+0 records out0 bytes (0b) copied, 1.8741e-05 s 0.0 kb/svgcreate nova-volumes $(losetup-- show-f / var/lib/nova/nova-volumes.img) no physical volume label read from / dev/loop0 physical volume "/ dev/loop0" successfully created volume group "nova-volumes" successfully created
The following two points are important, and failure to do so will cause the creation of the volume to fail!
Vim / etc/tgt/targets.confinclude / etc/nova/volumes/*service tgtd start; chkconfig tgtd onstarting scsi target daemon: [ok] service tgtd start; chkconfig tgtd onstarting scsi target daemon: [ok] openstack-config-- set / etc/nova/nova.conf default libvirt_type kvmln-s / usr/libexec/qemu-kvm / usr/bin/qemu-system-x86_64
Restart the system
Reboot
Restart libvirt
Service libvirtd restart
Start all services of nova:
For 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, including nova-objectstore, nova-network, nova-volume, nova-scheduler, nova-cert, nova-api, nova-compute. To further confirm that the services are working, be sure to check the log files of each service under / var/log/nova to see if there are any errors or warnings.
Note: the nova-voluem service is specially emphasized here. The nova-volumes volume will be lost every time the system is rebooted (the specific reason to be found). Therefore, the command executed above may fail when starting the volume service, depending on the log. If this is the case, you can run it again:
Vgcreate nova-volumes $(losetup-- show-f / var/lib/nova/nova-volumes.img)
And restart the volume service again, and if there is an error, try again:
Service openstack-nova-volume restart
Initialize the keystone service:
Initialize keystone-related databases
Openstack-db-init-service keystone
Vi creates a file for keystonerc and writes the following for the environment variables:
Vim keystonercexport admin_token=$ (openssl rand-hex 10) export os_username=adminexport os_password=verybadpassexport os_tenant_name=adminexport 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 files had better be added to ~ / .bashrc, otherwise after every restart of the system, if you perform relevant operations through the command line, you need to find the keystonerc file and execute source. / keystonerc
Set the admin_ token value in the 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 simple tenant, user, roles, service
Admin_password=$os_password service_password=servicepass openstack-keystone-sample-data
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 serviceopenstack-config-set / etc/nova/api-paste.ini filter:authtoken admin_user novaopenstack-config-set / etc/nova/api-paste.ini filter:authtoken admin_password servicepassopenstack-config-set / etc/nova/nova.conf default auth_strategy keystone
Restart nova's api and compute services
For svc in api compute; do service openstack-nova-$svc restart; done
Verify that nova and keystone are reachable
Nova flavor-list
Configure glance to use the keystone authentication service:
Openstack-config-set / etc/glance/glance-api.conf paste_deploy flavor keystoneopenstack-config-set / etc/glance/glance-registry.conf paste_deploy flavor keystoneopenstack-config-set / etc/glance/glance-api-paste.ini filter:authtoken admin_tenant_name serviceopenstack-config-set / etc/glance/glance-api-paste.ini filter:authtoken admin_user glanceopenstack-config-set / etc/glance/glance-api-paste.ini filter:authtoken admin_password servicepassopenstack-config-set / etc/glance/glance-registry-paste.ini filter:authtoken admin_tenant_name serviceopenstack-config-- set / etc/glance/glance-registry-paste.ini filter:authtoken admin_user glanceopenstack-config-- set / etc/glance/glance-registry-paste.ini filter:authtoken admin_password servicepass
Restart two services of glance
Service openstack-glance-api restartservice openstack-glance-registry restart
Verify that glance and keystone are connected
Glance index
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 needs to communicate with http api of other openstack services)
Setsebool-p httpd_can_network_connect=on
At this point, we can access openstack through http://192.168.1.195/dashboard. The user name is: nova password: servicepass, that is, the password we set in keystone.
Open access to the http service in the firewall:
Lokkit-p http:tcplokkit-p https:tcp on "how to install and deploy OpenStack cloud computing platform under CentOS 6.4" is introduced here. Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.