Skip to content
Snippets Groups Projects
Commit 379fc3bb authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/microk8s-deployment-vmware' into 'feat/microk8s-deployment'

Adds some preliminary documentation for setting up a VMWare VM

See merge request teraflow-h2020/controller!137
parents 16bf413c 57fa2654
No related branches found
No related tags found
1 merge request!54Release 2.0.0
# 1. Deployment Guide
This section walks you through the process of deploying TeraFlowSDN on top of a Oracle VirtualBox--based VM running
MicroK8s Kubernetes platform. The guide includes the details on configuring and installing the VM, installing and
configuring MicroK8s, and deploying and reporting the status of the TeraFlowSDN controller.
This section walks you through the process of deploying TeraFlowSDN on top of a Virtual Machine (VM) running MicroK8s
Kubernetes platform. The guide includes the details on configuring and installing the VM, installing and configuring
MicroK8s, and deploying and reporting the status of the TeraFlowSDN controller.
## Table of Content:
- [1.1. Create VM for the TeraFlowSDN controller](./1-1-create-vm.md)
......
## 1.1.1. Oracle VirtualBox
### 1.1.1.1. Create a NAT Network in VirtualBox
In "Oracle VM VirtualBox Manager", Menu "File > Preferences... > Network", create a NAT network with the following
specifications:
|Name |CIDR |DHCP |IPv6 |
|-----------|-----------|--------|--------|
|TFS-NAT-Net|10.0.2.0/24|Disabled|Disabled|
Within the newly created "TFS-NAT-Net" NAT network, configure the following IPv4 forwarding rules:
|Name|Protocol|Host IP |Host Port|Guest IP |Guest Port|
|----|--------|---------|---------|---------|----------|
|SSH |TCP |127.0.0.1|2200 |10.0.2.10|22 |
|HTTP|TCP |127.0.0.1|8080 |10.0.2.10|80 |
__Note__: IP address 10.0.2.10 is the one that will be assigned to the VM.
### 1.1.1.2. Create VM in VirtualBox:
- Name: TFS-VM
- Type/Version: Linux / Ubuntu (64-bit)
- CPU (*): 4 vCPUs @ 100% execution capacity
- RAM: 8 GB
- Disk: 40 GB, Virtual Disk Image (VDI), Dynamically allocated
- Optical Drive ISO Image: "ubuntu-20.04.4-live-server-amd64.iso"
(from [Ubuntu Server 20.04 LTS](https://releases.ubuntu.com/20.04/))
- Network Adapter 1 (*): enabled, attached to NAT Network "TFS-NAT-Net"
- Minor adjustments (*):
- Audio: disabled
- Boot otder: disable "Floppy"
__Note__: (*) settings to be editing after the VM is created.
### 1.1.1.3. Install Ubuntu 20.04 LTS Operating System
In "Oracle VM VirtualBox Manager", start the VM in normal mode, and follow the installation procedure. Below we provide
some installation guidelines:
- Installation Language: English
- Autodetect your keyboard
- Configure static network specifications:
|Interface|IPv4 Method|Subnet |Address |Gateway |Name servers |Search domains|
|---------|-----------|-----------|---------|--------|---------------|--------------|
|enp0s3 |Manual |10.0.2.0/24|10.0.2.10|10.0.2.1|8.8.8.8,8.8.4.4|<empty> |
- Leave proxy and mirror addresses as they are
- Let the installer self-upgrade (if asked). At the time of writing this walkthrough, the version of the installer is 22.06.1. Anyway, Ubuntu 20.04 LTS OS will be installed.
- Use an entire disk for the installation
- Disable setup of the disk as LVM group
- Double check that NO swap space is allocated in the partition table. Kubernetes does not work properly with SWAP.
- Configure your user and system names:
- User name: TeraFlowSDN
- Server's name: tfs-vm
- Username: tfs
- Password: tfs123
- Install Open SSH Server
- Import SSH keys, if any.
- Featured Server Snaps
- Do not install featured server snaps. It will be done manually later to illustrate how to uninstall and reinstall
them in case of trouble with.
- Let the system install and upgrade the packages.
- This operation might take some minutes depending on how old is the Optical Drive ISO image you use and your
Internet connection speed.
- Restart the VM when the installation is completed.
## 1.1.1.4. Upgrade the Ubuntu distribution
```bash
sudo apt-get update -y
sudo apt-get dist-upgrade -y
```
## 1.1.1.5. Install VirtualBox Guest Additions
On VirtualBox Manager, open the VM main screen. If you are running the VM in headless mode, right click over the VM in
the VirtualBox Manager window and click "Show". If a dialog informing about how to leave the interface of the VM is
hown, confirm pressing "Switch" button. The interface of the VM should appear.
Click menu "Device > Insert Guest Additions CD image..."
On the VM terminal, type:
```bash
sudo apt-get install -y linux-headers-$(uname -r) build-essential dkms
# This command might take some minutes depending on your VM specs and your Internet access speed.
sudo mount /dev/cdrom /mnt/
cd /mnt/
sudo ./VBoxLinuxAdditions.run
# This command might take some minutes depending on your VM specs.
sudo reboot
```
## 1.1.2. VMWare Fusion
### 1.1.2.1. Create VM in VMWare Fusion:
In "VMWare Fusion" manager, create a new network from the "Settings/Network" menu.
- Unlock to make changes
- Press the + icon and create a new network
- Change the name to TFS-NAT-Net
- Check "Allow virtual machines on this networkto connect to external network (NAT)"
- Do not check "Enable IPv6"
- Add port forwarding for HTTP and SSH
- Uncheck "Provide address on this network via DHCP"
Create a new VM an Ubuntu 20.04 iso:
- Display Name: TeraFlowSDN
- Username: tfs
- Password: tfs123
On the next screen press "Customize Settings", save the VM and in "Settings" change:
- Change to use 4 CPUs
- Change to access 8 GB of RAM
- Change disk to size 40 GB
- Change the network interface to use the previously created TFS-NAT-Net
Run the VM to start the installation.
### 1.1.2.2. Install Ubuntu 20.04 LTS Operating System
The installation will be automatic, without any configuration required.
- Configure the guest ip, gateway and DNS:
Using the Network Settings for the wired connection, set the IP to 10.0.2.10,
the mask to 255.255.255.0, the gatway to 10.0.2.2 and the DNS to 10.0.2.2.
- Disable and remove swap file:
$ sudo swapoff -a
$ sudo rm /swapfile
Then you can remove or comment the /swapfile entry in /etc/fstab
- Install Open SSH Server
- Import SSH keys, if any.
- Restart the VM when the installation is completed.
### 1.1.2.3. Upgrade the Ubuntu distribution
```bash
sudo apt-get update -y
sudo apt-get dist-upgrade -y
```
......@@ -5,96 +5,9 @@ TeraFlowSDN controller. If you already have a remote physical server fitting the
feel free to use it instead of deploying a local VM. Other virtualization environments can also be used; in that case,
you will need to adapt these instructions to your particular case.
Different Hypervisors are considered for that. Check the table of contents for available options. If you want to
contribute with other Hypervisors, [contact](./README.md#contact) the TFS team through Slack.
## 1.1.1. Create a NAT Network in VirtualBox
In "Oracle VM VirtualBox Manager", Menu "File > Preferences... > Network", create a NAT network with the following
specifications:
|Name |CIDR |DHCP |IPv6 |
|-----------|-----------|--------|--------|
|TFS-NAT-Net|10.0.2.0/24|Disabled|Disabled|
Within the newly created "TFS-NAT-Net" NAT network, configure the following IPv4 forwarding rules:
|Name|Protocol|Host IP |Host Port|Guest IP |Guest Port|
|----|--------|---------|---------|---------|----------|
|SSH |TCP |127.0.0.1|2200 |10.0.2.10|22 |
|HTTP|TCP |127.0.0.1|8080 |10.0.2.10|80 |
__Note__: IP address 10.0.2.10 is the one that will be assigned to the VM.
## 1.1.2. Create VM in VirtualBox:
In "Oracle VM VirtualBox Manager", create a new VM with the following specifications:
- Name: TFS-VM
- Type/Version: Linux / Ubuntu (64-bit)
- CPU (*): 4 vCPUs @ 100% execution capacity
- RAM: 8 GB
- Disk: 40 GB, Virtual Disk Image (VDI), Dynamically allocated
- Optical Drive ISO Image: "ubuntu-20.04.4-live-server-amd64.iso"
(from [Ubuntu Server 20.04 LTS](https://releases.ubuntu.com/20.04/))
- Network Adapter 1 (*): enabled, attached to NAT Network "TFS-NAT-Net"
- Minor adjustments (*):
- Audio: disabled
- Boot otder: disable "Floppy"
__Note__: (*) settings to be editing after the VM is created.
## 1.1.3. Install Ubuntu 20.04 LTS Operating System
In "Oracle VM VirtualBox Manager", start the VM in normal mode, and follow the installation procedure. Below we provide
some installation guidelines:
- Installation Language: English
- Autodetect your keyboard
- Configure static network specifications:
|Interface|IPv4 Method|Subnet |Address |Gateway |Name servers |Search domains|
|---------|-----------|-----------|---------|--------|---------------|--------------|
|enp0s3 |Manual |10.0.2.0/24|10.0.2.10|10.0.2.1|8.8.8.8,8.8.4.4|<empty> |
- Leave proxy and mirror addresses as they are
- Let the installer self-upgrade (if asked). At the time of writing this walkthrough, the version of the installer is 22.06.1. Anyway, Ubuntu 20.04 LTS OS will be installed.
- Use an entire disk for the installation
- Disable setup of the disk as LVM group
- Double check that NO swap space is allocated in the partition table. Kubernetes does not work properly with SWAP.
- Configure your user and system names:
- User name: TeraFlowSDN
- Server's name: tfs-vm
- Username: tfs
- Password: tfs123
- Install Open SSH Server
- Import SSH keys, if any.
- Featured Server Snaps
- Do not install featured server snaps. It will be done manually later to illustrate how to uninstall and reinstall
them in case of trouble with.
- Let the system install and upgrade the packages.
- This operation might take some minutes depending on how old is the Optical Drive ISO image you use and your
Internet connection speed.
- Restart the VM when the installation is completed.
## 1.1.4. Upgrade the Ubuntu distribution
```bash
sudo apt-get update -y
sudo apt-get dist-upgrade -y
```
## 1.1.5. Install VirtualBox Guest Additions
On VirtualBox Manager, open the VM main screen. If you are running the VM in headless mode, right click over the VM in
the VirtualBox Manager window and click "Show". If a dialog informing about how to leave the interface of the VM is
hown, confirm pressing "Switch" button. The interface of the VM should appear.
Click menu "Device > Insert Guest Additions CD image..."
On the VM terminal, type:
```bash
sudo apt-get install -y linux-headers-$(uname -r) build-essential dkms
# This command might take some minutes depending on your VM specs and your Internet access speed.
sudo mount /dev/cdrom /mnt/
cd /mnt/
sudo ./VBoxLinuxAdditions.run
# This command might take some minutes depending on your VM specs.
sudo reboot
```
## Table of Content:
- [1.1.1. Oracle VirtualBox](./1-1-1-create-vm-oracle-virtualbox.md)
- [1.1.2. VMWare Fusion](./1-1-2-create-vm-vmware-fusion.md)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment