Install openstack in centos 7.0

Source: Internet
Author: User

Install openstack in centos 7.0

Reference official documents: http://docs.openstack.org/juno/install-guide/install/yum/content /#

Ip address information of three Nodes

Controller: 192.168.100.10

Network: 192.168.100.20

Compute1: 192.168.100.30

Modify the/etc/hosts file of each node

Test the connectivity between each node and openstack.org

Controller node

Configure NTP service

Yum install-y ntp

The vi/etc/ntp. conf file is modified as follows:

ServerNTP_SERVERiburst # The parameter is not modified here. The default value is used.

Restrict-4 default kod notrap nomodify

Restrict-6 default kod notrap nomodify

Systemctl enable ntpd. service # Start upon startup

Systemctl start ntpd. service

Other nodes are also installed

Yum install ntp

Modify the/etc/ntp. conf file as follows:

Server controller iburst

Start the service at startup:

Systemctl enable ntpd. service

Systemctl start ntpd. service

OpenStack packages

Install the yum-plugin-priorities package to enable assignment of relative priorities within repositories:

# Yum install-y yum-plugin-priorities

Install the epel-release package to enable the EPEL repository:

# Yum installhttp: // dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Install the rdo-release-juno package to enable the RDO repository:

# Yum installhttp: // rdo.fedorapeople.org/openstack-juno/rdo-release-juno.rpm

Upgrade the packages on your system:

# Yum upgrade

# Reboot

RHEL and CentOS enable SELinux by default. Install the openstack-selinux package to automatically manage security groups ies for OpenStack services:

# Yum install openstack-selinux

If an error is reported during installation, install the tool as follows:

# Yum installhttp: // restart

To install and configure the database server

# Yum install mariadb-server MySQL-python

Modify/etc/my. cnf

Bind-address = 127.0.0.1

Default-storage-engine = innodb

Innodb_file_per_table

Collation-server = utf8_general_ci

Init-connect = 'set NAMES utf8'

Character-set-server = utf8

# Systemctl enable mariadb. service

# Systemctl start mariadb. service

To install the RabbitMQ message broker service

# Yum install rabbitmq-server

# Systemctl enable rabbitmq-server.service

# Systemctl start rabbitmq-server.service

The following error occurs when you start the service:

# Rabbitmqctl change_password guest123456

If an error is reported during execution

Identity serviceInstall and configure

# Mysql

> Create database keystone;

> Grant all privileges on keystone. * to 'keystone '@ 'localhost' identified by 'test01 ';

> Grant all privileges on keystone. * to 'keystone '@' % 'identified by 'test01 ';

# Openssl rand-hex 10

02456f17dc198d827a90 # different values

# Yum install openstack-keystone python-keystoneclient

Modify/etc/keystone. conf

[DEFAULT]

...

Admin_token = 02456f17dc198d827a90

Verbose = True

[Database]

...

Connection = mysql: // keystone: test01 @ localhost/keystone

[Token]

...

Provider = keystone. token. providers. uuid. Provider

Driver = keystone. token. persistence. backends. SQL. Token

# Keystone-manage pki_setup -- keystone-user keystone -- keystone-group keystone

# Chown-R keystone: keystone/var/log/keystone

# Chown-R keystone: keystone/etc/keystone/ssl

# Chmod-R o-rwx/etc/keystone/ssl

# Su-s/bin/sh-c "keystone-manage db_sync" keystone or keystone-manage db_sync

# Systemctl enable openstack-keystone

# Systemctl start openstack-keystone

Create tenants, users, and roles

# Export OS _SERVICE_TIOEN = 02456f17dc198d827a90

# Export OS _SERVICE_ENDPOINT = http: // controller: 35357/v2.0

Create the admin tenant:

# Keystone tenant-create -- name admin -- description "Admin Tenant"

Create the admin user:

# Keystone user-create -- name admin -- pass test01 -- email admin@test.com

Create the admin role:

# Keystone role-create -- name admin

Add the admin role to the admin tenant and user:

# Keystone user-role-add -- user admin -- tenant admin -- role admin

Create a demo tenant and user for typical operations in your environment:

Create the demo tenant:

# Keystone tenant-create -- name demo -- description "Demo Tenant"

