Building Citrix Cloud Platform on CentOS for my Home Lab
Build Citrix Cloud Platform Server on CentOS
NOTE: this document is a first draft – this was a quick setup in a dev environment where the host, management and NFS services were all on the same box. I got it working, hopefully this helps anyone else trying to do the same.
‘#’ = type in and then run this command
‘FILE=’ = Edit this file in the listed location
ERROR: if you get this error try the following listed steps.
SELECT: = option to choose when offered list or running install script
Download CENT OS from CentOS mirror – http://mirrors.kernel.org/centos/6/
Do initial GUI config and then
Log into the box and do the following step by step
FILE= /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=52:54:00:B9:A6:C0
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=172.16.10.2
NETMASK=255.255.255.0
GATEWAY=172.16.10.1
DNS1=8.8.8.8
DNS2=8.8.4.4
#chkconfig network on
#service network start
ERROR:RETNETLINK answers: File Exists – #service network restart
FILE= /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
172.16.10.2 srvr1.cloud.priv
#hostname –fqdn
ERROR: check the above command returns the FDQN not an unknown error – if unknown
FILE= /etc/sysconfig/network – set the hostname to be that in your /etc/hosts file (ensure they match)
#service network restart
#setenforce 0
FILE= /etc/selinux/config
SELINUX=permissive
#yum –y update
#yum –y install ntp
#chkconfig ntpd on
#service ntpd start
START DIFFERENCES (xenserver vs apache cloud stack)
FILE= /etc/ntp.conf
server 0.xenserver.pool.ntp.org
server 1.xenserver.pool.ntp.org
server 2.xenserver.pool.ntp.org
server 3.xenserver.pool.ntp.org
download cloudstack platform 3.0.6-rhel6.3.tar.gz to the VM from mycitrix.com
mount the centOS DVD back to the VM that you used to install the device (according to citrix literature – this is required though it was never really called)
#mount –t iso9660 /dev/cdrom /media
Create local REPO
FILE= /etc/yum.repos.d/centosdvd.repo
[rhel]
name=rhel6
baseurl=file:///media
enabled=1
gpgcheck=0
# tar xzf Cloudstackplatform3.0.6-rhel6.3.tar.gz
# cd Cloudstackplatform3.0.6-rhel6.3.tar.gz
INSTALL THE CITRIX CLOUDPLATFORM MANAGEMENT TOOLS
# ./install.sh
SELECT: M
# service rpcbind start
# service nfs start
# chkconfig nfs on
# chkconfig rpcbind on
INSTALL CITRIX CLOUD MANAGEMENT DATABASE INTO MYSQL
#./install.sh
SELECT: D
FILE= /etc/my.cnf (/etc/mysql/my.cnf)
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
log-bin=mysql-bin
binlog-format = ‘ROW’
#service mysqld restart
# mysql –u root
#mysql> SET PASSWORD = PASSWORD(‘password’);
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION;
mysql> exit
#service mysqld restart
# iptables -I INPUT -p tcp –dport 3306 -j ACCEPT
FILE= /etc/sysconfig/iptables
-A INPUT -p tcp –dport 3306 -j ACCEPT
SETUP MYSQL CLOUD MANAGEMENT SCHEMA
# cloud-setup-databases cloud:@localhost –deploy-as=root:
#cloud-setup-management
SETUPNFS
# mkdir -p /export/primary
# mkdir -p /export/secondary
FILE
# vi /etc/exports
/export *(rw,async,no_root_squash)
# exportfs –a
FILE= vi /etc/sysconfig/nfs
LOCKD_TCPPORT=32803
LOCKD_UDPPORT=32769
MOUNTD_PORT=892
RQUOTAD_PORT=875
STATD_PORT=662
STATD_OUTGOING_PORT=2020
FILE= /etc/sysconfig/iptables
-A INPUT -m state –state NEW -p udp –dport 111 -j ACCEPT
-A INPUT -m state –state NEW -p tcp –dport 111 -j ACCEPT
-A INPUT -m state –state NEW -p tcp –dport 2049 -j ACCEPT
-A INPUT -m state –state NEW -p tcp –dport 32803 -j ACCEPT
-A INPUT -m state –state NEW -p udp –dport 32769 -j ACCEPT
-A INPUT -m state –state NEW -p tcp –dport 892 -j ACCEPT
-A INPUT -m state –state NEW -p udp –dport 892 -j ACCEPT
-A INPUT -m state –state NEW -p tcp –dport 875 -j ACCEPT
-A INPUT -m state –state NEW -p udp –dport 875 -j ACCEPT
-A INPUT -m state –state NEW -p tcp –dport 662 -j ACCEPT
-A INPUT -m state –state NEW -p udp –dport 662 -j ACCEPT
# service iptables restart
# service iptables save
FILE= /etc/idmapd.conf
Domain = company.com
TEST NFS SHARES
# mkdir /primarymount
# mount -t nfs :/export/primary /primarymount
# umount /primarymount
# mkdir /secondarymount
# mount -t nfs :/export/secondary /secondarymount
# umount /secondarymount
Download the system template
/usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -F
https://issues.apache.org/jira/browse/CLOUDSTACK-2758
chmod 777 catalina.out
REBOOT
DONE
Connect to http://IPADDRESS:8080/client
Login as: admin
Password: password
(if this doesn’t work – use #cloud-set-management again from the command line to reset)