Multi-node Installation (for Ubuntu 18.04)

This page contains the instructions for an multi-node installation of CloudStack/Vines in Ubuntu Server 18.04 LTS. This installation mode can offer greater availability and performance compared to the all-in-one installation.

The following steps will guide you to prepare a single CloudStack Management Server (which contains the NFVO, VNFM, database and shared storages) and one or more separate CloudStack Hosts (where are deployed the VNFs instances and composed the SFCs). However, you can also adapt these steps to create large-scale deployments (with multiple management servers, multiple separate storage servers, etc.).

Warning: There is currently no fully stable version of CloudStack/Vines. For this reason, we do not recommend using it in a production deployment.

Contents:

CloudStack Management Server Installation

Perform steps 1 through 8 below on the machine that will act as Management Server.

Note: All commands must be run as root.

Step 1 - Install third-party software

CloudStack needs a SGDB, a storage server, and a system to synchronize the local clocks (using NTP). Run the following command to install the third-party software that provides these features.
apt-get -y update && apt-get -y upgrade
apt-get -y install mysql-server nfs-kernel-server openntpd

Step 2 - Configure the network

Note: Replace IP addresses according to your network configuration.
Rename the /etc/netplan/00-installer-config.yaml file to /etc/netplan/original-00-installer-config.yaml to save it as a backup.
mv /etc/netplan/00-installer-config.yaml /etc/netplan/original-00-installer-config.yaml
Use your preferred editor and open a new file /etc/netplan/00-installer-config.yaml. Add the content below to the file.
network:
    version: 2
    renderer: networkd
    ethernets:
        ens3:
            dhcp4: no
            dhcp6: no
            addresses: [192.168.122.10/24]
            gateway4: 192.168.122.1
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]
Apply the changes.
netplan --debbug apply
Associate the IP address with the hostname.
IP="192.168.122.10"
HOSTNAME=$(hostname -f)
sed -i -e "s/^127.0.1.1.*/$IP $HOSTNAME/" /etc/hosts

Step 3 - Install CloudStack Management

Download the CloudStack/Vines DEB files.
Note: These DEB files are built from the CloudStack/Vines git repository (forked from Apache).
wget http://www.inf.ufpr.br/jwvflauzino/vines/binary/cloudstack-deb.tar.gz
Extract files.
tar -zxvf cloudstack-deb.tar.gz
Install cloudstack-common.deb and cloudstack-management.deb.
apt -y install ./cloudstack-common_4.15.0.0.deb
apt -y install ./cloudstack-management_4.15.0.0.deb

Step 4 - Configure MySQL

Open the MySQL command line.
mysql
Type the commands below to create the root password.
Note: Replace <root-password> with your real root password.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<root-password>';
exit;
Use your preferred editor and open (or create) /etc/mysql/conf.d/cloudstack.cnf. Add the content below to the file.
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=350
server-id=master-01
log-bin=mysql-bin
binlog-format = 'ROW'
Restart MySQL.
service mysql restart
Deploy the database.
cloudstack-setup-databases cloud:<root-password>@localhost --deploy-as=root:<root-password>

Step 5 - Prepare NFS share

Create the /export/primary and /export/secondary directories for the NFS share.
mkdir -p /export/primary /export/secondary
Configure the new directories as NFS exports.
echo "/export *(rw,async,no_root_squash,no_subtree_check)" >> /etc/exports
Export the /export directory.
exportfs -a
Restart the nfs-kernel-server.
service nfs-kernel-server restart
Create the directories to mount the storages.
mkdir -p /mnt/primary /mnt/secondary
Run the commands below to add the export rules in the /etc/fstab file in order to make the mount automatic on system reboot.
Note: Replace the IP addresses according to your network configuration, if needed.
echo "192.168.122.10:/export/primary /mnt/primary nfs rsize=8192,wsize=8192,timeo=14,intr,vers=3,noauto 0 2" >> /etc/fstab
echo "192.168.122.10:/export/secondary /mnt/secondary nfs rsize=8192,wsize=8192,timeo=14,intr,vers=3,noauto 0 2" >> /etc/fstab
Mount the storages.
mount /mnt/primary
mount /mnt/secondary

