diff --git a/infra/tf/dns/cert_packs.tf b/infra/tf/dns/cert_packs.tf index caff515b00..6bc8447eb4 100644 --- a/infra/tf/dns/cert_packs.tf +++ b/infra/tf/dns/cert_packs.tf @@ -1,10 +1,10 @@ locals { # Required if: # - # - OpenGB is enabled so requires access to `*.backend.{domain_main}` + # - Backend is enabled so requires access to `*.backend.{domain_main}` # - Main domain is not at the root of the zone, we need to provide a cert pack for the domain. # - Using the old `{service}.api.{domain}` format, which requires two levels of subdomains. - needs_main_cert_pack = var.opengb_enabled || var.dns_deprecated_subdomains || data.cloudflare_zone.main.name != var.domain_main + needs_main_cert_pack = var.backend_enabled || var.dns_deprecated_subdomains || data.cloudflare_zone.main.name != var.domain_main # If CDN is not at the root of the zone, we need to provide a cert pack for the CDN. # @@ -40,7 +40,7 @@ resource "cloudflare_certificate_pack" "main" { # TODO: Only if we use deprecated subdomains "*.api.${var.domain_main}", ], - var.opengb_enabled ? [ + var.backend_enabled ? [ "*.backend.${var.domain_main}", ] : [] ]) diff --git a/infra/tf/dns/vars.tf b/infra/tf/dns/vars.tf index 239db66cc3..0edd6ac323 100644 --- a/infra/tf/dns/vars.tf +++ b/infra/tf/dns/vars.tf @@ -41,8 +41,8 @@ variable "extra_dns" { })) } -# MARK: OpenGB -variable "opengb_enabled" { +# MARK: Backend +variable "backend_enabled" { type = bool } diff --git a/infra/tf/tls/cloudflare.tf b/infra/tf/tls/cloudflare.tf index 2d335515d5..53fb922f0c 100644 --- a/infra/tf/tls/cloudflare.tf +++ b/infra/tf/tls/cloudflare.tf @@ -64,7 +64,7 @@ resource "cloudflare_origin_ca_certificate" "rivet_gg" { "*.api.${var.domain_main}", "api.${var.domain_main}", ], - var.opengb_enabled ? [ + var.backend_enabled ? [ "*.backend.${var.domain_main}", ] : [] ]) diff --git a/infra/tf/tls/vars.tf b/infra/tf/tls/vars.tf index d466d9fdd8..c608862fb2 100644 --- a/infra/tf/tls/vars.tf +++ b/infra/tf/tls/vars.tf @@ -25,8 +25,8 @@ variable "prometheus_enabled" { type = bool } -# MARK: OpenGB -variable "opengb_enabled" { +# MARK: Backend +variable "backend_enabled" { type = bool } diff --git a/infra/tf/vector/vector.tf b/infra/tf/vector/vector.tf index 90d3e2c4a2..18ce83abe9 100644 --- a/infra/tf/vector/vector.tf +++ b/infra/tf/vector/vector.tf @@ -100,12 +100,12 @@ resource "helm_release" "vector" { EOF } - opengb_worker = { + backend_worker = { type = "filter" inputs = ["http_json"] condition = { type = "vrl" - source = ".path == \"/opengb\"" + source = ".path == \"/backend\"" } } } @@ -160,9 +160,9 @@ resource "helm_release" "vector" { } } - clickhouse_opengb_logs = { + clickhouse_backend_logs = { type = "clickhouse" - inputs = ["opengb_worker"] + inputs = ["backend_worker"] compression = "gzip" database = "db_cf_log" endpoint = "https://${var.clickhouse_host}:${var.clickhouse_port_https}" diff --git a/lib/bolt/config/src/ns.rs b/lib/bolt/config/src/ns.rs index afa4f4ed46..9afb74e337 100644 --- a/lib/bolt/config/src/ns.rs +++ b/lib/bolt/config/src/ns.rs @@ -536,7 +536,7 @@ pub struct Rivet { #[serde(default)] pub billing: Option, #[serde(default)] - pub opengb: Option, + pub backend: Option, } #[derive(Serialize, Deserialize, Clone, Debug, Default)] @@ -549,7 +549,7 @@ pub struct Telemetry { #[derive(Serialize, Deserialize, Clone, Debug, Default)] #[serde(deny_unknown_fields)] -pub struct RivetOpenGb {} +pub struct RivetBackend {} #[derive(Serialize, Deserialize, Clone, Debug)] #[serde(deny_unknown_fields)] diff --git a/lib/bolt/core/src/context/project.rs b/lib/bolt/core/src/context/project.rs index 741c4e8672..e228b36642 100644 --- a/lib/bolt/core/src/context/project.rs +++ b/lib/bolt/core/src/context/project.rs @@ -214,11 +214,11 @@ impl ProjectContextData { } } - // MARK: OpenGB - if self.ns().rivet.opengb.is_some() { + // MARK: Backend + if self.ns().rivet.backend.is_some() { assert!( self.ns().dns.is_some(), - "must have DNS configured with for OpenGB" + "must have DNS configured with for backend" ); } diff --git a/lib/bolt/core/src/context/service.rs b/lib/bolt/core/src/context/service.rs index d15e7f0b6c..d4e5d4c99d 100644 --- a/lib/bolt/core/src/context/service.rs +++ b/lib/bolt/core/src/context/service.rs @@ -897,13 +897,13 @@ impl ServiceContextData { (*infra_artifacts_output.job_runner_binary_key).clone(), ); - // OpenGB - if project_ctx.ns().rivet.opengb.is_some() { - let opengb_output = terraform::output::read_opengb(&project_ctx).await; + // Backend + if project_ctx.ns().rivet.backend.is_some() { + let backend_output = terraform::output::read_backend(&project_ctx).await; env.insert( "CLOUDFLARE_BACKEND_DISPATCHER_NAMESPACE".into(), - opengb_output.dispatcher_namespace_name.to_string(), + backend_output.dispatcher_namespace_name.to_string(), ); } diff --git a/lib/bolt/core/src/dep/terraform/gen.rs b/lib/bolt/core/src/dep/terraform/gen.rs index 64d7554cfe..eea628ea0f 100644 --- a/lib/bolt/core/src/dep/terraform/gen.rs +++ b/lib/bolt/core/src/dep/terraform/gen.rs @@ -230,10 +230,10 @@ async fn vars(ctx: &ProjectContext) { json!(config.rivet.provisioning.is_some()), ); - // OpenGB + // Backend vars.insert( - "opengb_enabled".into(), - json!(config.rivet.opengb.is_some()), + "backend_enabled".into(), + json!(config.rivet.backend.is_some()), ); // Tunnels @@ -324,7 +324,7 @@ async fn vars(ctx: &ProjectContext) { "name": domain_main_api, })); - // OpenGB + // Backend extra_dns.push(json!({ "zone_name": "main", "name": format!("*.backend.{domain_main}"), diff --git a/lib/bolt/core/src/dep/terraform/output.rs b/lib/bolt/core/src/dep/terraform/output.rs index 3181f944c9..3ea60abc2f 100644 --- a/lib/bolt/core/src/dep/terraform/output.rs +++ b/lib/bolt/core/src/dep/terraform/output.rs @@ -60,7 +60,7 @@ pub struct InfraArtifacts { } #[derive(Debug, Clone, Deserialize)] -pub struct OpenGb { +pub struct Backend { pub dispatcher_namespace_name: TerraformOutputValue, } @@ -153,8 +153,8 @@ pub async fn read_infra_artifacts(ctx: &ProjectContext) -> InfraArtifacts { read_plan::(ctx, "infra_artifacts").await } -pub async fn read_opengb(ctx: &ProjectContext) -> OpenGb { - read_plan::(ctx, "opengb").await +pub async fn read_backend(ctx: &ProjectContext) -> Backend { + read_plan::(ctx, "backend").await } /// Reads a Terraform plan's output and decodes in to type. diff --git a/lib/bolt/core/src/dep/terraform/remote_states.rs b/lib/bolt/core/src/dep/terraform/remote_states.rs index e56fcfb7d1..e980de20ab 100644 --- a/lib/bolt/core/src/dep/terraform/remote_states.rs +++ b/lib/bolt/core/src/dep/terraform/remote_states.rs @@ -40,7 +40,7 @@ pub fn dependency_graph(ctx: &ProjectContext) -> HashMap<&'static str, Vec vec![ RemoteStateBuilder::default().plan_id(crdb_plan).data_name("cockroachdb").build().unwrap(), ], - "opengb" => vec![ + "backend" => vec![ RemoteStateBuilder::default().plan_id("dns").build().unwrap(), ], } diff --git a/lib/bolt/core/src/tasks/infra/mod.rs b/lib/bolt/core/src/tasks/infra/mod.rs index 9ca35394b0..df6e61df64 100644 --- a/lib/bolt/core/src/tasks/infra/mod.rs +++ b/lib/bolt/core/src/tasks/infra/mod.rs @@ -285,12 +285,12 @@ pub fn build_plan( } } - // OpenGB - if ctx.ns().rivet.opengb.is_some() { + // Backend + if ctx.ns().rivet.backend.is_some() { plan.push(PlanStep { - name_id: "opengb", + name_id: "backend", kind: PlanStepKind::Terraform { - plan_id: "opengb".into(), + plan_id: "backend".into(), needs_destroy: true, }, });