All-in-one Installation (for Ubuntu 20.04)

This page contains the instructions for an all-in-one installation of CloudStack/Vines in Ubuntu Server 20.04 LTS. It is for testing or trial purpose only.

Alert: we do not recommend it for a production deployment.
Note: set a password for the root user, it will be used in some steps.

Step 1 - Install dependencies

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bridge-utils openssh-server openntpd genisoimage python3-pip mysql-server nfs-kernel-server qemu-kvm libvirt-daemon-system libvirt-clients

Step 2 - Configure the network

Note:Please 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.
sudo 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:
        enp1s0:
            dhcp4: no
            dhcp6: no

    bridges:
        cloudbr0:
            interfaces: [enp1s0]
            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.
sudo netplan --debbug apply
Associate the IP address with the hostname.
IP="192.168.122.10"
HOSTNAME=$(hostname -f)
sudo sed -i -e "s/^127.0.1.1.*/$IP $HOSTNAME/" /etc/hosts
Allow SSH access with root.
sudo sed -i "s/#PermitRootLogin.*/PermitRootLogin yes/" /etc/ssh/sshd_config

Step 3 - Install CloudStack Management

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 cloudstack-common and cloudstack-management.
sudo apt install ./cloudstack-common_4.*
sudo apt install ./cloudstack-management_4.*

Step 4 - Configure MySQL

Open the MySQL command line.
sudo mysql -u root -p
Type the commands below to create the root password.
Note: Replace <root-password> with your actual 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.
sudo service mysql restart
Deploy the database.
sudo 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.
sudo mkdir -p /export/primary /export/secondary
Configure the new directories as NFS exports.
sudo echo "/export *(rw,async,no_root_squash,no_subtree_check)" | sudo tee -a /etc/exports
Export the /export directory.
sudo exportfs -a
Restart the nfs-kernel-server.
sudo service nfs-kernel-server restart
Create the directories to mount the storages.
sudo mkdir -p /mnt/primary /mnt/secondary
Create the directories to store the VNF Packages.
sudo mkdir -p /var/cloudstack-vnfm/vnfp_repository
sudo chmod 777 -R /var/cloudstack-vnfm/vnfp_repository

Step 6 - Prepare the System VM Template

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.
sudo echo "192.168.122.10:/export/primary /mnt/primary nfs rsize=8192,wsize=8192,timeo=14,intr,vers=3,noauto 0 2" | sudo tee -a /etc/fstab
sudo echo "192.168.122.10:/export/secondary /mnt/secondary nfs rsize=8192,wsize=8192,timeo=14,intr,vers=3,noauto 0 2" | sudo tee -a /etc/fstab
Mount the storages.
sudo mount /mnt/primary
sudo mount /mnt/secondary

Step 7 - Install and configure the CloudStack Agent

Install the CloudStack Agent.
sudo apt install ./cloudstack-agent_4.*
Configure and restart the libvirt.
sudo sed -i 's/#vnc_listen = "0.0.0.0"/vnc_listen = "0.0.0.0"/' /etc/libvirt/qemu.conf
sudo systemctl restart libvirtd.service
Run the command below to retrieve and decompress the system VM template.
sudo /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://cloudstack.apt-get.eu/systemvm/4.18/systemvmtemplate-4.18.0-kvm.qcow2.bz2 -h kvm -F
Umount the primary and secondary storages.
sudo umount /mnt/primary
sudo umount /mnt/secondary

Step 8 - Reboot the system

Reboot the system.
sudo reboot

Step 9 - 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
Note: Default credential is:
Username: admin
Password: password

Next Steps

The installation is completed!

Configure your CloudStack/Vines installation

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

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

Using Vines features

Vines features can now be accessed via CloudStack UI! You can manage the VNF Catalog (add, edit, and delete VNF Packages), deploy VNF instances, start/stop network functions (i.e., the network software running inside VMs), etc.

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.

Note: Currently, SFC features are only accessed via CloudStack REST API.