Step 6 - Prepare the System VM Template

Run the command below to retrieve and decompress the system VM template.
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://cloudstack.apt-get.eu/systemvm/4.15/systemvmtemplate-4.15.0-kvm.qcow2.bz2 -h kvm -F
Umount the primary and secondary storages.
umount /mnt/primary
umount /mnt/secondary

Step 7 - Install CloudStack Primate

Primate is the new Apache CloudStack UI. Add the Primate tech-preview repository.
apt-key adv --keyserver keys.gnupg.net --recv-keys BDF0E176584DF93F
echo deb https://download.cloudstack.org/primate/testing/preview/debian / > /etc/apt/sources.list.d/cloudstack-primate-tech-preview.list
Install Primate.
apt-get update
apt-get install cloudstack-primate
Reboot the system.
reboot
Note: Wait a few minutes (one or two) before going to the next step.

Step 8 - Log Into Apache CloudStack

Open your Web browser and use the URL below to connect to CloudStack.
Note: Replace 192.168.122.10 with the IP of your CloudStack server if need be.
http://192.168.122.10:8080/client/primate
Note: Default credential is:
Username: admin
Password: password

CloudStack Host Installation

Perform steps 1 through 4 below on each machine that will act as a CloudStack Host.

Note: All commands must be run as root.

Step 1 - Install third-party software

apt-get -y update && apt-get -y upgrade
apt-get -y install bridge-utils openssh-server openntpd qemu-kvm libvirt-bin

Step 2 - Configure the network

Note: Replace IP addresses according to your network configuration.
Rename the /etc/netplan/00-installer-config.yaml file to /etc/netplan/original-00-installer-config.yaml to save it as a backup.
mv /etc/netplan/00-installer-config.yaml /etc/netplan/original-00-installer-config.yaml
Use your preferred editor and open a new file /etc/netplan/00-installer-config.yaml. Add the content below to the file.
network:
    version: 2
    renderer: networkd
    ethernets:
        ens3:
            dhcp4: no
            dhcp6: no

    bridges:
        cloudbr0:
            interfaces: [ens3]
            dhcp4: no
            dhcp6: no
            addresses: [192.168.122.11/24]
            gateway4: 192.168.122.1
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]
Apply the changes.
netplan --debbug apply
Associate the IP address with the hostname.
IP="192.168.122.11"
HOSTNAME=$(hostname -f)
sed -i -e "s/^127.0.1.1.*/$IP $HOSTNAME/" /etc/hosts

Step 3 -Allow root Login via SSH

Allow SSH access with root.
sed -i "s/#PermitRootLogin.*/PermitRootLogin yes/" /etc/ssh/sshd_config

Step 4 - Install and configure the CloudStack Agent

Download the CloudStack/Vines DEB files.
wget http://www.inf.ufpr.br/jwvflauzino/vines/binary/cloudstack-deb.tar.gz
Extract files.
tar -zxvf cloudstack-deb.tar.gz
Install the CloudStack Agent.
apt -y install ./cloudstack-common_4.15.0.0.deb
apt -y install ./cloudstack-agent_4.15.0.0.deb
Configure and restart the libvirt.
sed -i 's/#vnc_listen = "0.0.0.0"/vnc_listen = "0.0.0.0"/' /etc/libvirt/qemu.conf
service libvirt-bin restart
Reboot the system.
reboot

Next Steps

The installation is completed!

Configure your CloudStack/Vines installation

You can now access the CloudStack UI (see the Step 8 - Log Into Apache CloudStack) and configure them. In doing so, you must configure your CloudStack Management Server to manage all the resources that were prepared in the previous steps, including each CloudStack Host that you have prepared.

If you need more information about it, we recommend see the CloudStack documentation.

Use Vines features

Currently, all Vines features are accessed only through the CloudStack REST API. To learn how to use the Vines features, see the Vines Administration Guide. You can also see more about how the CloudStack REST API works in the Apache CloudStack API Documentation.