X

How To Install Apache Cloud Stack Management Server On Ubuntu 20.04

Now I want to share interesting post like open source cloud computing system. In this tutorial how to install Apache Cloud Stack Management server using Ubuntu 20.04. So let’s start this guide.

Private Cloud Setup Step By Step Using Apache Cloud Stack

How To Install Zabbix 5.0 On Ubuntu 20.04 Server

My server info:

Operating System: Ubuntu 20.04 LTS
IP Address  : 10.66.100.21
RAM   : 2GB
Disk   : 50GB
Service  : Apache Cloud Stack v4.15
Mysql   :Java   : 11 jdk
Host Name : cloud.technologyrss.local

Step #01: Configure hostname ip address for prepare server.

root@cloud:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
root@cloud:~# ip r

Check hosts file

root@cloud:~# cat /etc/hosts
127.0.0.1 localhost
10.66.100.21 cloud.technologyrss.local cloud

Check hostname file

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

Check static ip address setup

root@cloud:~# cat /etc/netplan/00-installer-config.yaml
network:
    ethernets:
         enp0s3:
            dhcp4: false
            addresses: [10.66.100.21/16]
            gateway4: 10.66.100.10
            nameservers:
                    addresses: [8.8.8.8,8.8.4.4]
    version: 2

Insert google dns server ip address into resolv.conf file.

nameserver 8.8.8.8

Step #02: Download required package for setup Apache Cloud Stack.

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

Add Apache Cloud Stack 4.15 repo.

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

Note: I am extremely sorry, When I create video then using ubuntu bionic. Please use this guide.

Install Apache Cloud Stack package.

root@cloud:~# apt-get install -y cloudstack-management cloudstack-usage

Open mysqld.cnf file for add some configuration.

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

Insert below all lines into mysqld.conf file.

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 using Press Esc, type :wq then press Enter.

Create or open cloudstack.conf file.

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

Insert below line into this file.

[mysqld]

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

Step #03: Configure Mysql database and create cloud database.

root@cloud:~# systemctl restart mysql
root@cloud:~# mysql -u root -p     // default root password is blank

Create root password and allow native password.

SELECT user,authentication_string,plugin,host FROM mysql.user;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'passw0rd';
use mysql;
UPDATE user SET plugin="mysql_native_password" WHERE User='root';
flush privileges;
\q

Now run Apache Cloud Stack Management setup command with root password.

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

Then check setup management command is ok.

root@cloud:~# cloudstack-setup-management

Now check management server log file

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

Wait at least few min….when done import default database and run properly web gui. Then access using below UI.

Step #04: Edit some global configuration if your cloud is private.

Old UI : http://10.66.100.21:8080/client/legacy/
New UI : http://10.66.100.21:8080/client/#/user/login?redirect=%2F

Default login

User  : admin
Password : password

Now setup some global configuration.

system.vm.use.local.storage  [ set false to -> true
ca.plugin.root.auth.strictness  [ set true to -> false
secstorage.allowed.internal.sites [ set local downlead iso web server or public server.

Must be restart cloudstack management service or you can reboot.

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

Step #05: Add local domain name for every each server.

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

Insert below line.

Domain = technologyrss.local  [ Both management and host server.

Then restart rpcbind and check port is ruuning.

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

Step #06: Download systemvm template on secondary storage.

Create secondary storage folder.

root@cloud:~# mkdir -p /mnt/secondary

Then mount nfs share folder.

root@cloud:~# mount -t nfs 10.66.100.14:/home/secondary /mnt/secondary

Then run template download command from Apache Cloud Stack server.

root@cloud:~# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloudstack.org/systemvm/4.15/systemvmtemplate-4.15.0-kvm.qcow2.bz2 -h kvm -F

When successfully done download and install then run below step.

root@cloud:~# umount /mnt/secondary         [ If you use Apache Cloud Stack Management server as nfs server so don’t remove this directory.

Remove created directory.

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

Then restart Apache Cloud Stack service.

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

Then access using server ip address or your local dns name.

http://10.66.100.21:8080/client/legacy/
http://10.66.100.21:8080/client/#/user/login?redirect=%2F

If you needed more help so please see my YouTube channel.

4 5 votes
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.

View Comments (6)

  • Please ensure the following ports are open for the management server to function properly : 8080 8250 8443 9090

  • Please tell me what network adapters are used in this if kvm is also installed on same node as in video you have made bonds.
    will cloudbr1 need hosts only adapter?

    • Not needed physical adapter on your kvm server, just needed one adapter and then configure it network settings. Thank you.

  • So you have configured three different machines for KVM, NFS and MGT server. IS there any tutorial in continuity oh how to add host further to this arrangement?

Leave a Comment