The formation deploys CSGO using docker-compose. It also deploys Portainer to manage the containers.
Make sure to install terraform. link.
Then run the following command inside the provider's folder of your choice (very important)
$ terraform init
In order to run the scripts, each provider's folder comes with a bin folder containing some helpers to execute the usual terraform scripts.
The project comes with a bin folder that contains some bash
scripts:
- plan.sh: executes terraform plan
- apply.sh: executes terraform apply
- destroy.sh: executes terraform apply
We highly encourage using them because they integrate important parameters like -state
and -out
while keeping a consitent location of the state accross different actions.
In order to use the these script you need at least to provide the location of the parameter file (see parameter section).
You must be located inside one of the providers to execute the following:
- Copy
example.tfvar.json
to another file. We will refer to it asparams.tfvar.json
. - Fill
params.tfvar.json
using the data in the parameters table above. - Make the bin scripts executable using:
$ chmod +x bin/*
- Deploy your infrastructure using
$ ./bin/apply.sh /path/to/params.tfvar.json
We encourage you to execute the plan
script before apply
.
You must be located inside one of the providers to execute the following:
$ ./bin/destroy.sh /path/to/params.tfvar.json
You must be located inside one of the providers to execute the following:
$ ./bin/plan.sh /path/to/params.tfvar.json