No more init
This commit is contained in:
parent
e6f4d2d7cf
commit
86d070edfe
3 changed files with 66 additions and 18 deletions
|
@ -13,21 +13,83 @@ provider "scaleway" {
|
|||
project_id = "1915f95a-dea4-4222-8e6b-a90b6125d1f4"
|
||||
}
|
||||
|
||||
/**********************
|
||||
* TOR HIDDEN SERVICE
|
||||
**********************/
|
||||
resource "scaleway_instance_ip" "torhs_ip" {}
|
||||
resource "scaleway_instance_server" "torhs" {
|
||||
type = "DEV1-L"
|
||||
image = "ubuntu_focal"
|
||||
name = "torhs"
|
||||
cloud_init = file("${path.module}/torhs.init")
|
||||
cloud_init = <<-EOT
|
||||
#!/bin/bash
|
||||
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 torhs@$i ; sleep 60 ; done
|
||||
EOT
|
||||
ip_id = scaleway_instance_ip.torhs_ip.id
|
||||
}
|
||||
|
||||
|
||||
resource "scaleway_instance_ip" "torhsopt_ip" {}
|
||||
resource "scaleway_instance_server" "torhsopt" {
|
||||
type = "DEV1-L"
|
||||
image = "ubuntu_focal"
|
||||
name = "torhsopt"
|
||||
cloud_init = file("${path.module}/torhsopt.init")
|
||||
cloud_init = <<-EOT
|
||||
#!/bin/bash
|
||||
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 torhsopt@$i ; sleep 60 ; done
|
||||
EOT
|
||||
ip_id = scaleway_instance_ip.torhsopt_ip.id
|
||||
}
|
||||
resource "scaleway_instance_ip" "torhsna_ip" {}
|
||||
resource "scaleway_instance_server" "torhsna" {
|
||||
type = "DEV1-L"
|
||||
image = "ubuntu_focal"
|
||||
name = "torhsna"
|
||||
cloud_init = <<-EOT
|
||||
#!/bin/bash
|
||||
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 torhsna@$i ; sleep 60 ; done
|
||||
EOT
|
||||
ip_id = scaleway_instance_ip.torhsna_ip.id
|
||||
}
|
||||
|
||||
/**********************
|
||||
* TORFONE
|
||||
**********************/
|
||||
resource "scaleway_instance_ip" "torfone_ip" {}
|
||||
resource "scaleway_instance_server" "torfone" {
|
||||
type = "DEV1-L"
|
||||
image = "ubuntu_focal"
|
||||
name = "torfone"
|
||||
cloud_init = <<-EOT
|
||||
#!/bin/bash
|
||||
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 60 ; done
|
||||
EOT
|
||||
ip_id = scaleway_instance_ip.torfone_ip.id
|
||||
}
|
||||
resource "scaleway_instance_ip" "torfoneopt_ip" {}
|
||||
resource "scaleway_instance_server" "torfoneopt" {
|
||||
type = "DEV1-L"
|
||||
image = "ubuntu_focal"
|
||||
name = "torfoneopt"
|
||||
cloud_init = <<-EOT
|
||||
#!/bin/bash
|
||||
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 torfoneopt@$i ; sleep 60 ; done
|
||||
EOT
|
||||
ip_id = scaleway_instance_ip.torfoneopt_ip.id
|
||||
}
|
||||
resource "scaleway_instance_ip" "torfonena_ip" {}
|
||||
resource "scaleway_instance_server" "torfonena" {
|
||||
type = "DEV1-L"
|
||||
image = "ubuntu_focal"
|
||||
name = "torfonena"
|
||||
cloud_init = <<-EOT
|
||||
#!/bin/bash
|
||||
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 torfonena@$i ; sleep 60 ; done
|
||||
EOT
|
||||
ip_id = scaleway_instance_ip.torfonena_ip.id
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/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 torhs@$i ; sleep 10 ; done) &
|
||||
echo "done"
|
|
@ -1,7 +0,0 @@
|
|||
#!/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 torhsopt@$i ; sleep 10 ; done) &
|
||||
echo "done"
|
Loading…
Reference in a new issue