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 diff --git a/README.md b/README.md index fa69b0b..93edee6 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,22 @@ # 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 | 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 @@ -29,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 | --- 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
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" }