OpenStackG version Ubuntu13.04 three-node experiment records

Source: Internet
Author: User
Tags openstack swift
OpenstackG version Ubuntu13.04 three experimental records 1. preparation stage special reminder: this document refer to the official documentation (http://docs.openstack.org/), github (https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/blob/OVS_MultiNode/OpenStack_Grizzly_Insta

Openstack G version Ubuntu13.04 three-node experiment record

1. preparation phase

Note:
This document referred to the official documentation (http://docs.openstack.org/), github (https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/blob/OVS_MultiNode/OpenStack_Grizzly_Install_Guide.rst), longgeek Configuration documentation (http://www.linuxidc.com/Linux/2013-10/92123.htm), as well as consulted the openstack group many heroes, then one by one thanks!

Required devices:

8 GB memory on the physical server, windows2003sp2 operating system, workstation9, ubuntu13.04 (64-bit) Image

 

Network settings:

Control node: eth0 (10.10.10.51), eth1 (172.16.10.200)

Network node: eth0 (10.10.10.52), eth1 (10.20.000052), eth2 (172.16.10.201)

Computenode: eth0 (10.10.10.55), eth1 (10.10.20.55)

External Network: 172.16.10.0/24)

Management Network: 10.10.10.0/24 (communication between three nodes, for example, keystone) authentication and rabbitmq Message Queue

Business Network: 10.20.20.0/24 (Vm data communication between network nodes and computing nodes, such as dpcp, l2, and l3)

Topology:

 

Note: Due to the use of virtual machine testing, each virtual machine has 2 GB of memory. My external network uses a bridge network segment, and the management and business networks use vmnet2 and vmnet3 respectively, in addition, because the computing node does not have an external address and cannot download the software package, you can add a nat network and delete it after installation, there are other methods, such as setting the gateway of the computing node to the ip address of the network node in the official website document, and accessing the Internet on the nat proxy computing node of the network node does not affect the experiment results.

 

Installation steps:

 

2. Control node

 

2.1 prepare ubuntu

Add a grizzly Source

Apt-get install-y ubuntu-cloud-keyring

Echo debhttp: // ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main>/etc/apt/sources. list. d/grizzly. list

Update System

Apt-get update-y

Apt-get upgrade-y

Apt-get dist-upgrade-y

 

2.2 Network Configuration

# Cat/etc/network/interfaces

Auto eth0

Iface eth0 inet static

Address 10.10.10.51

Netmask 255.255.255.0

Restart the networking service:

Auto eth1

Iface eth1 inet static

Address 172.16.10.200

Netmask 255.255.255.0

Gateway 172.16.10.254

Dns-nameservers 172.16.10.5

 

Restart NETWORK SERVICE

Service networking restart

 

2.3 install MySQL

Install MySQL:

Apt-get install-y mysql-serverpython-mysqldb

 

Configure myasl to accept all requests

Sed-I's/127.0.0.1/0.0.0.0/G'/etc/mysql/my. cnf

Service mysql restart

 

Create a database

Mysql-u root-p

# Keystone

Create database keystone;

Grant all on keystone. * TO 'keystone '@' % 'identified by 'keystone ';

# Glance

Create database glance;

Grant all on glance. * TO 'glance '@' % 'identified by 'glance ';

# Quantum

Create database quantum;

Grant all on quantum. * TO 'quantum '@' % 'identified by 'quantum ';

# Nova

Create database nova;

Grant all on nova. * TO 'nova '@' % 'identified by 'nova ';

# Cinder

Create database cinder;

Grant all on cinder. * TO 'cinder' @ '%' identified by 'cinder ';

Quit;

 

2.4 RabbitMQ

Install RabbitMQ:

Apt-get install-y rabbitmq-server

 

Install NTP service:

Apt-get install-y ntp

 

2.5. Others

 

Install other services:

Apt-get install-y vlan bridge-utils

 

Enable IP_Forwarding:

Sed-I's/# net. ipv4.ip _ forward = 1/net. ipv4.ip _ forward = 1/'/etc/sysctl. conf

# To save you from rebooting, perform thefollowing

Sysctl net. ipv4.ip _ forward = 1

 

# Make sysct l-p take effect immediately

 

2.6 Keystone

Install keystone

# Apt-get install-y keystone

Modify the database configuration of/etc/keystone. conf

Connection = mysql: // keystoneUser: keystone@10.10.10.51/keystone

Restart the keystone server to synchronize the database.

Service keystone restart

Keystone-manage db_sync

 

Fill the database with a script, you can download it from the Internet, and change the IP address Password as needed. The script is used to create tenants, users, and service listening ports, as shown below:

Wget https://raw.github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/OVS_MultiNode/KeystoneScripts/keystone_basic.sh

 

Wget https://raw.github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/OVS_MultiNode/KeystoneScripts/keystone_endpoints_basic.sh

 

The script content is as follows:

Root @ control :~ # Catkeystone_endpoints_basic.sh

#! /Bin/sh

#

# Keystone basic Endpoints

 

# Mainly converted red byhttps: // github.com/openstack/keystone/blob/master/tools/sample_data.sh

 

# Modified by Bilel Msekni/InstitutTelecom

#

# Support: openstack@lists.launchpad.net

# License: Apache Software License (ASL) 2.0

#

 

# Host address

HOST_IP = 10.10.10.51

EXT_HOST_IP = 172.16.10.200

 

# MySQL definitions

MYSQL_USER = keystone

MYSQL_DATABASE = keystone

MYSQL_HOST = $ HOST_IP

MYSQL_PASSWORD = keystone

 

# Keystone definitions

KEYSTONE_REGION = RegionOne

Export SERVICE_TOKEN = ADMIN

Export SERVICE_ENDPOINT = "http: // $ {HOST_IP}: 35357/v2.0"

 

While getopts "u: D: p: m: K: R: E: T: ku" opt; do

Case $ opt in

U)

