From 7f77e7fdd89684d9970e95cb288e114ba1529dc6 Mon Sep 17 00:00:00 2001 From: Camilla Harris Date: Thu, 11 Jul 2024 10:04:10 +0100 Subject: [PATCH 1/5] Ignore process and macos files --- .gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 7a3e2fd..ef90872 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ # Crash log files crash.log +.terraform.lock.hcl + # Ignore any .tfvars files that are generated automatically for each Terraform run. Most # .tfvars files are managed as part of configuration and so should be included in # version control. @@ -27,3 +29,6 @@ override.tf.json # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan # example: *tfplan* + +.DS_Store +*.bkp From 56601532060eb20cc39b0c4f49f9885ee4047f16 Mon Sep 17 00:00:00 2001 From: Camilla Harris Date: Thu, 11 Jul 2024 10:10:46 +0100 Subject: [PATCH 2/5] Add diagram --- docs/ssrc-jupyter.drawio | 73 ++++++++++++++++++++++++++++++++++++ docs/ssrc-jupyter.drawio.svg | 4 ++ 2 files changed, 77 insertions(+) create mode 100644 docs/ssrc-jupyter.drawio create mode 100644 docs/ssrc-jupyter.drawio.svg diff --git a/docs/ssrc-jupyter.drawio b/docs/ssrc-jupyter.drawio new file mode 100644 index 0000000..201922a --- /dev/null +++ b/docs/ssrc-jupyter.drawio @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/ssrc-jupyter.drawio.svg b/docs/ssrc-jupyter.drawio.svg new file mode 100644 index 0000000..da33181 --- /dev/null +++ b/docs/ssrc-jupyter.drawio.svg @@ -0,0 +1,4 @@ + + + +
ssrc-jupyter; 10.134.8.XX
ssrc-jupyter; 10.134.8.XX
Jupyter VMs 
Jupyter VMs 
ssrc-jupyter01
ssrc-jup...
ssrc-jupyter05
ssrc-jup...
...
...
443/tcp
443/tcp
From c8509b2d4714b17739ca5851248ae108180d606c Mon Sep 17 00:00:00 2001 From: Camilla Harris Date: Thu, 11 Jul 2024 10:11:14 +0100 Subject: [PATCH 3/5] Add variable descriptions --- variables.tf | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/variables.tf b/variables.tf index dbfa974..24fa409 100644 --- a/variables.tf +++ b/variables.tf @@ -1,38 +1,46 @@ variable "namespace" { - type = string - default = "ssrc-ns" + type = string + default = "ssrc-ns" + description = "Name of the SSRC namespace" } variable "network_name" { - type = string - default = "ssrc-net" + type = string + default = "ssrc-net" + description = "Name of the SSRC network" } variable "os_disk_gb" { - type = string - default = "50Gi" + type = string + default = "50Gi" + description = "Size of the VM's primary disk" } variable "public_key_openssh" { - type = string + type = string + description = "Public SSH key installed on the VM" } variable "ram_gb" { - type = string - default = "8Gi" + type = string + default = "8Gi" + description = "Amount of memory for the VM" } variable "vcpu" { - type = number - default = 2 + type = number + default = 2 + description = "Number of CPUs for the VM" } variable "vm_count" { - type = number - default = 1 + type = number + default = 1 + description = "Number of instances of the VM" } variable "vm_prefix" { - type = string - default = "jupyter" + type = string + default = "ssrc-jupyter" + description = "Prefix applied to the VM" } From 5344e569f57dd628f8f60ddcc699439c0d504b50 Mon Sep 17 00:00:00 2001 From: Camilla Harris Date: Thu, 11 Jul 2024 10:13:51 +0100 Subject: [PATCH 4/5] Update readme --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fa69b0b..170081a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ # SSRC Jupyter Instance -## Usage +![SSRC-Jupyter diagram](docs/ssrc-jupyter.drawio.svg) -1. Fork this repo. If creating a self-contained module, name your repo - according to the [module naming convention](https://developer.hashicorp.com/terraform/registry/modules/publish) - of `terraform--`. -2. Change [CODEOWNERS](.github/CODEOWNERS) to you / your Team. +## Usage ## Requirements From 0cc1d92595f2fcac24475b02698d7dc9aaf98e8b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Jul 2024 09:15:41 +0000 Subject: [PATCH 5/5] terraform-docs: automated action --- README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 170081a..93edee6 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,14 @@ | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 1.1.4 | -| [random](#requirement\_random) | ~> 3.4.3 | +| [terraform](#requirement\_terraform) | >= 1.8.5 | +| [harvester](#requirement\_harvester) | 0.6.4 | ## Providers | Name | Version | |------|---------| -| [random](#provider\_random) | ~> 3.4.3 | +| [harvester](#provider\_harvester) | 0.6.4 | ## Modules @@ -26,19 +26,28 @@ No modules. | Name | Type | |------|------| -| [random_id.this](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/id) | resource | +| [harvester_cloudinit_secret.cloud-config-jupyter](https://registry.terraform.io/providers/harvester/harvester/0.6.4/docs/resources/cloudinit_secret) | resource | +| [harvester_virtualmachine.vm](https://registry.terraform.io/providers/harvester/harvester/0.6.4/docs/resources/virtualmachine) | resource | +| [harvester_image.rhel9](https://registry.terraform.io/providers/harvester/harvester/0.6.4/docs/data-sources/image) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [prefix](#input\_prefix) | A dummy prefix. | `string` | `"my-test"` | no | +| [namespace](#input\_namespace) | Name of the SSRC namespace | `string` | `"ssrc-ns"` | no | +| [network\_name](#input\_network\_name) | Name of the SSRC network | `string` | `"ssrc-net"` | no | +| [os\_disk\_gb](#input\_os\_disk\_gb) | Size of the VM's primary disk | `string` | `"50Gi"` | no | +| [public\_key\_openssh](#input\_public\_key\_openssh) | Public SSH key installed on the VM | `string` | n/a | yes | +| [ram\_gb](#input\_ram\_gb) | Amount of memory for the VM | `string` | `"8Gi"` | no | +| [vcpu](#input\_vcpu) | Number of CPUs for the VM | `number` | `2` | no | +| [vm\_count](#input\_vm\_count) | Number of instances of the VM | `number` | `1` | no | +| [vm\_prefix](#input\_vm\_prefix) | Prefix applied to the VM | `string` | `"ssrc-jupyter"` | no | ## Outputs | Name | Description | |------|-------------| -| [random\_val](#output\_random\_val) | List your outputs here. | +| [access\_url](#output\_access\_url) | The URL from which Jupyter can be accessed | ---