edit · history · print

Manuals

https://help.ubuntu.com/8.04/serverguide/C/ubuntu-vm-builder.html

http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-8.10

Create image

For first logging make file named boot.sh:

  # This script will run the first time the virtual machine boots
  # It is ran as root.

  # Expire the user account
  passwd -e administrator

  # Install openssh-server
  apt-get update
  apt-get install -qqy --force-yes openssh-server

Partitions file vmbuilder.partion (Gb)

  root 6000
  swap 2000

Make image (Ubuntu 9.04 "Jaunty" )

  sudo ubuntu-vm-builder kvm jaunty --suite=intrepid --flavour=virtual -o --libvirt=qemu:///system --tmpfs=-  /
  --ip=192.168.122.101 --part=vmbuilder.partition --user=cell --name=Kalle --pass=qwerty --addpkg=vim-nox /
  --addpkg=unattended-upgrades --addpkg=acpid --firstboot=boot.sh /
  --mem=1024 --hostname=vm --cpus=1 --gw=192.168.122.3 --bridge=br0

Log in to VM (from head or pool machine.. depends routings)

  $ ssh 192.168.122.101

In /etc/network/interfces file comment all static inet lines and add

  iface eth0 inet dhcp

Installing gmond

  $ sudo apt-get install wget curl build-essential libapr1-dev libconfuse-dev libexpat1-dev python-dev;
  $ wget http://downloads.sourceforge.net/project/ganglia/ganglia%20monitoring%20core/3.1.7/ganglia-3.1.7.tar.gz?use_mirror=sunet&ts=1280245881
  $ tar zxvf ganglia-3.1.7.tar.gz
  $ cd ganglia-3.1.7
  $ ./configure --with-libpcre=no --sysconfdir=/etc/ganglia
  $ sudo make ; sudo make install

get gmond.conf file from SVN:

  $ svn co svn+ssh://neptune.hep.kbfi.ee/home/ilja/svnroot/autoscale/gmond.conf .

copy gmond.conf file into /etc/ganglia/gmond.conf

install Apache with php

  $ sudo apt-get install apache2 php5 libapache2-mod-php5 php5-cgi

install iostat

  $ sudo apt-get install sysstat

get IO stat ganglia add-on

  $ svn co svn+ssh://neptune.hep.kbfi.ee/home/ilja/svnroot/autoscale/disk_gmetric_bytes.sh .
  $ svn co svn+ssh://neptune.hep.kbfi.ee/home/ilja/svnroot/autoscale/run_disk_gmetric.sh .

Add /etc/rc.local file lines for running these deamons on startup (before "exit 0"):

  /usr/sbin/gmond
  /home/cell/run_disk_gmetric.sh &

Enable couchdb

  $ sudo apt-get install couchdb python-couchdb

To allow CouchDB to listen for external requests, modify the BindAddress in the /etc/couchdb/couch.ini file, and update any firewall settings as needed:

  ;original
  ;BindAddress=127.0.0.1
  ;modified
  BindAddress=0.0.0.0

Now lets run couchdb

  $ sudo /etc/init.d/couchdb restart

Now try couchdb:

  $ curl http://127.0.0.1:5984/

And the result should be something like that

   {"couchdb":"Welcome","version":"0.8.0-incubating"}

For more information using python with couchdb can read here: http://lethain.com/entry/2008/aug/18/an-introduction-to-using-couchdb-with-django/

edit · history · print
Page last modified on October 13, 2010, at 01:51 PM