MYSQL_USER = $ OPTARG

;;

D)

MYSQL_DATABASE = $ OPTARG

;;

P)

MYSQL_PASSWORD = $ OPTARG

;;

M)

MYSQL_HOST = $ OPTARG

;;

K)

MASTER = $ OPTARG

;;

R)

KEYSTONE_REGION = $ OPTARG

;;

E)

Export SERVICE_ENDPOINT = $ OPTARG

;;

T)

Export SERVICE_TOKEN = $ OPTARG

;;

V)

Set-x

;;

H)

Cat <

Usage: $0 [-m mysql_hostname] [-umysql_username] [-D mysql_database] [-p mysql_password]

[-K keystone_master] [-R keystone_region] [-E keystone_endpoint_url]

[-T keystone_token]

 

Add-v for verbose mode,-h to display thismessage.

EOF

Exit 0

;;

\?)

Echo "Unknown option-$ OPTARG"> & 2

Exit 1

;;

:)

Echo "Option-$ OPTARG requires an argument"> & 2

Exit 1

;;

Esac

Done

 

If [-z "$ KEYSTONE_REGION"]; then

Echo "Keystone region not set. Please set with-R option or setKEYSTONE_REGION variable."> & 2

Missing_args = "true"

Fi

 

If [-z "$ SERVICE_TOKEN"]; then

Echo "Keystone service token not set. Please set with-T option orset SERVICE_TOKEN variable."> & 2

Missing_args = "true"

Fi

 

If [-z "$ SERVICE_ENDPOINT"]; then

Echo "Keystone service endpoint not set. Please set with-E optionor set SERVICE_ENDPOINT variable."> & 2

Missing_args = "true"

Fi

 

If [-z "$ MYSQL_PASSWORD"]; then

Echo "MySQL password not set. Please set with-p option or setMYSQL_PASSWORD variable."> & 2

Missing_args = "true"

Fi

 

If [-n "$ missing_args"]; then

Exit 1

Fi

 

