manual, sysadmins, terra

This commit is contained in:
Mik-TF
2024-05-14 12:47:52 -04:00
parent bd835ef00b
commit 982bd66987
3 changed files with 37 additions and 37 deletions

View File

@@ -65,31 +65,31 @@ We present two different methods to create the Terraform files. In the first met
Creating the Terraform files is very straightforward. We want to clone the repository `terraform-provider-grid` locally and run some simple commands to properly set and start the deployment.
* Clone the repository `terraform-provider-grid`
* ```
```
git clone https://github.com/threefoldtech/terraform-provider-grid
```
* Go to the subdirectory containing the examples
* ```
```
cd terraform-provider-grid/examples/resources/qsfs
```
* Set your own mnemonics (replace `mnemonics words` with your own mnemonics)
* ```
```
export MNEMONICS="mnemonics words"
```
* Set the network (replace `network` by the desired network, e.g. `dev`, `qa`, `test` or `main`)
* ```
```
export NETWORK="network"
```
* Initialize the Terraform deployment
* ```
```
terraform init
```
* Apply the Terraform deployment
* ```
```
terraform apply
```
* At any moment, you can destroy the deployment with the following line
* ```
```
terraform destroy
```
@@ -100,21 +100,21 @@ When using this method, you might need to change some parameters within the `mai
For this method, we use two files to deploy with Terraform. The first file contains the environment variables (**credentials.auto.tfvars**) and the second file contains the parameters to deploy our workloads (**main.tf**). To facilitate the deployment, only the environment variables file needs to be adjusted. The **main.tf** file contains the environment variables (e.g. `var.size` for the disk size) and thus you do not need to change this file, but only the file **credentials.auto.tfvars**.
* Open the terminal and go to the home directory (optional)
* ```
```
cd ~
```
* Create the folder `terraform` and the subfolder `deployment-qsfs-microvm`:
* ```
mkdir -p terraform && cd $_
```
* ```
mkdir deployment-qsfs-microvm && cd $_
```
```
mkdir -p terraform && cd $_
```
```
mkdir deployment-qsfs-microvm && cd $_
```
* Create the `main.tf` file:
* ```
nano main.tf
```
```
nano main.tf
```
* Copy the `main.tf` content and save the file.
@@ -274,12 +274,12 @@ output "ygg_ip" {
Note that we named the VM as **vm1**.
* Create the `credentials.auto.tfvars` file:
* ```
nano credentials.auto.tfvars
```
```
nano credentials.auto.tfvars
```
* Copy the `credentials.auto.tfvars` content and save the file.
* ```terraform
```terraform
# Network
network = "main"
@@ -311,17 +311,17 @@ For the section QSFS Parameters, you can decide on how many VMs your data will b
We now deploy the QSFS deployment with Terraform. Make sure that you are in the correct folder `terraform/deployment-qsfs-microvm` containing the main and variables files.
* Initialize Terraform by writing the following in the terminal:
* ```
```
terraform init
```
* Apply the Terraform deployment:
* ```
```
terraform apply
```
* Terraform will then present you the actions it will perform. Write `yes` to confirm the deployment.
Note that, at any moment, if you want to see the information on your Terraform deployments, write the following:
* ```
```
terraform show
```