OpenStackGrizzly multi-node deployment in Ubuntu12.04

Source: Internet
Author: User
Tags openstack swift openvswitch
I deploy three machines here. You can also expand the computing nodes horizontally. The following figure shows the network conditions: controlnode: eth0 (172.16.0.51), eth1 (192.168.8.51) networknode: eth0 (172.16.0.52 ), eth1 (10.10.10.52), eth2 (192.168.8.52) computenode: eth0 (172.16.0.53), eth1 (10.

I deploy three machines here. You can also expand the computing nodes horizontally. The following figure shows the network situation:

Control node: eth0 (172.16.0.51), eth1 (192.168.8.51)
Network node: eth0 (172.16.0.52), eth1 (10.10.10.52), eth2 (192.168.8.52)
Compute node: eth0 (172.16.0.53), eth1 (10.10.10.53)

Management Network: 172.16.0.0/16
Business Network: 10.10.10.0/24
External Network: 192.168.8.0/24
The following figure references mirantis:



Here, all the network cards of my three nodes are connected to a vswitch. Because I do not have a local apt source for Grizzly, the computing node also needs to go to the Internet apt-get package, so I will temporarily set a virtual Nic on the computing node for it to install the package.

Document update:

On the computing node, you can install nova-compute and nova-conductor on the 2013.04.01, while nova-conductor only needs to be installed on the control node. At the same time, it is found that after the network node restarts the machine, the eth2 Nic is not activated. You need to manually up and add the command to rc. local.

Directory

  • 1 Control Node
    • 1.1 Network Settings
    • 1.2 add source
    • 1.3 MySQL & RabbitMQ
    • 1.4 NTP
    • 1.5 Keystone
    • 1.6 Glance
    • 1.7 Cinder
    • 1.8 Quantum
    • 1.9 Nova
    • 1.10 Horizon
  • 2 network nodes
    • 2.1 network settings
    • 2.2 add source
    • 2.3 OpenVSwitch
    • 2.4 Quantum
  • 3. Computing nodes
    • 3.1 network settings
    • 3.2 add source
    • 3.3 OpenVSwitch
    • 3.4 Quantum
    • 3.5 Nova
  • 4. Start vm creation.
Control node network settings
cat /etc/network/interfacesauto eth0iface eth0 inet staticaddress 172.16.0.51netmask 255.255.0.0auto eth1iface eth1 inet staticaddress 192.168.8.51netmask 255.255.255.0gateway 192.168.8.1dns-nameservers 8.8.8.8
Add Source

Add a Grizzly source and upgrade the system

cat > /etc/apt/sources.list.d/grizzly.list << _GEEK_deb http://Ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly maindeb  http://ubuntu-cloud.archive.canonical.com/ubuntu precise-proposed/grizzly main_GEEK_apt-get updateapt-get upgradeapt-get install ubuntu-cloud-keyring
MySQL & RabbitMQ
  • Install MySQL:
apt-get install mysql-server python-mysqldb
  • Use sed to edit the/etc/mysql/my. cnf file to change the binding address (0.0.0.0) from the local host (127.0.0.1)
    Mysql is prohibited from performing domain name resolution to prevent mysql connection errors and slow remote connection to mysql.
    Then restart the mysql service.
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnfsed -i '44 i skip-name-resolve' /etc/mysql/my.cnf/etc/init.d/mysql restart
  • Install RabbitMQ:
apt-get install rabbitmq-server
NTP
  • Install the NTP service
apt-get install ntp
  • Configure synchronization between controller nodes on the NTP server compute node:
sed -i 's/server ntp.ubuntu.com/server ntp.ubuntu.com\nserver 127.127.1.0\nfudge 127.127.1.0 stratum 10/g' /etc/ntp.confservice ntp restart
  • Enable route forwarding
vim /etc/sysctl.confnet.ipv4.ip_forward=1
Keystone
  • Install Keystone
apt-get install keystone
  • Create and authorize the keystone database in mysql:
mysql -uroot -pcreate database keystone;grant all on keystone.* to 'keystone'@'%' identified by 'keystone';quit;
  • Modify the/etc/keystone. conf configuration file:
Admin_token = www. longgeek. comdebug = Trueverbose = True [SQL] connection = mysql: // keystone: keystone@172.16.0.51/keystone # Must be written under [SQL] [signing] token_format = UUID
  • Start keystone and synchronize the database
/etc/init.d/keystone restartkeystone-manage db_sync
  • Use scripts to import data:

Use scripts to create user, role, tenant, service, and endpoint. Download the script:

wget http://download.longgeek.com/openstack/grizzly/keystone.sh

Modify the script content:

ADMIN_PASSWORD =$ {ADMIN_PASSWORD:-password} # SERVICE_PASSWORD = $ {SERVICE_PASSWORD:-password} # nova, glance, cinder, quantum, swift's password export SERVICE_TOKEN = "www.longgeek.com" # tokenexport SERVICE_ENDPOINT = "http: // 172.16.0.51: 35357/v2.0" SERVICE_TENANT_NAME =$ {SERVICE_TENANT_NAME:-service} # tenant service, including nova, glance, ciner, quantum, swift and other services KEYSTONE_REGION = region = "172.16.0.51" # region = "172.16.0.51" SWIFT_IP = "172.16.0.51" # region = "172.16.0.51" COMPUTE_IP = $ region = $ Region = $ KEYSTONE_IP

Run the script:

sh keystone.sh
  • Set environment variables:

Here the variables are set in keystone. sh:

# Cat>/root/export. sh <_ GEEK_export OS _TENANT_NAME = admin # if it is set to service, other services cannot be verified. export OS _USERNAME = adminexport OS _PASSWORD = passwordexport OS _AUTH_URL = http: // 172.16.0.51: 5000/v2.0/export OS _REGION_NAME = RegionOneexport SERVICE_TOKEN = www. longgeek. comexport SERVICE_ENDPOINT = http: // 172.16.0.51: 35357/v2.0/_ GEEK _ # echo 'source/root/export. sh '>/root /. bashrc # source/root/export. sh
  • Verify the installation of keystone and perform a simple test:
apt-get install curl opensslcurl http://172.16.0.51:35357/v2.0/endpoints -H 'x-auth-token: www.longgeek.com' | python -mjson.tool

For more highlights, refer to the next page.: Http://www.linuxidc.com/Linux/2013-09/92123p2.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.