CentOS 6.x apache cloudstack setup
From Notes_Wiki
<yambe:breadcrumb>CentOS_6.x_cloudstack|CentOS 6.x cloudstack</yambe:breadcrumb>
CentOS 6.x apache cloudstack setup
For easier cloudstack setup allocate following resources or use following steps:
- Hardware virtualization enabled host
- CentOS 6.X fully installed on the host
- Current host network should use static IP and avoid DHCP
- 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
- Configure hostname in /etc/sysconfig/network. Add same in /etc/hosts. Also do "service network restart" for changes to take effect.
- Disable SELinux
- Configure time synchronization with a global or local NTP server
- Configure cloudstack repository using:
- [cloudstack]
- name=cloudstack
- baseurl=http://cloudstack.apt-get.eu/centos/6/4.8/
- enabled=1
- gpgcheck=0
- We will create both /primary and /secondary storage over NFS using:
- yum -y install nfs-utils
- mkdir /primary
- mkdir /secondary
- edit /etc/exports to have
- /secondary *(rw,async,no_root_squash,no_subtree_check)
- /primary *(rw,async,no_root_squash,no_subtree_check)
- 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
- 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
- Restart various services and enable them on startup
- service iptables restart
- service rpcbind start
- service nfs start
- chkconfig rpcbind on
- chkconfig nfs on
- Install and configure MySQL database using:
- yum -y install mysql-server
- 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'
- ;
- Restart and enable services using:
- service mysqld start
- chkconfig mysqld on
- yum -y install cloudstack-management
- cloudstack-setup-databases cloud:password@localhost --deploy-as=root
- cloudstack-setup-management
- Note if the servlet container is Tomcat7 the argument –tomcat7 must be used.
- 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
- Setup cloud-stack agent using steps mentioned at CentOS 6.x apache cloudstack agent setup
- You should be able to access management interface at http://<management-IP-or-FQDN>:8080/ using admin:password
- 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.
- 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
- Setup cluster, example values (taken from reference links) are:
- Name
- We’ll use Cluster1
- Hypervisor
- Choose KVM
- Add the first host to the cloud using IP address, root username and root password
- 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
- 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
- Import OS/ISO and template after referring to CentOS 6.x apache cloudstack troubleshooting and deploy a few test VMs
Refer: