infra-vintage/terraform
2022-10-05 16:20:01 +02:00
..
.terraform.lock.hcl pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00
data.tf pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00
dns.tf pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00
instances.tf pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00
providers.tf pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00
README.md pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00
remote-backend.tf pub-solar-infra-vm-1 alias flora6: init and document terraform deployment 2022-10-05 16:20:01 +02:00

Quickstart on NixOS with nix 2.4+

You need to enable the nix flake experimental feature nix flake --help should give you some output, then we're good to go.

git clone https://git.b12f.io/pub-solar/infra
cd infra
nix develop --command zsh

terraform provider docs

The following NixOS instances were deployed in DC lev-1 using terraform:

  • pub-solar-infra-vm-1

The Namecheap API was used to create the DNS records for *.pub.solar.

The Manta backend was used to save the terraform state for collaboration.

https://registry.terraform.io/providers/joyent/triton/latest/docs https://registry.terraform.io/providers/namecheap/namecheap/latest/docs https://www.terraform.io/language/v1.2.x/settings/backends/manta

How to use this

Setup your namecheap API credentials

NAMECHEAP_API_KEY
NAMECHEAP_API_USER
NAMECHEAP_USER_NAME

If you didn't already setup the pub_solar triton profile for DC lev-1, you'll need to do:

triton profile create
ttp set lev-1-pub_solar

tritonshell should pick up the configured profile and set all required environment variables for you. Use ttp env to check. Then:

# using terraform to deploy instances
cd terraform
terraform plan -out pub-solar-infra.plan
terraform apply pub-solar-infra.plan