CentOS 6.x apache cloudstack setup

From Notes_Wiki
Revision as of 13:01, 24 August 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 6.x > Virtualization tools > Cloudstack > CentOS 6.x apache cloudstack setup

For easier cloudstack setup allocate following resources or use following steps:

  1. Hardware virtualization enabled host
  2. CentOS 6.X fully installed on the host
  3. Current host network should use static IP and avoid DHCP
  4. Configure static IP using /etc/sysconfig/network-scripts without depending upon Network Manager to ensure that IP address is available on system-boot without requiring user login
  5. Configure hostname in /etc/sysconfig/network. Add same in /etc/hosts. Also do "service network restart" for changes to take effect.
  6. Disable SELinux
  7. Configure time synchronization with a global or local NTP server
  8. Configure cloudstack repository using:
    [cloudstack]
    name=cloudstack
    baseurl=http://cloudstack.apt-get.eu/centos/6/4.8/
    enabled=1
    gpgcheck=0
  9. We will create both /primary and /secondary storage over NFS using:
    1. yum -y install nfs-utils
    2. mkdir /primary
    3. mkdir /secondary
    4. edit /etc/exports to have
      /secondary *(rw,async,no_root_squash,no_subtree_check)
      /primary *(rw,async,no_root_squash,no_subtree_check)
    5. edit /etc/sysconfig/nfs with following values
      LOCKD_TCPPORT=32803
      LOCKD_UDPPORT=32769
      MOUNTD_PORT=892
      RQUOTAD_PORT=875
      STATD_PORT=662
      STATD_OUTGOING_PORT=2020
    6. Configure firewall to allow incoming network connecting by appending following lines to /etc/sysconfig/iptables appropriately
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p udp --dport 111 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p tcp --dport 111 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p tcp --dport 2049 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p tcp --dport 32803 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p udp --dport 32769 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p tcp --dport 892 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p udp --dport 892 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p tcp --dport 875 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p udp --dport 875 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p tcp --dport 662 -j ACCEPT
      -A INPUT -s 172.16.10.0/24 -m state --state NEW -p udp --dport 662 -j ACCEPT
    7. Restart various services and enable them on startup
      service iptables restart
      service rpcbind start
      service nfs start
      chkconfig rpcbind on
      chkconfig nfs on
  10. Install and configure MySQL database using:
    1. yum -y install mysql-server
    2. edit /etc/my.cnf to have
      innodb_rollback_on_timeout=1
      innodb_lock_wait_timeout=600
      max_connections=350
      log-bin=mysql-bin
      binlog-format = 'ROW'
      ;
    3. Restart and enable services using:
      service mysqld start
      chkconfig mysqld on
  11. yum -y install cloudstack-management
  12. cloudstack-setup-databases cloud:password@localhost --deploy-as=root
  13. cloudstack-setup-management
    Note if the servlet container is Tomcat7 the argument –tomcat7 must be used.
  14. Setup system template using:
    /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /secondary \
    -u http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2 -h kvm -F
    Here you can also download http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-kvm.qcow2.bz2 first and then give local path for setting up template
  15. Setup cloud-stack agent using steps mentioned at CentOS 6.x apache cloudstack agent setup
  16. You should be able to access management interface at http://<management-IP-or-FQDN>:8080/ using admin:password
  17. Setup zone, example values (taken from reference links) are
    Name
    we will set this to the ever-descriptive ‘Zone1’ for our cloud.
    Public DNS 1
    we will set this to ‘8.8.8.8’ for our cloud.
    Public DNS 2
    we will set this to ‘8.8.4.4’ for our cloud.
    Internal DNS1
    we will also set this to ‘8.8.8.8’ for our cloud.
    Internal DNS2
    we will also set this to ‘8.8.4.4’ for our cloud.
  18. Setup pod, example values (taken from reference links) are:
    Name
    We’ll use Pod1 for our cloud.
    Gateway
    We’ll use 172.16.10.1 as our gateway
    Netmask
    We’ll use 255.255.255.0
    Start/end reserved system IPs
    we will use 172.16.10.10-172.16.10.20
    Guest gateway
    We’ll use 172.16.10.1
    Guest netmask
    We’ll use 255.255.255.0
    Guest start/end IP
    We’ll use 172.16.10.30-172.16.10.200
  19. Setup cluster, example values (taken from reference links) are:
    Name
    We’ll use Cluster1
    Hypervisor
    Choose KVM
  20. Add the first host to the cloud using IP address, root username and root password
  21. Configure Primary storage, example values (taken from reference links) are:
    Name
    We’ll use ‘Primary1’
    Server
    We’ll be using the IP address 172.16.10.2
    Path
    Well define /primary as the path we are using
  22. Configure secondary storage, example values (taken from reference links) are:
    NFS server
    We’ll use the IP address 172.16.10.2
    Path
    We’ll use /secondary
  23. Import OS/ISO and template after referring to CentOS 6.x apache cloudstack troubleshooting and deploy a few test VMs


Refer:



Home > CentOS > CentOS 6.x > Virtualization tools > Cloudstack > CentOS 6.x apache cloudstack setup