Click here to load reader

CloudStack Installation on Ubuntu

  • View
    1.788

  • Download
    7

Embed Size (px)

Text of CloudStack Installation on Ubuntu

  • 1.CloudStack Installation on Ubuntu G02357004 2013/11/8

2. CloudStack Installation on Ubuntu ......................................................................................................................................... 2 ................................................................................................................................. 3 ................................................................................................................................. 5 CloudStack Installation on Ubuntu ........................................................................... 6 1...................................................................................................................... 62. Management Server ........................................................................................... 83. KVM Host .............................................................................. 19: ................................................................................................................. 251 3. CloudStack Installation on Ubuntu CloudStack Java (IAAS) hypervisors KVMXenServerVMwareOracle VMXen CloudStack CloudStack CloudStack GPL Cloud.com Citrix 2011 7 Citrix Cloud.com CloudStack 100% Apache CloudStack GoDaddy CloudStack OpenStack CloudStack Amazon AWS API AWS 2 4. CloudStack Installation on Ubuntu CloudStack CloudStack IP CloudStack () ( KVM hypervisor )3 5. CloudStack Installation on Ubuntu management sever (ubuntu-12.04.3 + CloudStack-4.0 ) Hypervisor(XenServer 6.0.2)4 6. CloudStack Installation on Ubuntu CPUIntel Core i3 M350 2.27GHzRAM4 GB * 2HD128 SSDNetwork100M/1000M bps EthernetOSWindows7_64-bitVM PlatformVMware Workstation10.0.0 build-1295980VM Guest OSubuntu-12.04.3-desktop-amd64VMRAM1.6GBVM HD20GB5 7. CloudStack Installation on UbuntuCloudStack Installation on Ubuntu 1. (1) $ sudo gedit /etc/apt/sources.list deb http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise-proposed main restricted universe multiverse deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse http://cloudstack.apache.org/downloads.html (2) CloudStack $ sudo vi /etc/apt/sources.list.d/cloudstack.list deb http://cloudstack.apt-get.eu/ubuntu precise 4.06 8. CloudStack Installation on Ubuntu (3) public key trusted keys $ wget -O - http://cloudstack.apt-get.eu/release.asc|sudo apt-key add -(4) local apt cache$sudo apt-get updateDEB package repository 7 9. CloudStack Installation on Ubuntu2. Management Server (1) NTP $ sudo apt-get install openntpd (2) CloudStack Management Server$ sudo apt-get install cloud-client(3) cloud sudo 8 10. CloudStack Installation on Ubuntu CloudStack cloud sudo root ()(4) sudo $ sudo vi /etc/sudoers %sudo ALL=(ALL:ALL) NOPASSWD:ALL(5) root :cloudstack CloudStack root SSH Agent$ sudo -i $passwd9 11. CloudStack Installation on Ubuntu(6) vhd-util XenServer $ sudo wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util (7) vhd-util(for Ubuntu)$ sudo mv vhd-util /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/ (8) (mysql) CloudStack MySQL MySQL MySQL CloudStack MySQL 5.1 5.5 RHEL/CentOS Ubuntu $ sudo apt-get install mysql-server:cloudstack 10 12. CloudStack Installation on Ubuntu11 13. CloudStack Installation on Ubuntu MySQL $ sudo vi /etc/mysql/my.cnf [mysqld] innodb_rollback_on_timeout=1 innodb_lock_wait_timeout=600 max_connections=350 log-bin=mysql-bin binlog-format = 'ROW' MySQL$ sudo service mysql restart12 14. CloudStack Installation on Ubuntu cloud$ sudo cloud-setup-databases cloud:[email protected] --deployas=root:cloudstack -e file -m cloudstack -k cloudstack : cloud-setup-databases cloud:< cloud >@localhost --deploy-as=root: (5) Ubunturoot (8) MySQL root (9) NFS CloudStack Primary Secondary Storage NFS $ sudo apt-get install nfs-common nfs-kernel-server $ sudo mkdir -p /export/primary $ sudo mkdir -p /export/secondary NFS 13 15. CloudStack Installation on Ubuntu$ sudo vi /etc/exports /export *(rw,async,no_root_squash,no_subtree_check) (,,)14 16. CloudStack Installation on Ubuntu $ sudo exportfs -a NFS $ sudo mkdir /mnt/primary $ sudo mount -t nfs 192.168.132.134:/export/primary /mnt/primary $ sudo mkdir /mnt/secondary $ sudo mount -t nfs 192.168.132.134:/export/secondary /mnt/secondary df -h 15 17. CloudStack Installation on Ubuntu $ sudo vi /etc/fstab 192.168.132.134:/export/primary /mnt/primary nfs rw,tcp,intr 0 1 192.168.132.134:/export/secondary /mnt/secondary nfs rw,tcp,intr 0 116 18. CloudStack Installation on Ubuntu (10) kvm sudo /usr/lib/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/actonsystemvm-02062012.qcow2.bz2 -h kvm -F Successfully installed system VM template to /mnt/secondary/template/tmpl/ 1 / 3 /17 19. CloudStack Installation on Ubuntu18 20. CloudStack Installation on Ubuntu3. KVM Host (1) agent$ sudo apt-get install cloud-agent (2) libvirt live migration ,libvirt TCP libvirt DNS /etc/libvirt/libvirtd.conf $ sudo vi /etc/libvirt/libvirtd.conf listen_tls = 0 listen_tcp = 1 tcp_port = " 16509 " auth_tcp = " none "mdns_adv = 0 $ cat /etc/libvirt/libvirtd.conf | grep -v '#' | grep -v "^$" 19 21. CloudStack Installation on Ubuntu$ sudo vi /etc/init/libvirt-bin.conf env libvirtd_opts= " -d -l " $ sudo vi /etc/libvirt/qemu.conf vnc_listen = " 0.0.0.0 " $ sudo service libvirt-bin restart (3) Security Policies CloudStack AppArmor(Ubuntu) SELinux(RHEL CentOS) Agent 20 22. CloudStack Installation on Ubuntu Apparmor (Ubuntu) AppArmor Ubuntu AppArmor $ dpkg --list 'apparmor' libvirt AppArmor profiles$ ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/ $ ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/ $ apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd $ apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper (4) TCP : 1. 22 (SSH) 2. 179821 23. CloudStack Installation on Ubuntu 3. 16509 (libvirt) 4. 5900 - 6100 (VNC consoles) 5. 49152 - 49216 (libvirt live migration) Ubuntu UFW(Uncomplicated FireWall) sudo ufw allow proto tcp from any to any port 22 sudo ufw allow proto tcp from any to any port 80 sudo ufw allow proto tcp from any to any port 1798 sudo ufw allow proto tcp from any to any port 16509 sudo ufw allow proto tcp from any to any port 5900 : 6100 sudo ufw allow proto tcp from any to any port 49152 : 49216 (5) $ sudo /etc/init.d/tomcat6 stop $ sudo update-rc.d -f tomcat6 remove(6) cloud-management $ cd ~ $sudo /etc/init.d/cloud-management restart 8080 listen $ netstat -an | grep 808022 24. CloudStack Installation on Ubuntu(7) http://{IP}:8080/client/ CloudStack admin/password admin password log file /var/log/cloud/management/management-server.log ssh 23 25. CloudStack Installation on Ubuntu$ sudo apt-get install openssh-server tomcat$ sudo /etc/init.d/cloud-management restartcheck log ERROR [cloud.servlet.CloudStartupServlet] (main:null) Exception starting management server com.cloud.utils.exception.CloudRuntimeException: Failed to inject generated public key into systemvm iso sudo: no tty present and no askpass program specifiedSorry, try again.sudo: no tty present and no askpass program specifiedSorry, try again.sudo: no tty present and no askpass program specifiedSorry, try again.sudo: 3 incorrect password attemptsmkdir $ cloud-setup-management24 26. CloudStack Installation on Ubuntu:1. http://www.cnblogs.com/skyme/p/3135458.html 2. http://jimmy1p4204.pixnet.net/blog/post/47762506 3. http://heylinux.com/archives/2093.html 4. http://mail-archives.apache.org/mod_mbox/cloudstack-userscn/201305.mbox/%[email protected] ysu.edu.cn%3E5. http://cloudstack.apache.org/docs/zh-TW/Apache_CloudStack/4.1.0/htmlsingle/Developers_Guide/index.html#deployment-architecture-overview6. cloudstack4.0.1 http://www.cloudstack-china.org/2013/10/2063.html 25 27. CloudStack Installation on Ubuntu26