Skip to content
Merged
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
16 changes: 16 additions & 0 deletions .tasks/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ tasks:
aws:rp:
desc: CI workflow - AWS basic Redpanda
cmds:
- defer:
task: :infra:aws:destroy
- task: :tools:keygen
- task: :infra:aws:build
- task: :cluster:provision
Expand All @@ -30,6 +32,10 @@ tasks:
ENABLE_CONNECT: "true"
DISTRO: "43"
cmds:
- defer:
task: :infra:aws:destroy
- defer:
task: :infra:extra:aws:destroy
- task: :tools:keygen
- task: :infra:aws:build
vars: {ENABLE_CONNECT: "true", DISTRO: "43"}
Expand All @@ -51,6 +57,8 @@ tasks:
vars:
TIERED_STORAGE_ENABLED: "true"
cmds:
- defer:
task: :infra:aws:destroy
- task: :tools:keygen
- task: :infra:aws:build
vars: {TIERED_STORAGE_ENABLED: "true"}
Expand All @@ -69,6 +77,10 @@ tasks:
TIERED_STORAGE_ENABLED: "true"
DISTRO: "43"
cmds:
- defer:
task: :infra:aws:destroy
- defer:
task: :infra:extra:aws:destroy
- task: :tools:keygen
- task: :infra:aws:build
vars: {ENABLE_CONNECT: "true", TIERED_STORAGE_ENABLED: "true", DISTRO: "43"}
Expand All @@ -92,6 +104,8 @@ tasks:
gcp:rp:
desc: CI workflow - GCP basic Redpanda
cmds:
- defer:
task: :infra:gcp:destroy
- task: :tools:keygen
- task: :infra:gcp:build
- task: :cluster:provision
Expand All @@ -106,6 +120,8 @@ tasks:
vars:
TIERED_STORAGE_ENABLED: "true"
cmds:
- defer:
task: :infra:gcp:destroy
- task: :tools:keygen
- task: :infra:gcp:build
vars: {TIERED_STORAGE_ENABLED: "true"}
Expand Down
7 changes: 3 additions & 4 deletions aws/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## we assume a default vpc. if you have one you want to use you will need to provide a vpc and subnet ID


module "redpanda-cluster" {
source = "redpanda-data/redpanda-cluster/aws"
public_key_path = var.public_key_path
Expand All @@ -21,9 +20,9 @@ module "redpanda-cluster" {
client_instance_type = var.client_instance_type
prometheus_instance_type = var.prometheus_instance_type
machine_architecture = var.machine_architecture
connect_count = var.connect_count
connect_instance_type = var.broker_instance_type
enable_connect = var.enable_connect
connect_count = var.connect_count
connect_instance_type = var.broker_instance_type
enable_connect = var.enable_connect
}

variable "broker_instance_type" {
Expand Down
18 changes: 15 additions & 3 deletions gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module "redpanda-cluster" {
ssh_user = var.ssh_user
subnet = coalesce(var.subnet, google_compute_subnetwork.test-subnet.id)
image = var.image
availability_zone = var.availability_zone
availability_zone = local.availability_zones
broker_count = var.broker_count
client_count = var.client_count
disks = var.disks
Expand All @@ -58,6 +58,18 @@ provider "google" {
credentials = base64decode(var.gcp_creds)
}

data "google_compute_zones" "available" {
region = var.region
status = "UP"
}

locals {
availability_zones = length(var.availability_zone) > 0 ? var.availability_zone : [
for z in data.google_compute_zones.available.names :
trimprefix(z, "${var.region}-")
]
}

variable "gcp_creds" {
default = ""
type = string
Expand All @@ -69,8 +81,8 @@ variable "region" {
}

variable "availability_zone" {
description = "The zone where the cluster will be deployed [a,b,...]"
default = ["a"]
description = "The zone where the cluster will be deployed [a,b,...]. Leave empty to auto-discover available zones."
default = []
type = list(string)
}

Expand Down
Loading