Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Local .terraform directories
**/.terraform/*

# .tfplan files
*.tfplan

# .tfstate files
*.tfstate
*.tfstate.*
Expand All @@ -10,6 +13,7 @@ crash.log

# terraform.tvars
terraform.tfvars
terraform.tfvars.swp

# known files created by terraform modules
id_rsa*
Expand All @@ -22,5 +26,5 @@ vagrant/local_config.yaml
# MacOS junk
.DS_Store

# Terraform plan files
*.tfplan


6 changes: 6 additions & 0 deletions rancher/do/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions rancher/do/infra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ resource "digitalocean_ssh_key" "quickstart_ssh_key" {
# DO droplet for creating a single node RKE cluster and installing the Rancher server
resource "digitalocean_droplet" "rancher_server" {
name = "${var.prefix}-rancher-server"
image = "ubuntu-20-04-x64"
image = "ubuntu-25-04-x64"
region = var.do_region
size = var.droplet_size
ssh_keys = [digitalocean_ssh_key.quickstart_ssh_key.fingerprint]
tags = var.user_tag != "" ? [var.user_tag] : []

provisioner "remote-exec" {
inline = [
Expand Down Expand Up @@ -70,10 +71,11 @@ module "rancher_common" {
# DO droplet for creating a single node workload cluster
resource "digitalocean_droplet" "quickstart_node" {
name = "${var.prefix}-quickstart-node"
image = "ubuntu-20-04-x64"
image = "ubuntu-25-04-x64"
region = var.do_region
size = var.droplet_size
ssh_keys = [digitalocean_ssh_key.quickstart_ssh_key.fingerprint]
tags = var.user_tag != "" ? [var.user_tag] : []

user_data = templatefile(
"${path.module}/files/userdata_quickstart_node.template",
Expand Down
14 changes: 8 additions & 6 deletions rancher/do/terraform.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

# DigitalOcean API token used to create infrastructure
do_token = ""

# Configure your user tag
user_tag = "user:delete-me"

# Admin password to use for Rancher server bootstrap, min. 12 characters
rancher_server_admin_password = ""

Expand All @@ -12,19 +14,19 @@ cert_manager_version = "1.11.0"
do_region = "nyc1"

# Droplet size used for all droplets
droplet_size = "s-2vcpu-4gb"
droplet_size = "s-4vcpu-8gb"

# Prefix added to names of all resources
prefix = "quickstart"
prefix = "usr_quickstart"

# The helm repository, where the Rancher helm chart is installed from
rancher_helm_repository = "https://releases.rancher.com/server-charts/latest"

# Kubernetes version to use for Rancher server cluster
rancher_kubernetes_version = "v1.24.14+k3s1"
rancher_kubernetes_version = "v1.31.9+k3s1"

# Rancher server version (format: v0.0.0)
rancher_version = "2.7.9"
rancher_version = "2.10.7"

# Kubernetes version to use for managed workload cluster
workload_kubernetes_version = "v1.24.14+rke2r1"
workload_kubernetes_version = "v1.31.9+rke2r1"
6 changes: 6 additions & 0 deletions rancher/do/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ variable "rancher_server_admin_password" {
description = "Admin password to use for Rancher server bootstrap, min. 12 characters"
}

variable "user_tag" {
type = string
description = "Tag to assign to resources, in the format 'user:username'"
default = "delete-me"
}

# Local variables used to reduce repetition
locals {
node_username = "root"
Expand Down
Loading