Skip to content

Commit 9cd1e1c

Browse files
BobyMCbobssmira
authored andcommitted
feat: add an example for Talos on OCI
adds example Terraform code and documentation to deploy Talos on Oracle Cloud Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Caleb Woodbine <[email protected]>
1 parent 1be5874 commit 9cd1e1c

File tree

17 files changed

+1055
-9
lines changed

17 files changed

+1055
-9
lines changed

examples/terraform/aws/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@
5050
| <a name="input_ccm"></a> [ccm](#input\_ccm) | Whether to deploy aws cloud controller manager | `bool` | `false` | no |
5151
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of cluster | `string` | `"talos-aws-example"` | no |
5252
| <a name="input_config_patch_files"></a> [config\_patch\_files](#input\_config\_patch\_files) | Path to talos config path files that applies to all nodes | `list(string)` | `[]` | no |
53-
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br> instance_type = optional(string, "c5.large")<br> ami_id = optional(string, null)<br> num_instances = optional(number, 3)<br> config_patch_files = optional(list(string), [])<br> tags = optional(map(string), {})<br> })</pre> | `{}` | no |
53+
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br/> instance_type = optional(string, "c5.large")<br/> ami_id = optional(string, null)<br/> num_instances = optional(number, 3)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(map(string), {})<br/> })</pre> | `{}` | no |
5454
| <a name="input_extra_tags"></a> [extra\_tags](#input\_extra\_tags) | Extra tags to add to the cluster cloud resources | `map(string)` | `{}` | no |
5555
| <a name="input_kubernetes_api_allowed_cidr"></a> [kubernetes\_api\_allowed\_cidr](#input\_kubernetes\_api\_allowed\_cidr) | The CIDR from which to allow to access the Kubernetes API | `string` | `"0.0.0.0/0"` | no |
5656
| <a name="input_kubernetes_version"></a> [kubernetes\_version](#input\_kubernetes\_version) | Kubernetes version to use for the cluster, if not set the k8s version shipped with the talos sdk version will be used | `string` | `null` | no |
5757
| <a name="input_talos_api_allowed_cidr"></a> [talos\_api\_allowed\_cidr](#input\_talos\_api\_allowed\_cidr) | The CIDR from which to allow to access the Talos API | `string` | `"0.0.0.0/0"` | no |
5858
| <a name="input_talos_version_contract"></a> [talos\_version\_contract](#input\_talos\_version\_contract) | Talos API version to use for the cluster, if not set the the version shipped with the talos sdk version will be used | `string` | `null` | no |
5959
| <a name="input_vpc_cidr"></a> [vpc\_cidr](#input\_vpc\_cidr) | The IPv4 CIDR block for the VPC. | `string` | `"172.16.0.0/16"` | no |
60-
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br> name = string<br> instance_type = optional(string, "c5.large")<br> ami_id = optional(string, null)<br> num_instances = optional(number, 1)<br> config_patch_files = optional(list(string), [])<br> tags = optional(map(string), {})<br> }))</pre> | <pre>[<br> {<br> "name": "default"<br> }<br>]</pre> | no |
60+
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br/> name = string<br/> instance_type = optional(string, "c5.large")<br/> ami_id = optional(string, null)<br/> num_instances = optional(number, 1)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(map(string), {})<br/> }))</pre> | <pre>[<br/> {<br/> "name": "default"<br/> }<br/>]</pre> | no |
6161

6262
## Outputs
6363

