Deploy kanyun in OpenStack

Source: Internet
Author: User
Tags cassandra openstack swift

Deploy kanyun in OpenStack
Kanyun deployment

  • 1. configure all nodes
    • 1.1 install zmq
    • 1.2 install kanyun
  • 2. control node configuration
    • 2.1 install and configure cassandra
    • 2.2 start and configure kanyun
  • 3. computing node configuration
    • 3.1 start and configure kanyun
1. Install zmq on all nodes 1.1 and install zerozmq (2.2.0)
  1. Yum install libtool autoconf automake
  2. Yum install uuid-devel
  3. Yum install libuuid-devel
  4. Wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
  5. Tar zxvf zeromq-2.2.0.tar.gz & cd zeromq-2.2.0 &./configure & make install
  6. Ldconfig
Install pyzmq
  1. Easy_install "pyzmq = 2.2.0"
  2. If libzmq. so.1 is missing, it may be that the link library is not correctly configured.
  3. Sudo/sbin/ldconfig-v Grep libzmq
  4. If libzmq. so.1-> libzmq. so.1.0.1 is not available, modify/etc/ld. so. conf, add/usr/local/lib at the end, and then ldconfig-v Grep libzmq
  5. If Python. h is missing, use yum install python-devel to install
1.2 install kanyun to download code

Kanyun's original code has a bug and cannot be used in python2.6 environment. below is what I changed

cd /optgit clone https://github.com/suyan/kanyun.git

Modification content:

  • Compatible with python2.6 and 2.7 (OrderedDict needs to be installed in python2.6)
  • Modify the method for obtaining memory information and calculating cpu usage
  • Fix bugs
Install
python /opt/kanyun/setup.py install
Create log directory
mkdir /var/log/kanyun
Install OrderedDict (python2.6)
easy_install OrderedDict
2. Control Node 2.1 install and configure cassandra download Cassandra
cd /optwget http://mirror.bit.edu.cn/apache/cassandra/0.8.10/apache-cassandra-0.8.10-bin.tar.gz
Extract
tar zxvf apache-cassandra-0.8.10-bin.tar.gz
Run
/opt/apache-cassandra-0.8.10/bin/cassandra
Create a database

Open a database using commands

/opt/apache-cassandra-0.8.10/bin/cassandra-cli -h 127.0.0.1

And execute the following command

CREATE keyspace DATA;USE DATA;CREATE COLUMN family vmnetwork WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family cpu WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family mem_max WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family mem_free WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family nic_incoming WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family nic_outgoing WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family blk_read WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';CREATE COLUMN family blk_write WITH column_type='Super' AND comparator='AsciiType' AND subcomparator='IntegerType' AND default_validation_class='AsciiType';assume vmnetwork KEYS AS ascii;assume cpu KEYS AS ascii;assume mem_max KEYS AS ascii;assume nic_incoming KEYS AS ascii;assume nic_outgoing KEYS AS ascii;assume blk_read KEYS AS ascii;assume blk_write KEYS AS ascii;assume mem_free KEYS AS ascii;       
Install pycassa support
easy_install pycassa

IfThe required version of distribute is not available

easy_install -U distribute
2.2 start and configure kanyun to configure/etc/kanyun. conf
  • Enter the ip address of the computing node for the host in the file.
  • SQL _connection: Enter the connection value in nova. conf.

Configuration File

[kanyun]log: /var/log/kanyun/kanyun.log[DEFAULT]sql_connection: mysql://nova:novamysqlpassword@controller/nova[server]host: 172.19.9.1 port: 5551db_host: 127.0.0.1log: /var/log/kanyun/kanyun-server.log[api]api_host: 172.19.9.1api_port: 5552db_host: 127.0.0.1log: /var/log/kanyun/kanyun-api.log[client]api_host: 172.19.9.1api_port: 5552log: /var/log/kanyun/kanyun-client.log 
Start the service
python /opt/kanyun/bin/kanyun-server &python /opt/kanyun/bin/kanyun-api &
3. Start and configure kanyun configuration for computing node 3.1/etc/kanyun. conf
  • In the api_host file, enter the ip address of the computing node.
  • SQL _connection: Enter the connection value in nova. conf.
  • Id set by node number

Configuration File

[kanyun]log: /var/log/kanyun/kanyun.log[DEFAULT]sql_connection: mysql://nova:novamysqlpassword@controller/nova[worker]id: worker1worker_timeout: 60dataserver_host: 172.19.9.1dataserver_port: 5551log: /var/log/kanyun/kanyun-worker.log[client]api_host: 172.19.9.1api_port: 5552log: /var/log/kanyun/kanyun-client.log
Start the service
python /opt/kanyun/bin/kanyun-worker &

The following is a collection of Openstack related knowledge for you to see if you like it:

Install and deploy Openstack on Ubuntu 12.10

Ubuntu 12.04 OpenStack Swift single-node deployment Manual

OpenStack cloud computing quick start tutorial

Deploying OpenStack for enterprises: what should be done and what should not be done

CentOS 6.5 x64bit quick OpenStack Installation

This article permanently updates the link address:

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.