Create the demo user under the demo tenant:

# Keystone user-create -- name demo -- tenant demo -- pass test01 -- email admin@test.com

Create the service tenant:

# Keystone tenant-create -- name service -- description "Service Tenant"

Create the service entity for the Identity service:

# Keystone service-create -- name keystone -- type identity -- description "Openstack Identity"

Create the Identity service API endpoints:

# Keystone endpoint-create -- service-id $ (keystone service-list | awk '/identity/{print $2}') -- publicurl http: // controller: 5000/v2.0 -- internalurl http: // controller: 5000/v2.0 -- adminurl http: // controller: 35357/v2.0 -- region regionOne

# Unset OS _SERVICE_TOKEN OS _SERVICE_ENDPOINT

# Keystone -- OS-tenant-name admin -- OS-username admin -- OS-password test01 -- OS-auth-url http: // controller: 35357/v2.0 token-get

# Keystone -- OS-tenant-name admin -- OS-username admin -- OS-password test01 -- OS-auth-url http: // controller: 35357/v2.0 tenant-list

# Keystone -- OS-tenant-name admin -- OS-username admin -- OS-password test01 -- OS-auth-url http: // controller: 35357/v2.0 user-list

# Keystone -- OS-tenant-name admin -- OS-username admin -- OS-password test01 -- OS-auth-url http: // controller: 35357/v2.0 role-list

# Keystone -- OS-tenant-name demo -- OS-username demo -- OS-password test01 -- OS-auth-url http: // controller: 35357/v2.0 token-get

# Keystone -- OS-tenant-name demo -- OS-username demo -- OS-password test01 -- OS-auth-url http: // controller: 35357/v2.0 user-list

Add the Image Service (in controller node)

To configure prerequisites

# Mysql-u root

> Create database glance;

> Grant all privileges on glance. * to 'glance '@ 'localhost' identified by 'test01 ';

> Grant all privileges on glance. * to 'glance '@' % 'identified by 'test01 ';

> Quit

# Source admin-openrc.sh

# Keystone user-create -- name glance -- pass test01 -- email admin@test.com

# Keystone user-role-add -- user glance -- tenant service -- role admin

# Keystone service-create -- name glance -- type image -- description "Openstack Image Service"

# Keystone endpoint-create -- service-id $ (keystone service-list | awk '/image/{print $2}') -- publicurl http: // controller: 9292 -- internalurl http: // controller: 9292 -- adminurl http: // controller: 9292 -- region regionOne

To install and configure the Image Service components

# Yum install openstack-glance python-glanceclient

# Vi/etc/glance/glance-api.conf

[DEFAULT]

Verbose = True

[Database]

Connection = mysql: // glance: test01 @ controller/glance

[Keystone_authtoken]

Auth_uri = http: // controller: 5000/v2.0

Identity_uri = http: // controller: 35357

Admin_tenant_name = service

Admin_user = glance

Admin_password = test02

[Paste_deploy]

Flavor = keystone

Filesystem_store_datadirs =/var/lib/glance/images/

[Glance_store]

Default_store = file

Filesystem_store_datadir =/var/lib/glance/images/

# Vi/etc/glance/glance-registry.conf

[DEFAULT]

Verbose = True

[Paste_deploy]

Flavor = keystone

[Database]

Connection = mysql: // glance: test01 @ controller/glance

[Keystone_authtoken]

Auth_uri = http: // controller: 5000/v2.0

Identity_uri = http: // controller: 35357

Admin_tenant_name = service

Admin_user = glance

Admin_password = test02

# Su-s/bin/sh-c "glance-manage db_sync" glance

# Systemctl enable openstack-glance-api.service openstack-glance-registry.service

# Systemctl start openstack-glance-api.service openstack-glance-registry.service

# Mkdir/tmp/images

# Cd/tmp/images

# Wgethttp: // cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img

# Source admin-openrc.sh (to first enter the admin-openrc.sh directory is valid, this default under/root)

# Cd/tmp/images

# Glance image-create -- name "cirros-0.3.3-x86_64" -- file cirros-0.3.3-x86_64-disk.img -- disk-format qcow2 -- container-format bare -- is-public True -- progress

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.