examples/terraform/azure/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ Getting the kubeconfig and talosconfig for this cluster can be done with `terraf
8686
| <a name="input_azure_location"></a> [azure\_location](#input\_azure\_location) | Azure location to use | `string` | `"West Europe"` | no |
8787
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of cluster | `string` | `"talos-azure-example"` | no |
8888
| <a name="input_config_patch_files"></a> [config\_patch\_files](#input\_config\_patch\_files) | Path to talos config path files that applies to all nodes | `list(string)` | `[]` | no |
89-
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br> vm_size = optional(string, "Standard_B2s")<br> vm_os_id = optional(string, "/subscriptions/7f739b7d-f399-4b97-9a9f-f1962309ee6e/resourceGroups/SideroGallery/providers/Microsoft.Compute/galleries/SideroLabs/images/talos-x64/versions/latest")<br> num_instances = optional(number, 3)<br> config_patch_files = optional(list(string), [])<br> tags = optional(map(string), {})<br> })</pre> | `{}` | no |
89+
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br/> vm_size = optional(string, "Standard_B2s")<br/> vm_os_id = optional(string, "/subscriptions/7f739b7d-f399-4b97-9a9f-f1962309ee6e/resourceGroups/SideroGallery/providers/Microsoft.Compute/galleries/SideroLabs/images/talos-x64/versions/latest")<br/> num_instances = optional(number, 3)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(map(string), {})<br/> })</pre> | `{}` | no |
9090
| <a name="input_extra_tags"></a> [extra\_tags](#input\_extra\_tags) | Extra tags to add to the cluster cloud resources | `map(string)` | `{}` | no |
9191
| <a name="input_kubernetes_api_allowed_cidr"></a> [kubernetes\_api\_allowed\_cidr](#input\_kubernetes\_api\_allowed\_cidr) | The CIDR from which to allow to access the Kubernetes API | `string` | `"0.0.0.0/0"` | no |
9292
| <a name="input_kubernetes_version"></a> [kubernetes\_version](#input\_kubernetes\_version) | Kubernetes version to use for the cluster, if not set the k8s version shipped with the talos sdk version will be used | `string` | `null` | no |
9393
| <a name="input_talos_api_allowed_cidr"></a> [talos\_api\_allowed\_cidr](#input\_talos\_api\_allowed\_cidr) | The CIDR from which to allow to access the Talos API | `string` | `"0.0.0.0/0"` | no |
9494
| <a name="input_talos_version_contract"></a> [talos\_version\_contract](#input\_talos\_version\_contract) | Talos API version to use for the cluster, if not set the the version shipped with the talos sdk version will be used | `string` | `null` | no |
9595
| <a name="input_vnet_cidr"></a> [vnet\_cidr](#input\_vnet\_cidr) | The IPv4 CIDR block for the Virtual Network. | `string` | `"172.16.0.0/16"` | no |
96-
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br> name = string<br> vm_size = optional(string, "Standard_B2s")<br> vm_os_id = optional(string, "/subscriptions/7f739b7d-f399-4b97-9a9f-f1962309ee6e/resourceGroups/SideroGallery/providers/Microsoft.Compute/galleries/SideroLabs/images/talos-x64/versions/latest")<br> num_instances = optional(number, 1)<br> config_patch_files = optional(list(string), [])<br> tags = optional(map(string), {})<br> }))</pre> | <pre>[<br> {<br> "name": "default"<br> }<br>]</pre> | no |
96+
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br/> name = string<br/> vm_size = optional(string, "Standard_B2s")<br/> vm_os_id = optional(string, "/subscriptions/7f739b7d-f399-4b97-9a9f-f1962309ee6e/resourceGroups/SideroGallery/providers/Microsoft.Compute/galleries/SideroLabs/images/talos-x64/versions/latest")<br/> num_instances = optional(number, 1)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(map(string), {})<br/> }))</pre> | <pre>[<br/> {<br/> "name": "default"<br/> }<br/>]</pre> | no |
9797
9898
## Outputs
9999

examples/terraform/basic/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ No modules.
5555
|------|-------------|------|---------|:--------:|
5656
| <a name="input_cluster_endpoint"></a> [cluster\_endpoint](#input\_cluster\_endpoint) | The endpoint for the Talos cluster | `string` | n/a | yes |
5757
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | A name to provide for the Talos cluster | `string` | n/a | yes |
58-
| <a name="input_node_data"></a> [node\_data](#input\_node\_data) | A map of node data | <pre>object({<br> controlplanes = map(object({<br> install_disk = string<br> hostname = optional(string)<br> }))<br> workers = map(object({<br> install_disk = string<br> hostname = optional(string)<br> }))<br> })</pre> | <pre>{<br> "controlplanes": {<br> "10.5.0.2": {<br> "install_disk": "/dev/sda"<br> },<br> "10.5.0.3": {<br> "install_disk": "/dev/sda"<br> },<br> "10.5.0.4": {<br> "install_disk": "/dev/sda"<br> }<br> },<br> "workers": {<br> "10.5.0.5": {<br> "hostname": "worker-1",<br> "install_disk": "/dev/nvme0n1"<br> },<br> "10.5.0.6": {<br> "hostname": "worker-2",<br> "install_disk": "/dev/nvme0n1"<br> }<br> }<br>}</pre> | no |
58+
| <a name="input_node_data"></a> [node\_data](#input\_node\_data) | A map of node data | <pre>object({<br/> controlplanes = map(object({<br/> install_disk = string<br/> hostname = optional(string)<br/> }))<br/> workers = map(object({<br/> install_disk = string<br/> hostname = optional(string)<br/> }))<br/> })</pre> | <pre>{<br/> "controlplanes": {<br/> "10.5.0.2": {<br/> "install_disk": "/dev/sda"<br/> },<br/> "10.5.0.3": {<br/> "install_disk": "/dev/sda"<br/> },<br/> "10.5.0.4": {<br/> "install_disk": "/dev/sda"<br/> }<br/> },<br/> "workers": {<br/> "10.5.0.5": {<br/> "hostname": "worker-1",<br/> "install_disk": "/dev/nvme0n1"<br/> },<br/> "10.5.0.6": {<br/> "hostname": "worker-2",<br/> "install_disk": "/dev/nvme0n1"<br/> }<br/> }<br/>}</pre> | no |
5959

6060
## Outputs
6161

examples/terraform/equinix-metal/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ No modules.
6868
|------|-------------|------|---------|:--------:|
6969
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of cluster | `string` | `"talos-em"` | no |
7070
| <a name="input_config_patch_files"></a> [config\_patch\_files](#input\_config\_patch\_files) | Path to talos config path files that applies to all nodes | `list(string)` | `[]` | no |
71-
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br> plan = optional(string, "c3.small.x86")<br> ipxe_script_url = optional(string, "https://pxe.factory.talos.dev/pxe/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/v1.7.0/equinixMetal-amd64")<br> install_image = optional(string, "ghcr.io/talos-systems/installer:v1.7.0")<br> num_instances = optional(number, 3)<br> config_patch_files = optional(list(string), [])<br> tags = optional(list(string), [])<br> })</pre> | `{}` | no |
71+
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br/> plan = optional(string, "c3.small.x86")<br/> ipxe_script_url = optional(string, "https://pxe.factory.talos.dev/pxe/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/v1.7.0/equinixMetal-amd64")<br/> install_image = optional(string, "ghcr.io/talos-systems/installer:v1.7.0")<br/> num_instances = optional(number, 3)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(list(string), [])<br/> })</pre> | `{}` | no |
7272
| <a name="input_em_api_token"></a> [em\_api\_token](#input\_em\_api\_token) | API token for Equinix Metal | `string` | n/a | yes |
7373
| <a name="input_em_project_id"></a> [em\_project\_id](#input\_em\_project\_id) | Equinix Metal project ID | `string` | n/a | yes |
7474
| <a name="input_em_region"></a> [em\_region](#input\_em\_region) | Equinix Metal region to use | `string` | `"dc"` | no |
7575
| <a name="input_extra_tags"></a> [extra\_tags](#input\_extra\_tags) | Extra tags to add to the cluster cloud resources | `list(string)` | `[]` | no |
7676
| <a name="input_kubernetes_version"></a> [kubernetes\_version](#input\_kubernetes\_version) | Kubernetes version to use for the cluster, if not set the k8s version shipped with the talos sdk version will be used | `string` | `null` | no |
7777
| <a name="input_talos_version_contract"></a> [talos\_version\_contract](#input\_talos\_version\_contract) | Talos API version to use for the cluster, if not set the the version shipped with the talos sdk version will be used | `string` | `null` | no |
78-
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br> name = string<br> plan = optional(string, "c3.small.x86")<br> ipxe_script_url = optional(string, "https://pxe.factory.talos.dev/pxe/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/v1.7.0/equinixMetal-amd64")<br> install_image = optional(string, "ghcr.io/talos-systems/installer:v1.7.0")<br> num_instances = optional(number, 1)<br> config_patch_files = optional(list(string), [])<br> tags = optional(list(string), [])<br> }))</pre> | <pre>[<br> {<br> "name": "default"<br> }<br>]</pre> | no |
78+
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br/> name = string<br/> plan = optional(string, "c3.small.x86")<br/> ipxe_script_url = optional(string, "https://pxe.factory.talos.dev/pxe/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/v1.7.0/equinixMetal-amd64")<br/> install_image = optional(string, "ghcr.io/talos-systems/installer:v1.7.0")<br/> num_instances = optional(number, 1)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(list(string), [])<br/> }))</pre> | <pre>[<br/> {<br/> "name": "default"<br/> }<br/>]</pre> | no |
7979

8080
## Outputs
8181

examples/terraform/gcp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@
5353
|------|-------------|------|---------|:--------:|
5454
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Name of cluster | `string` | `"talos-gcp-example"` | no |
5555
| <a name="input_config_patch_files"></a> [config\_patch\_files](#input\_config\_patch\_files) | Path to talos config path files that applies to all nodes | `list(string)` | `[]` | no |
56-
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br> instance_type = optional(string, "e2-standard-2")<br> image = optional(string, null)<br> num_instances = optional(number, 3)<br> config_patch_files = optional(list(string), [])<br> tags = optional(map(string), {})<br> })</pre> | `{}` | no |
56+
| <a name="input_control_plane"></a> [control\_plane](#input\_control\_plane) | Info for control plane that will be created | <pre>object({<br/> instance_type = optional(string, "e2-standard-2")<br/> image = optional(string, null)<br/> num_instances = optional(number, 3)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(map(string), {})<br/> })</pre> | `{}` | no |
5757
| <a name="input_kubernetes_version"></a> [kubernetes\_version](#input\_kubernetes\_version) | Kubernetes version to use for the cluster, if not set the k8s version shipped with the talos sdk version will be used | `string` | `null` | no |
5858
| <a name="input_project"></a> [project](#input\_project) | The GCP project to deploy resources to | `string` | n/a | yes |
5959
| <a name="input_region"></a> [region](#input\_region) | The GCP region to deploy resources to | `string` | n/a | yes |
6060
| <a name="input_talos_api_allowed_cidr"></a> [talos\_api\_allowed\_cidr](#input\_talos\_api\_allowed\_cidr) | The CIDR from which to allow to access the Talos API | `string` | `"0.0.0.0/0"` | no |
6161
| <a name="input_talos_version_contract"></a> [talos\_version\_contract](#input\_talos\_version\_contract) | Talos API version to use for the cluster, if not set the the version shipped with the talos sdk version will be used | `string` | `null` | no |
6262
| <a name="input_vpc_cidr"></a> [vpc\_cidr](#input\_vpc\_cidr) | The IPv4 CIDR block for the VPC. | `string` | `"172.16.0.0/16"` | no |
63-
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br> name = string<br> instance_type = optional(string, "e2-standard-2")<br> image = optional(string, null)<br> num_instances = optional(number, 1)<br> config_patch_files = optional(list(string), [])<br> tags = optional(map(string), {})<br> }))</pre> | <pre>[<br> {<br> "name": "default"<br> }<br>]</pre> | no |
63+
| <a name="input_worker_groups"></a> [worker\_groups](#input\_worker\_groups) | List of node worker node groups to create | <pre>list(object({<br/> name = string<br/> instance_type = optional(string, "e2-standard-2")<br/> image = optional(string, null)<br/> num_instances = optional(number, 1)<br/> config_patch_files = optional(list(string), [])<br/> tags = optional(map(string), {})<br/> }))</pre> | <pre>[<br/> {<br/> "name": "default"<br/> }<br/>]</pre> | no |
6464
| <a name="input_zone"></a> [zone](#input\_zone) | The GCP zone to deploy resources to | `string` | n/a | yes |
6565

6666
## Outputs

0 commit comments

Comments
 (0)