X

How To Install Apache Cloud Stack Management Server 4.14 On Ubuntu 16.04

In this tutorial how to install Apache Cloud Stack v4.14 on Ubuntu 16.04. Apache Cloud Stack is an open source cloud computing. This guide for only management server installation process.

Private Cloud Setup Step By Step Using Apache Cloud Stack

How To Install Zabbix 5.0 On Debian 10 Server

############################
OS type : Ubuntu 16.04 LTS
IP  : 10.66.11.20
RAM  : 2GB
DISK  : 50GB
vCPU  : 2 
Service : Apache Cloud Stack v4.14
Host  : cloud.technologyrss.local
Java : 11jdk
Mysql : 5.7
############################

Step #01: Check server version and ip address.

root@cloud:~# lsb_release -a && ip r
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial
default via 10.66.100.10 dev enp0s3 onlink
10.66.0.0/16 dev enp0s3  proto kernel  scope link  src 10.66.100.20

Must be add google name server for internet connectivity properly working.

root@cloud:~# cat /etc/resolv.conf
nameserver 8.8.8.8

Then server update and upgrade using below command.

root@cloud:~# apt update && apt upgrade -y
root@cloud:~# apt autoremove -y

Check hosts file using below command.

root@cloud:~# cat /etc/hosts
127.0.0.1 localhost
10.66.11.20 cloud.technologyrss.local cloud
10.66.11.19 nfs.technologyrss.local nfs
10.66.11.21 kvm.technologyrss.local kvm

Check hostname file using below command.

root@cloud:~# cat /etc/hostname
cloud

Step #02: Check network interface static IP address.

root@cloud:~# cat /etc/network/interfaces

As like below output.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet static
        address 10.66.100.20
        netmask 255.255.0.0
        gateway 10.66.100.10

Then reboot your server using below command.

root@cloud:~# reboot

After reboot server then add again google dns server ip on resolv.conf.

root@cloud:~# cat /etc/resolv.conf
nameserver 8.8.8.8

Step #03: Install dependency package Mysql database.

root@cloud:~# hostname --fqdn
root@cloud:~# ping cloudstack.apache.org
root@cloud:~# apt-get install -y openntpd openssh-server sudo vim htop tar intel-microcode bridge-utils mysql-server
root@cloud:~# add-apt-repository ppa:openjdk-r/ppa
root@cloud:~# apt-get update
root@cloud:~# apt-get install -y openjdk-11-jdk

Add Cloud Stack repo and then install it.

root@cloud:~# echo deb http://download.cloudstack.org/ubuntu xenial 4.14 / > /etc/apt/sources.list.d/cloudstack.list
root@cloud:~# wget -O - http://download.cloudstack.org/release.asc|apt-key add -
root@cloud:~# apt-get -y update
root@cloud:~# apt-get install -y cloudstack-management cloudstack-usage

Step #04: Configure Mysql database on Apache Cloud Stack.

root@cloud:~# vi /etc/mysql/mysql.conf.d/mysqld.cnf

Add all below lines into this file under [mysqld] section.

server_id = 1
sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_ENGINE_SUBSTITUTION"
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=1000
log-bin=mysql-bin
binlog-format = 'ROW'

Then save and exit. Press Esc type :wq then press Enter.

root@cloud:~# systemctl restart mysql

Step #05: Setup CloudStack database using below command.

root@cloud:~# cloudstack-setup-databases cloud:cloud@localhost --deploy-as=root:passw0rd

If you all all status is OK. 

Mysql user name:cloud                                                           [ OK ]
Mysql user password:******                                                      [ OK ]
Mysql server ip:localhost                                                       [ OK ]
Mysql server port:3306                                                          [ OK ]
Mysql root user name:root                                                       [ OK ]
Mysql root user password:******                                                 [ OK ]
Checking Cloud database files ...                                               [ OK ]
Checking local machine hostname ...                                             [ OK ]
Checking SELinux setup ...                                                      [ OK ]
Detected local IP address as 10.66.100.20, will use as cluster management server node IP[ OK   ]
Preparing /etc/cloudstack/management/db.properties                              [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database.sql             [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema.sql               [ OK ]
Applying /usr/share/cloudstack-management/setup/create-database-premium.sql     [ OK ]
Applying /usr/share/cloudstack-management/setup/create-schema-premium.sql       [ OK ]
Applying /usr/share/cloudstack-management/setup/server-setup.sql                [ OK ]
Applying /usr/share/cloudstack-management/setup/templates.sql                   [ OK ]
Processing encryption ...                                                       [ OK ]
Finalizing setup ...                                                            [ OK ]

CloudStack has successfully initialized database, you can check your database configuration in /etc/cloudstack/management/db.properties

Then run below command for check all is working fine.

root@cloud:~# cloudstack-setup-management
Starting to configure CloudStack Management Server:
Configure Firewall ... [OK]
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!

Check log file using below command.

root@cloud:~# tail -f /var/log/cloudstack/management/management-server.log

If you some error so must be check Java version using below command.

root@cloud:~# alternatives --config java

Wait at least few minute then access web url using your server ip address.

http://10.66.11.20:8080/client/

Default login as like below.

Username : admin
Password : password

Change some global configuration for private cloud system. After login go to Global configuration and search below config and change it.

system.vm.use.local.storage  [ set false to -> true
ca.plugin.root.auth.strictness  [ set true to -> false

Then must be restart ACS service.

root@cloud:~# /bin/systemctl stop cloudstack-management.service
root@cloud:~# /bin/systemctl start cloudstack-management.service

Step #06: Setup nfs connection and add local domain name.

root@cloud:~# vi /etc/idmapd.conf

Insert below line into idmapd.conf file.

Domain = technologyrss.local  [both management and host server]

Restart rpcbind service using below command.

root@cloud:~# service rpcbind restart
root@cloud:~# chkconfig rpcbind on
root@cloud:~# rpcinfo -p

Step #07: Storage server mount and systemvm download.

root@cloud:~# mkdir -p /mnt/secondary
root@cloud:~# mount -t nfs 10.66.100.19:/mnt/secondary /mnt/secondary
root@cloud:~# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloudstack.org/systemvm/4.14/systemvmtemplate-4.14.0-kvm.qcow2.bz2 -h kvm -F

Then umount mounted folder.

root@cloud:~# umount /mnt/secondary
root@cloud:~# rm -rf /mnt/secondary

Note: If you use Apache Cloud Stack Management server as nfs server so don’t remove this directory.

Restart Apache Cloud Stack service.

root@cloud:~# /bin/systemctl stop cloudstack-management.service
root@cloud:~# /bin/systemctl start cloudstack-management.service

If you have any problem, so please see my YouTube channel for details.

1 1 vote
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment