Skip to content

Commit

Permalink
Merge pull request #1 from UCL-ARC/cdkharris/Update-documentation
Browse files Browse the repository at this point in the history
Cdkharris/update documentation
  • Loading branch information
cdkharris authored Jul 11, 2024
2 parents f02b68a + 0cc1d92 commit 2e4e2f0
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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-<PROVIDER>-<NAME>`.
2. Change [CODEOWNERS](.github/CODEOWNERS) to you / your Team.
## Usage

<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.1.4 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.4.3 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.8.5 |
| <a name="requirement_harvester"></a> [harvester](#requirement\_harvester) | 0.6.4 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.4.3 |
| <a name="provider_harvester"></a> [harvester](#provider\_harvester) | 0.6.4 |

## Modules

Expand All @@ -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 |
|------|-------------|------|---------|:--------:|
| <a name="input_prefix"></a> [prefix](#input\_prefix) | A dummy prefix. | `string` | `"my-test"` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Name of the SSRC namespace | `string` | `"ssrc-ns"` | no |
| <a name="input_network_name"></a> [network\_name](#input\_network\_name) | Name of the SSRC network | `string` | `"ssrc-net"` | no |
| <a name="input_os_disk_gb"></a> [os\_disk\_gb](#input\_os\_disk\_gb) | Size of the VM's primary disk | `string` | `"50Gi"` | no |
| <a name="input_public_key_openssh"></a> [public\_key\_openssh](#input\_public\_key\_openssh) | Public SSH key installed on the VM | `string` | n/a | yes |
| <a name="input_ram_gb"></a> [ram\_gb](#input\_ram\_gb) | Amount of memory for the VM | `string` | `"8Gi"` | no |
| <a name="input_vcpu"></a> [vcpu](#input\_vcpu) | Number of CPUs for the VM | `number` | `2` | no |
| <a name="input_vm_count"></a> [vm\_count](#input\_vm\_count) | Number of instances of the VM | `number` | `1` | no |
| <a name="input_vm_prefix"></a> [vm\_prefix](#input\_vm\_prefix) | Prefix applied to the VM | `string` | `"ssrc-jupyter"` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_random_val"></a> [random\_val](#output\_random\_val) | List your outputs here. |
| <a name="output_access_url"></a> [access\_url](#output\_access\_url) | The URL from which Jupyter can be accessed |

---
<!-- END_TF_DOCS -->
73 changes: 73 additions & 0 deletions docs/ssrc-jupyter.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<mxfile host="Electron" modified="2024-07-11T08:59:50.920Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.6.4 Chrome/124.0.6367.207 Electron/30.0.6 Safari/537.36" etag="lN2NkZ1-ipt6_c--hzTB" version="24.6.4" type="device">
<diagram name="Page-1" id="gzFdO6VlcwO8144OFhcM">
<mxGraphModel dx="969" dy="586" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-1" value="&lt;b&gt;ssrc-jupyter; 10.134.8.XX&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fontFamily=Verdana;arcSize=2;labelPosition=center;verticalLabelPosition=top;align=left;verticalAlign=bottom;spacingLeft=3;spacingRight=-150;spacingTop=0;spacingBottom=-20;labelBorderColor=none;strokeColor=#6c8ebf;strokeWidth=2;fillColor=#dae8fc;textDirection=ltr;" vertex="1" parent="1">
<mxGeometry x="10" y="122" width="440" height="270" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-4" value="Jupyter VMs&amp;nbsp;" style="fillColor=none;strokeColor=#5A6C86;dashed=1;verticalAlign=top;fontStyle=0;fontColor=#666666;whiteSpace=wrap;html=1;fontFamily=Verdana;strokeWidth=2;" vertex="1" parent="1">
<mxGeometry x="50" y="242" width="360" height="120" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-6" value="&lt;font&gt;ssrc-jupyter01&lt;/font&gt;" style="sketch=0;outlineConnect=0;fontColor=#666666;gradientColor=none;fillColor=#FF0000;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.instance2;fontFamily=Verdana;" vertex="1" parent="1">
<mxGeometry x="90" y="272" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-7" value="ssrc-jupyter05" style="sketch=0;outlineConnect=0;fillColor=#97D077;strokeColor=#82b366;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.instance2;fontFamily=Verdana;fontColor=#666666;" vertex="1" parent="1">
<mxGeometry x="335" y="272" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-8" value="&lt;font&gt;...&lt;/font&gt;" style="sketch=0;outlineConnect=0;fontColor=#666666;fillColor=#999999;strokeColor=#666666;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.instance2;fontFamily=Verdana;" vertex="1" parent="1">
<mxGeometry x="210" y="272" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-9" value="" style="sketch=0;outlineConnect=0;fontColor=#666666;gradientColor=none;fillColor=#8C4FFF;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.application_load_balancer;fontFamily=Verdana;" vertex="1" parent="1">
<mxGeometry x="210.5" y="162" width="49" height="49" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-10" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;curved=0;strokeColor=#FF0000;fontFamily=Verdana;fontColor=#666666;strokeWidth=2;" edge="1" parent="1" source="iC9Nrh2vCmvoKb6iCz6o-11" target="iC9Nrh2vCmvoKb6iCz6o-9">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="230" y="35" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-11" value="" style="sketch=0;outlineConnect=0;fontColor=#666666;gradientColor=none;fillColor=#FF0000;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.user;fontFamily=Verdana;" vertex="1" parent="1">
<mxGeometry x="90" y="10" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-12" value="" style="sketch=0;outlineConnect=0;fontColor=#666666;gradientColor=none;fillColor=#97D077;strokeColor=none;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;pointerEvents=1;shape=mxgraph.aws4.user;fontFamily=Verdana;" vertex="1" parent="1">
<mxGeometry x="335" y="10" width="50" height="50" as="geometry" />
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-13" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;curved=0;strokeColor=#97D077;fontFamily=Verdana;fontColor=#666666;strokeWidth=2;" edge="1" parent="1" source="iC9Nrh2vCmvoKb6iCz6o-12" target="iC9Nrh2vCmvoKb6iCz6o-9">
<mxGeometry relative="1" as="geometry">
<mxPoint x="520" y="52" as="sourcePoint" />
<mxPoint x="617" y="179" as="targetPoint" />
<Array as="points">
<mxPoint x="240" y="35" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-14" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;curved=0;strokeColor=#FF0000;fontFamily=Verdana;fontColor=#666666;strokeWidth=2;" edge="1" parent="1" source="iC9Nrh2vCmvoKb6iCz6o-9" target="iC9Nrh2vCmvoKb6iCz6o-6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="148" y="45" as="sourcePoint" />
<mxPoint x="240" y="172" as="targetPoint" />
<Array as="points">
<mxPoint x="230" y="232" />
<mxPoint x="115" y="232" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-15" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;curved=0;strokeColor=#97D077;fontFamily=Verdana;fontColor=#666666;strokeWidth=2;" edge="1" parent="1" source="iC9Nrh2vCmvoKb6iCz6o-9" target="iC9Nrh2vCmvoKb6iCz6o-7">
<mxGeometry relative="1" as="geometry">
<mxPoint x="347" y="45" as="sourcePoint" />
<mxPoint x="250" y="172" as="targetPoint" />
<Array as="points">
<mxPoint x="240" y="232" />
<mxPoint x="360" y="232" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="iC9Nrh2vCmvoKb6iCz6o-16" value="&lt;font&gt;443/tcp&lt;/font&gt;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontFamily=Verdana;fontColor=#666666;" vertex="1" connectable="0" parent="1">
<mxGeometry x="234" y="82" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
4 changes: 4 additions & 0 deletions docs/ssrc-jupyter.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 23 additions & 15 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 2e4e2f0

Please sign in to comment.