Update Prerequisites authored by Katharina Renk's avatar Katharina Renk
On this page, you will learn how to install all necessary software to run the labs.
# Delete old version of Go if already installed
```bash
sudo rm -rf /usr/local/go
```
# Download Go
## Check for latest system updates using the commands below
```bash
sudo apt update
sudo apt upgrade
```
## Download Go using wget
```bash
wget https://go.dev/dl/go1.20.3.linux-amd64.tar.gz
```
## Extract the libraries using the tar command and placing it in the correct location
```bash
sudo tar -C /usr/local/ -xzf go1.20.3.linux-amd64.tar.gz
cd /usr/local/
```
## Check if path for Go is already set
```bash
echo $PATH
```
## Set path for Go if not set
```bash
sudo nano $HOME/.profile
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
source $HOME/.profile
cat $HOME/.profile
```
## Optional: Set Go path to use with sudo
```bash
sudo visudo
```
And add by secure_path at the end:
```bash
:/usr/local/go/bin
```
## Check Go version
```bash
go version
```
Use
```bash
source ~/.profile
```
to reload your profile in the current shell.
If an error occurs it is recommended to log in again, so the .profile can be applied correctly.
# Install Docker
Use the [**Installation Guide**](https://docs.docker.com/engine/install/) for Windows, MacOS and Linux to install Docker on your machine.
# Install Containerlab
```bash
bash -c "$(curl -sL https://get.containerlab.dev)"
```
# Install Make
```bash
sudo apt install make
```
# Download the repositories
## Get the goSDN repository from the Gitlab site
Go into the directory where you want to have this repository.
Get it with SSH:
```bash
git clone git@code.fbi.h-da.de:danet/gosdn.git
```
or with HTTPS:
```bash
git clone https://code.fbi.h-da.de/danet/gosdn.git
```
You can find the repository with this [link](https://code.fbi.h-da.de/danet/gosdn):
```bash
https://code.fbi.h-da.de/danet/gosdn
```
### Run command init the submodules in the repository gosdn
```bash
cd gosdn
git submodule update --init --recursive
```
## Get the gNMI target repository from the Gitlab site
Get it with SSH:
```bash
cd ..
git clone git@code.fbi.h-da.de:danet/gnmi-target.git
```
or with HTTPS:
```bash
cd ..
git clone https://code.fbi.h-da.de/danet/gnmi-target.git
```
You can find the repository with this [link](https://code.fbi.h-da.de/danet/gnmi-target):
```bash
https://code.fbi.h-da.de/danet/gnmi-target
```
### Run command to build the docker image for the gNMI target
Firstly, go to your local gnmi-target repository
```bash
cd gnmi-target
```
Next, build the image:
```bash
git checkout develop
make container
```
## Login to the code.fbi.h-da.de Repository
```bash
sudo docker login registry.code.fbi.h-da.de
```