Saturday, November 3, 2012

CloudStack 2.14 + KVM + Openwitch + openflow (Part 2)


Part 2: Create bridge interface (use openvswitch bridge) for Cloud agent and configure agent.


Step 1: Create bridge interface for CloudStack.

Reference links: http://cloudstack.org/, http://openvswitch.org/

In part 1, I have introduced the basic installs for Host 1 and Host 2, in the second part I will introduce the network configuration on hosts to prepare for install Cloudstack and KVM.

Host 1 and Host 2 have 2 interface eth0 and eth1.

You must configure eth0 for manager interface (cloudbr0) => 10.0.0.2 for Host1 and 10.0.0.3 for Host2
                              eth1 for guest and public interface (cloudbr1)

You must perform the following commands on both Hosts:

Create parent bridge on openvswitch:
ovs-vsctl add-br br0

cloudbr0:
ovs-vsctl add-br cloudbr0 br0 => Create cloudbr0 bridge
ovs-vsctl add-port cloudbr0 eth0 => Add eth0 interface to cloudbr0 bridge
ifconfig cloudbr0 10.0.0.2/24 up => on Host1
ifconfig cloudbr0 10.0.0.3/24 up => on Host2

cloudbr1
ovs-vsctl add-br cloudbr1 br0 => Create cloudbr1 bridge
ovs-vsctl add-port cloudbr1 eth1 => Add eth1 interface to cloudbr1 bridge

You can check the bridge of openvswitch which ran with CloudStack by adding a bridge interface (br-ovs example):
brctl addbr br-ovs  => Ok with no error. If you see any error, please check compat module on OVS.

You have finished setup bridge interface on OVS for CloudStack Agent.

Step 2: Install CloudStack manager

Install Manager
Install the CloudStack packages. You should have a file in the form of CloudStack-NNNN.tar.gz. Untar the file and the run the install.

Choose "M" to install the Management server software.

Install Database
Run install.sh again and choose "D" to install MySQL
# ./install.sh
Setting up the temporary repository...
Cleaning Yum cache...
Loaded plugins: fastestmirror
11 metadata files removed
Welcome to the Cloud.com CloudStack Installer.  What would you like to do?

    A) Install the Agent
    S) Install the Usage Monitor
    D) Install the database server
    U) Upgrade the CloudStack packages installed on this computer
    R) Stop any running CloudStack services and remove the CloudStack packages from this computer
    Q) Quit

    > D

Edit the MySQL configuration (/etc/my.cnf) and insert the following lines in the [mysqld] section. You can put these lines below the datadir line.

innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350

Restart the MySQL service and configure it to start on boot

# service mysqld restart
# chkconfig mysqld on

Use the following script to create the cloud user on the database with a password of your choice. This script deploys the database using the credentials in the deploy-as parameters. By default on RHEL/CentOS/Fedora MySQL is installed with no root password. If you have set a password you will need to postpend that to the deploy-as parameter as in "--deploy-as=root:password

# cloud-setup-databases cloud:dbpassword@localhost --deploy-as=root
Final, you must run #cloud-setup-management


Part 3: Install and configure Agent with NFS storage and openvswitch bridge.



No comments:

Post a Comment