From 5e7d5e27529f7395b3a15860279ce0c76256556f Mon Sep 17 00:00:00 2001 From: Khaled Mahmoud Youssef Date: Mon, 10 Jul 2023 15:51:57 +0300 Subject: [PATCH 1/4] docker image for testinf --- integrationtests/testingMachine | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 integrationtests/testingMachine diff --git a/integrationtests/testingMachine b/integrationtests/testingMachine new file mode 100755 index 00000000..add93512 --- /dev/null +++ b/integrationtests/testingMachine @@ -0,0 +1,20 @@ +#!/usr/bin/bash +sudo apt-get update +sudo apt-get install -y wireguard +sudo apt-get install dirmngr +sudo apt-get install curl +gpg --fetch-keys https://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/key.txt +gpg --export 569130E8CA20FBC4CB3FDE555898470A764B32C9 | sudo apt-key add - +echo 'deb http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/ debian yggdrasil' | sudo tee /etc/apt/sources.list.d/yggdrasil.list +sudo apt-get update +sudo apt-get install yggdrasil +sudo systemctl enable yggdrasil +PEERS=$(curl https://raw.githubusercontent.com/threefoldtech/zos-config/main/development.json | jq '.yggdrasil.peers[]' -r | sed 's/\//\\\//g' | sed -z 's/\n/\\n/g') +sudo sed -i -- 's/Peers\: \[\]/Peers: [\n'"$PEERS"']/g' /etc/yggdrasil.conf +sudo apt install make +sudo apt update +wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz +sudo tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz +export PATH=$PATH:/usr/local/go/bin +rm -rf go1.20.1.linux-amd64.tar.gz +rm -rf go1.20.1.linux-amd64 From c83903fb25bb5b93dcf07d43234c1f322932fb88 Mon Sep 17 00:00:00 2001 From: Khaled Mahmoud Youssef Date: Mon, 10 Jul 2023 16:10:30 +0300 Subject: [PATCH 2/4] docker image for testing --- integrationtests/testingMachine | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/integrationtests/testingMachine b/integrationtests/testingMachine index add93512..eb7c7289 100755 --- a/integrationtests/testingMachine +++ b/integrationtests/testingMachine @@ -8,7 +8,6 @@ gpg --export 569130E8CA20FBC4CB3FDE555898470A764B32C9 | sudo apt-key add - echo 'deb http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/ debian yggdrasil' | sudo tee /etc/apt/sources.list.d/yggdrasil.list sudo apt-get update sudo apt-get install yggdrasil -sudo systemctl enable yggdrasil PEERS=$(curl https://raw.githubusercontent.com/threefoldtech/zos-config/main/development.json | jq '.yggdrasil.peers[]' -r | sed 's/\//\\\//g' | sed -z 's/\n/\\n/g') sudo sed -i -- 's/Peers\: \[\]/Peers: [\n'"$PEERS"']/g' /etc/yggdrasil.conf sudo apt install make @@ -16,5 +15,4 @@ sudo apt update wget https://go.dev/dl/go1.20.1.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.20.1.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin -rm -rf go1.20.1.linux-amd64.tar.gz -rm -rf go1.20.1.linux-amd64 +rm -rf go1.20.1.linux-amd64.tar.gz \ No newline at end of file From c0a25ab87f074f85380fd0f7ac4f810dc7e72c42 Mon Sep 17 00:00:00 2001 From: Khaled Mahmoud Youssef Date: Mon, 10 Jul 2023 16:14:37 +0300 Subject: [PATCH 3/4] rename docker file --- integrationtests/{testingMachine => testing_setup} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename integrationtests/{testingMachine => testing_setup} (100%) diff --git a/integrationtests/testingMachine b/integrationtests/testing_setup similarity index 100% rename from integrationtests/testingMachine rename to integrationtests/testing_setup From 05a19d5618dc5c17637d22b0af7d39c2d22e2fcc Mon Sep 17 00:00:00 2001 From: Khaled Mahmoud Youssef Date: Tue, 5 Sep 2023 10:11:23 +0300 Subject: [PATCH 4/4] adding docker image for testing --- integrationtests/testing_image | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 integrationtests/testing_image diff --git a/integrationtests/testing_image b/integrationtests/testing_image new file mode 100644 index 00000000..87c9f82d --- /dev/null +++ b/integrationtests/testing_image @@ -0,0 +1,27 @@ +FROM ubuntu:latest + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y \ + make \ + guile-3.0 \ + wget \ + unzip \ + && apt-get clean + +RUN wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz && \ + rm go1.17.2.linux-amd64.tar.gz + +RUN wget https://releases.hashicorp.com/terraform/1.0.8/terraform_1.0.8_linux_amd64.zip && \ + unzip terraform_1.0.8_linux_amd64.zip -d /usr/local/bin && \ + rm terraform_1.0.8_linux_amd64.zip + +ENV PATH=$PATH:/usr/local/go/bin +ENV GOPATH=/go +ENV GOBIN=/go/bin + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +CMD ["git clone https://github.com/threefoldtech/terraform-provider-grid.git"] +CMD ["sleep","infinity"] \ No newline at end of file