diff --git a/tutorial/1-1-1-create-vm-oracle-virtalbox.md b/tutorial/1-1-1-create-vm-oracle-virtalbox.md new file mode 100644 index 0000000000000000000000000000000000000000..c53601e145d4ad0ca41c55803c27d55309070231 --- /dev/null +++ b/tutorial/1-1-1-create-vm-oracle-virtalbox.md @@ -0,0 +1,90 @@ +## 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 +``` diff --git a/tutorial/1-1-2-create-vm-vmware-fusion.md b/tutorial/1-1-2-create-vm-vmware-fusion.md new file mode 100644 index 0000000000000000000000000000000000000000..6691a9198d29df3f3121408a5ec5bcd9206a969e --- /dev/null +++ b/tutorial/1-1-2-create-vm-vmware-fusion.md @@ -0,0 +1,57 @@ +## 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: teraflowsdn +- Password: tfs123 + +On the next screen press "Customize Settings", save the VM and in "Settings" change: +- Change to use 4 CPUs +- Change to access 9 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 + + $ sudo apt-get install openssh-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 +``` diff --git a/tutorial/1-1-create-vm.md b/tutorial/1-1-create-vm.md index d32f97ebc922a10826acc1175824363e4602a2ea..39c7c7b2e12b4744eb910535d518c720449fb50f 100644 --- a/tutorial/1-1-create-vm.md +++ b/tutorial/1-1-create-vm.md @@ -5,96 +5,8 @@ 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. -## 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)