Installation and Configuration of Apache Cloud Stack

From PheonixSolutions
Jump to navigation Jump to search

Installation and Configuration of Apache Cloud Stack

[edit]

Prerequisite

1. DC should provide the servers in the same private network
2. Each server should have a VLAN trunk switch to get internal connectivity in the cluster

3. Requires management server and Hypervisors (number of servers can be varied based on the requirement model)

4. We can use external storage or local storage. For the external storage, we require additional servers
5. Minimum system requirement

Cloud Stack server(management + Storage): 23.106.254.148

Host (kvm node): 23.106.254.174

Setup management server

[edit]

1. Configure the hostname in the management server

  hostnamectl set-hostname newhostname

2. Add Google DNS server IP address into resolv.conf file

 vi /etc/resolv.conf

nameserver 8.8.8.8

nameserver 4.4.4.4

3. Download the required package for the setup Apache Cloud Stack

  echo deb http://download.cloudstack.org/ubuntu focal 4.18 > /etc/apt/sources.list.d/cloudstack.list
  wget -O - https://download.cloudstack.org/release.asc |sudo tee /etc/apt/trusted.gpg.d/cloudstack.asc

4. Install the Apache Cloud Stack package

 apt-get install -y cloudstack-management cloudstack-usage wget chrony ntp mysql-connector-python

5. Install Mysql service and edit the my.cnf file as mentioned

  sudo apt install mysql-server
  vi /etc/mysql/my.cnf

++++++
[mysqld]

innodb_rollback_on_timeout=1

innodb_lock_wait_timeout=600

max_connections=350

log-bin=mysql-bin

binlog-format = 'ROW'

++++++++

 sudo systemctl restart mysql

6. Configure Mysql database and create cloud database

 mysql -u root -p
 >> 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;

7. Ensure that Java 11 is installed

8. Run the Apache Cloud Stack Management setup command with the root password

cloudstack-setup-databases DBuser:DB-password@localhost --deploy-as=root:ROOT-PASSWD -k phe0nixs0lutions -i 23.106.254.148

9. Verify the management setup

cloudstack-setup-management

Output:

OK

Setup Storage server

[edit]

Setup Hypervisor(KVM server)

[edit]

Install packages:

apt install chrony, cloudstack-agent

Install and Configure libvirt

[edit]

Configure the Networking

[edit]

Access the Management and Add host

[edit]

URL: http://23.106.254.148:8080/client/

Add the KVM host by referring: https://docs.cloudstack.apache.org/en/latest/installguide/configuration.html#adding-a-host

Additional Info

[edit]

To use the master instance(the management server) as the Internet gateway for the private network, we need to set it up as a Linux Router and use it while setting up POD. Refer: https://kifarunix.com/configure-ubuntu-20-04-as-linux-router/