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
```

View File

@ -59,15 +59,15 @@ There are two options when it comes to finding a node to deploy on. You can use
We cover the basic preparations beforing explaining the main file.
- Make a directory for your project
- ```
```
mkdir myfirstproject
```
- Change directory
- ```
```
cd myfirstproject
```
- Create a main file and insert content
- ```
```
nano main.tf
```
@ -109,11 +109,11 @@ provider "grid" {
When writing the main file, you can decide to leave a variable content empty. In this case you can export the variable content as environment variables.
* Export your mnemonics
* ```
```
export MNEMONICS="..."
```
* Export the network
* ```
```
export NETWORK="..."
```

View File

@ -94,20 +94,20 @@ Open the terminal.
- Go to the home folder
- ```
```
cd ~
```
- Create the folder `terraform` and the subfolder `deployment-full-vm`:
- ```
```
mkdir -p terraform/deployment-full-vm
```
- ```
```
cd terraform/deployment-full-vm
```
- Create the `main.tf` file:
- ```
```
nano main.tf
```
@ -210,7 +210,7 @@ In this file, we name the VM as `vm1`.
- Create the `credentials.auto.tfvars` file:
- ```
```
nano credentials.auto.tfvars
```
@ -239,12 +239,12 @@ We now deploy the full VM with Terraform. Make sure that you are in the correct
- Initialize Terraform:
- ```
```
terraform init
```
- Apply Terraform to deploy the full VM:
- ```
```
terraform apply
```
@ -255,7 +255,7 @@ After deployments, take note of the 3Node' IPv4 address. You will need this addr
## SSH into the 3Node
- To [SSH into the 3Node](ssh_guide.md), write the following:
- ```
```
ssh root@VM_IPv4_Address
```