diff --git a/docker/dev-full/rivet-edge-server/config.jsonc b/docker/dev-full/rivet-edge-server/config.jsonc index f441be3844..335b17a925 100644 --- a/docker/dev-full/rivet-edge-server/config.jsonc +++ b/docker/dev-full/rivet-edge-server/config.jsonc @@ -8,7 +8,7 @@ "cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb", "datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c", "server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10", - "intercom_endpoint": "http://rivet-server:8081" + "intercom_address": "http://rivet-server:8081" }, "guard": { // TLS not configured for local development diff --git a/docker/dev-full/rivet-guard/config.jsonc b/docker/dev-full/rivet-guard/config.jsonc index 2c704e7bb5..3db15434c1 100644 --- a/docker/dev-full/rivet-guard/config.jsonc +++ b/docker/dev-full/rivet-guard/config.jsonc @@ -20,7 +20,7 @@ "cluster_id": "11ca8960-acab-4963-909c-99d72af3e1cb", "datacenter_id": "f288913c-735d-4188-bf9b-2fcf6eac7b9c", "server_id": "174aca2a-98b7-462c-9ad9-3835094a9a10", - "intercom_endpoint": "http://rivet-server:8081" + "intercom_address": "http://rivet-server:8081" }, "guard": { // TLS not configured for local development diff --git a/packages/common/config/src/config/server/rivet/mod.rs b/packages/common/config/src/config/server/rivet/mod.rs index 1e53d14b94..68ed8378ca 100644 --- a/packages/common/config/src/config/server/rivet/mod.rs +++ b/packages/common/config/src/config/server/rivet/mod.rs @@ -843,10 +843,12 @@ pub struct Edge { pub cluster_id: Uuid, pub datacenter_id: Uuid, pub server_id: Uuid, - pub intercom_endpoint: Url, + /// Url of the core cluster. + pub intercom_address: Url, /// This API address will be used if there are no worker servers listed in the cluster package #[serde(default)] pub api_lan_address: Option<(String, u16)>, #[serde(default)] pub redirect_logs_dir: Option, } + diff --git a/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/guard.rs b/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/guard.rs index e6bef8ea9b..cfe0a13343 100644 --- a/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/guard.rs +++ b/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/guard.rs @@ -58,7 +58,7 @@ pub fn configure(config: &rivet_config::Config) -> GlobalResult { datacenter_id: Uuid::nil(), server_id: Uuid::nil(), api_lan_address: None, - intercom_endpoint: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?, + intercom_address: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?, redirect_logs_dir: Some(PathBuf::from("/var/log/rivet-guard")), }), status: server_config.rivet.status.clone(), diff --git a/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/worker.rs b/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/worker.rs index acdaf30566..b21277f169 100644 --- a/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/worker.rs +++ b/packages/core/services/cluster/src/workflows/server/install/install_scripts/components/rivet/worker.rs @@ -72,7 +72,7 @@ pub fn configure(config: &rivet_config::Config) -> GlobalResult { datacenter_id: Uuid::nil(), server_id: Uuid::nil(), api_lan_address: None, - intercom_endpoint: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?, + intercom_address: Url::parse(&format!("http://127.0.0.1:{TUNNEL_API_EDGE_PORT}"))?, redirect_logs_dir: Some(PathBuf::from("/var/log/rivet-edge-server")), }), ..Default::default() diff --git a/packages/edge/infra/guard/server/src/routing/api.rs b/packages/edge/infra/guard/server/src/routing/api.rs index 4b07e2d10e..12fd04ba56 100644 --- a/packages/edge/infra/guard/server/src/routing/api.rs +++ b/packages/edge/infra/guard/server/src/routing/api.rs @@ -10,9 +10,6 @@ use service_discovery::ServiceDiscovery; use url::Url; use uuid::Uuid; -// TODO: Copied from cluster/src/workflows/server/install/install_scripts/components/rivet/mod.rs -const TUNNEL_API_EDGE_PORT: u16 = 5010; - /// Route requests to the API service #[tracing::instrument(skip_all)] pub async fn route_api_request( diff --git a/packages/edge/services/pegboard/src/workflows/client/mod.rs b/packages/edge/services/pegboard/src/workflows/client/mod.rs index 0f9fa637a8..5ec3a37648 100644 --- a/packages/edge/services/pegboard/src/workflows/client/mod.rs +++ b/packages/edge/services/pegboard/src/workflows/client/mod.rs @@ -510,7 +510,7 @@ async fn publish_registered(ctx: &ActivityCtx, input: &PublishRegisteredInput) - let config = Configuration { client: rivet_pools::reqwest::client().await?, - base_path: util::url::to_string_without_slash(&edge.intercom_endpoint), + base_path: util::url::to_string_without_slash(&edge.intercom_address), bearer_access_token: Some(token), ..Default::default() };