diff --git a/scripts/2021/install.sh b/scripts/2021/install.sh index 1386a6f..8ef2970 100755 --- a/scripts/2021/install.sh +++ b/scripts/2021/install.sh @@ -4,10 +4,12 @@ cd /usr/local/bin/ for bin in donar measlat tor2 tor3 torecho udpecho; do wget https://gitlab.inria.fr/qdufour/donar/-/raw/master/dist/${bin}?inline=false -O ${bin} + chmod +x ${bin} done for scr in donaralt donaraltna donaraltopt donardup donardupna donardupopt tor1wcli tor2wcli torfone torfonena torfoneopt torhs torhsna torhsopt; do wget https://gitlab.inria.fr/qdufour/donar/-/raw/master/scripts/2021/${scr}?inline=false -O ${scr} + chmod +x ${bin} done cd /etc/systemd/system/ diff --git a/scripts/2021/main.tf b/scripts/2021/main.tf index a7890c0..dfcd181 100644 --- a/scripts/2021/main.tf +++ b/scripts/2021/main.tf @@ -10,13 +10,14 @@ terraform { provider "scaleway" { zone = "fr-par-1" region = "fr-par" + project_id = "1915f95a-dea4-4222-8e6b-a90b6125d1f4" } +resource "scaleway_instance_ip" "torhs_ip" {} resource "scaleway_instance_server" "torhs" { type = "DEV1-L" image = "ubuntu_focal" - - user_data { - cloud-init = file("${path.module}/torhs.yml") - } + name = "torhs" + cloud_init = file("${path.module}/torhs.yml") + ip_id = scaleway_instance_ip.torhs_ip.id } diff --git a/scripts/2021/torhs.yml b/scripts/2021/torhs.yml index 4afd141..52aa683 100644 --- a/scripts/2021/torhs.yml +++ b/scripts/2021/torhs.yml @@ -1,11 +1,7 @@ -package_update: true - -packages: - - ca-certificates - - wget - -runcmd: - - 'wget https://gitlab.inria.fr/qdufour/donar/-/raw/master/scripts/2021/install.sh?inline=false -O - | bash' - - 'for i in $(seq 1 8); do echo start $i ; systemctl start torfone@$i ; done ' - -final_message: "done" +#!/bin/bash +apt-get update -y -qq +apt-get upgrade -y -qq +apt-get install -y ca-certificates wget +wget https://gitlab.inria.fr/qdufour/donar/-/raw/master/scripts/2021/install.sh?inline=false -O - | bash +for i in $(seq 1 8); do echo start $i ; systemctl start torfone@$i ; sleep 10 ; done +echo "done"