Posts Tagged 'CloudStack'

CloudStack Management Server Installation

CloudStack Version 4.0
OS Version Ubuntu Server 12.04, 64 bit
  1. Install Ubuntu Server 12.04, 64 bit, you can download it from
  2. Set root password using these commands
    1. a.      sudo su
    2. b.      Enter your password
    3. c.       passwd
    4. d.      Enter and confirm your password for root user
  3. Assign static IP address to Ethernet card with these commands
    1. a.      vim /etc/network/interfaces
    2. b.      Press insert button to change the editor to insert mode
    3. c.       Change

                                                  i.      auto eth0

                                                ii.      iface eth0 inet dhcp

  1. d.      To

                                                  i.      auto eth0

                                                ii.      iface eth0 inet static

                                              iii.      address

                                               iv.      netmask

                                                 v.      gateway

  1. e.       Restart network service

                                                  i.      /etc/init.d/networking restart

  1. Install SSH server to allow ssh access to this machine
    1. a.      apt-get install ssh
  2. Configure repository for CloudStack
    1. vim /etc/apt/sources.list.d/cloudstack.list
    2. b.      Write to file

                                                  i.      deb precise 4.0

  1. c.       Save the file
  2. d.      wget -O – | apt-key add –
  3. e.       apt-get update
  4. Install NTP server
    1. a.      apt-get install openntpd
  5. wget
  6. Copy vhd-util
    1. a.      mkdir -p /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/
    2. b.      cp  vhd-util /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util
  7. 9.     apt-get install cloud-client
  8. Install mysql database
    1. a.      apt-get install mysql-server
    2. b.      Mysql will ask password, write it when prompt
    3. c.       ufw allow mysql
    4. d.      vim /etc/mysql/my.cnf
    5. e.       At the end of file, add the following lines

                                                   i.      innodb_rollback_on_timeout=1

                                                 ii.      innodb_lock_wait_timeout=600

                                               iii.      max_connections=350

                                                iv.      log-bin=mysql-bin

                                                  v.      binlog-format = ‘ROW’

  1. f.         Save file
  2. g.       Restart mysql

                                                   i.      service mysql restart

  1. Grant Rights
    1. a.      mysql –u root –p
    2. b.      Enter password
    3. c.       GRANT all privileges on *.* to ‘root’@’%’ identified by ‘password’;
    4. d.      flush privileges;
    5. e.       quit;
  2. Deploy database using
    1. a.      cloud-setup-databases cloud:password@localhost –deploy-as=root:password
  3. Setup NFS
    1. a.      mkdir -p /export/primary
    2. b.      mkdir -p /export/secondary
    3. c.       apt-get install nfs-kernel-server
    4. d.      vim /etc/exports
    5. e.       Write

                                                   i.      /export *(rw,async,no_root_squash)

  1. f.        Save file
  2. g.      exportfs –a
  3. h.      vim /etc/idmapd.conf

                                                   i.      uncomment Domain, this domain should be same on both management server and host

  1. i.        Save file
  2. Reboot machine
  3. cloud-setup-management to start management server
  4. For XenServer
    1. a.      /usr/lib/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u -h xenserver -F
  5. For KVM
    1. a.      /usr/lib/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u -h kvm -F
  6. Congratulations, your CloudStack management server is ready