Keystone service-create -- name nova -- typecompute -- description 'openstack Compute Service'

Keystone service-create -- name cinder -- type volume -- description 'openstack Volume Service'

Keystone service-create -- name glance -- type image -- description 'openstack Image Service'

Keystone service-create -- name keystone -- type identity -- description 'openstack Identity'

Keystone service-create -- name ec2 -- typeec2 -- description 'openstack EC2 Service'

Keystone service-create -- name quantum -- type network -- description 'openstack Networking Service'

 

Create_endpoint (){

Case $1 in

Compute)

Keystone endpoint-create -- region $ KEYSTONE_REGION -- service-id $2 -- publicurl 'HTTP: // '"$ EXT_HOST_IP"': 8774/v2/$ (tenant_id) s '-- adminurl 'HTTP: //' "$ HOST_IP" ': 8774/v2/$ (tenant_id) s' -- internalurl 'HTTP: //' "$ HOST_IP "': 8774/v2/$ (tenant_id) s'

;;

Volume)

Keystone endpoint-create -- region $ KEYSTONE_REGION -- service-id $2 -- publicurl 'HTTP: // '"$ EXT_HOST_IP"': 8776/v1/$ (tenant_id) s '-- adminurl 'HTTP: //' "$ HOST_IP" ': 8776/v1/$ (tenant_id) s' -- internalurl 'HTTP: //' "$ HOST_IP "': 8776/v1/$ (tenant_id) s'

;;

Image)

Keystone endpoint-create -- region $ KEYSTONE_REGION -- service-id $2 -- publicurl 'HTTP: // '"$ EXT_HOST_IP"': 9292/'-- adminurl 'HTTP: // '"$ HOST_IP"': 9292/'-- internalurl 'HTTP: //' "$ HOST_IP" ': 9292 /'

;;

Identity)

Keystone endpoint-create -- region $ KEYSTONE_REGION -- service-id $2 -- publicurl 'HTTP: // '"$ EXT_HOST_IP"': 5000/v2.0 '-- adminurl 'HTTP: // '"$ HOST_IP"': 35357/v2.0 '-- internalurl 'HTTP: //' "$ HOST_IP" ': 5000/v2.0'

;;

Ec2)

Keystone endpoint-create -- region $ KEYSTONE_REGION -- service-id $2 -- publicurl 'HTTP: // '"$ EXT_HOST_IP"': 8773/services/cloud' -- adminurl 'HTTP: // '"$ HOST_IP"': 8773/services/admin' -- internalurl 'HTTP: // '"$ HOST_IP"': 8773/services/cloud'

;;

Network)

Keystone endpoint-create -- region $ KEYSTONE_REGION -- service-id $2 -- publicurl 'HTTP: // '"$ EXT_HOST_IP"': 9696/'-- adminurl 'HTTP: // '"$ HOST_IP"': 9696/'-- internalurl 'HTTP: //' "$ HOST_IP" ': 9696 /'

;;

Esac

}

 

For I in compute volume image object-storeidentity ec2 network; do

Id = 'mysql-h "$ MYSQL_HOST"-u "$ MYSQL_USER"-p "$ MYSQL_PASSWORD" "$ MYSQL_DATABASE"-ss-e "SELECTid FROM service WHERE type = '" $ I "'; "'| exit 1

Create_endpoint $ I $ id

Done

For more highlights, refer to the next page.: Http://www.linuxidc.com/Linux/2013-09/92122p2.htm

Reading:

Install and deploy Openstack http://www.linuxidc.com/Linux/2013-08/88184.htm on Ubuntu 12.10

Ubuntu 12.04 OpenStack Swift single-node deployment manual http://www.linuxidc.com/Linux/2013-08/88182.htm

OpenStack cloud computing quick start tutorial http://www.linuxidc.com/Linux/2013-08/88186.htm

Enterprise deployment OpenStack: http://www.linuxidc.com/Linux/2013-09/90428.htm of what should be done and what should not be done

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.