Skip to content
Snippets Groups Projects
Commit e263d51a authored by Katharina Renk's avatar Katharina Renk
Browse files

Resolve "Update go version in packer and vagrant VMs"

See merge request !731
parent c09f59ce
No related branches found
No related tags found
1 merge request!731Resolve "Update go version in packer and vagrant VMs"
Pipeline #182602 passed
...@@ -21,7 +21,7 @@ source "virtualbox-iso" "baseimage" { ...@@ -21,7 +21,7 @@ source "virtualbox-iso" "baseimage" {
gfx_controller = "vmsvga" gfx_controller = "vmsvga"
gfx_vram_size = 128 gfx_vram_size = 128
iso_url = "https://ftp.halifax.rwth-aachen.de/ubuntu-releases/jammy/ubuntu-22.04.2-live-server-amd64.iso" iso_url = "https://ftp.halifax.rwth-aachen.de/ubuntu-releases/jammy/ubuntu-22.04.3-live-server-amd64.iso"
iso_checksum = "file:https://ftp.halifax.rwth-aachen.de/ubuntu-releases/jammy/SHA256SUMS" iso_checksum = "file:https://ftp.halifax.rwth-aachen.de/ubuntu-releases/jammy/SHA256SUMS"
ssh_username = "gosdn" ssh_username = "gosdn"
ssh_password = "gosdn" ssh_password = "gosdn"
......
#!/bin/bash #!/bin/bash
source /home/gosdn/.profile source /home/gosdn/.profile
# Clone goSDN # Clone goSDN
git clone https://code.fbi.h-da.de/danet/gosdn.git git clone https://code.fbi.h-da.de/danet/gosdn.git
cd ~/gosdn cd ~/gosdn
...@@ -9,11 +10,8 @@ git submodule update --init --recursive ...@@ -9,11 +10,8 @@ git submodule update --init --recursive
# Build goSDN # Build goSDN
make build make build
# Clone gNMI-Target # Clone gNMI-Target - only use if you want to use the gnmi-target image locally
cd ~/ #cd ~/
git clone --branch develop https://code.fbi.h-da.de/danet/gnmi-target.git #git clone https://code.fbi.h-da.de/danet/gnmi-target.git
cd gnmi-target #cd gnmi-target
#make container
# Build gNMI-Target
docker build -f target.Dockerfile .
make container
...@@ -5,9 +5,9 @@ sudo apt update ...@@ -5,9 +5,9 @@ sudo apt update
sudo apt upgrade -y sudo apt upgrade -y
# Install go # Install go
wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz
sudo tar -C /usr/local/ -xzf go1.21.0.linux-amd64.tar.gz rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz
rm go1.21.0.linux-amd64.tar.gz rm go1.21.5.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >>/home/gosdn/.profile echo "export PATH=$PATH:/usr/local/go/bin" >>/home/gosdn/.profile
echo "export GOPATH=$HOME/go " >>/home/gosdn/.profile echo "export GOPATH=$HOME/go " >>/home/gosdn/.profile
source /home/gosdn/.profile source /home/gosdn/.profile
......
...@@ -37,9 +37,9 @@ Vagrant.configure(2) do |config| ...@@ -37,9 +37,9 @@ Vagrant.configure(2) do |config|
zip zip
apt-get autoremove -y apt-get autoremove -y
####### installing go ####### ####### installing go #######
wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz
rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.0.linux-amd64.tar.gz rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.5.linux-amd64.tar.gz
rm go1.21.0.linux-amd64.tar.gz rm go1.21.5.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> /home/vagrant/.profile echo 'export PATH=$PATH:/usr/local/go/bin' >> /home/vagrant/.profile
echo 'export GOPATH=$HOME/go' >> /home/vagrant/.profile echo 'export GOPATH=$HOME/go' >> /home/vagrant/.profile
source /home/vagrant/.profile source /home/vagrant/.profile
...@@ -58,13 +58,12 @@ Vagrant.configure(2) do |config| ...@@ -58,13 +58,12 @@ Vagrant.configure(2) do |config|
bash -c "$(curl -sL https://get.containerlab.dev)" bash -c "$(curl -sL https://get.containerlab.dev)"
####### get gosdn repository ####### ####### get gosdn repository #######
su - vagrant -c "git clone https://code.fbi.h-da.de/danet/gosdn.git" su - vagrant -c "git clone https://code.fbi.h-da.de/danet/gosdn.git"
cd gosdn su - vagrant -c "cd gosdn && git submodule update --init --recursive"
su - vagrant -c "git submodule update --init --recursive"
su - vagrant -c "cd gosdn && make build" su - vagrant -c "cd gosdn && make build"
####### get gnmi target repository ####### ####### get gnmi target repository ####### only if you want to use the gnmi-target image locally
cd .. #cd ..
su - vagrant -c "git clone --branch develop https://code.fbi.h-da.de/danet/gnmi-target.git" #su - vagrant -c "git clone https://code.fbi.h-da.de/danet/gnmi-target.git"
su - vagrant -c "cd gnmi-target && docker build -f target.Dockerfile ." #su - vagrant -c "cd gnmi-target && docker build -f target.Dockerfile ."
su - vagrant -c "cd gnmi-target && make container" #su - vagrant -c "cd gnmi-target && make container"
SHELL SHELL
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment