diff --git a/docker/dev-full/docker-compose.yml b/docker/dev-full/docker-compose.yml index 227cb1fc8..d1b171e22 100644 --- a/docker/dev-full/docker-compose.yml +++ b/docker/dev-full/docker-compose.yml @@ -152,6 +152,8 @@ services: seaweedfs: image: bitnami/seaweedfs:3.78.0 + # TODO: Remove root user + user: root command: server -dir /var/lib/seaweedfs -s3 -s3.config /etc/seaweedfs/s3.json -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false volumes: - ./seaweedfs:/etc/seaweedfs:ro diff --git a/packages/common/config/src/config/rivet.rs b/packages/common/config/src/config/rivet.rs index 99f2566d6..0bdac6a97 100644 --- a/packages/common/config/src/config/rivet.rs +++ b/packages/common/config/src/config/rivet.rs @@ -289,6 +289,15 @@ pub struct Cluster { /// Configuration for server pools that use a margin for scaling. pub pools: ClusterPools, + + /// The URL for the manager binary. + pub manager_binary_url: Url, + + /// The URL for the container runner binary. + pub container_runner_binary_url: Url, + + /// The URL for the isolate runner binary. + pub isolate_runner_binary_url: Url, } #[derive(Debug, Serialize, Deserialize, Clone)] @@ -363,15 +372,6 @@ pub struct Pegboard { pub host: Option, /// The port on which the Pegboard service listens. pub port: Option, - /// The url for the manager binary. - #[serde(default)] - pub manager_binary_url: Option, - /// The url for the container runner binary. - #[serde(default)] - pub container_runner_binary_url: Option, - /// The url for the isolate runner binary. - #[serde(default)] - pub isolate_runner_binary_url: Option, } impl Pegboard { @@ -382,18 +382,6 @@ impl Pegboard { pub fn port(&self) -> u16 { self.port.unwrap_or(default_ports::PEGBOARD) } - - pub fn manager_binary_url(&self) -> Option<&Url> { - self.manager_binary_url.as_ref() - } - - pub fn container_runner_binary_url(&self) -> Option<&Url> { - self.container_runner_binary_url.as_ref() - } - - pub fn isolate_runner_binary_url(&self) -> Option<&Url> { - self.isolate_runner_binary_url.as_ref() - } } /// Deprecated: Configuration for job running. diff --git a/packages/services/cluster/src/workflows/server/install/install_scripts/components/pegboard.rs b/packages/services/cluster/src/workflows/server/install/install_scripts/components/pegboard.rs index 6899210fa..f099aa624 100644 --- a/packages/services/cluster/src/workflows/server/install/install_scripts/components/pegboard.rs +++ b/packages/services/cluster/src/workflows/server/install/install_scripts/components/pegboard.rs @@ -1,31 +1,21 @@ use chirp_workflow::prelude::*; pub async fn install(config: &rivet_config::Config) -> GlobalResult { - let pb_config = &config.server()?.rivet.pegboard; - - let manager_binary_url = unwrap_ref!( - pb_config.manager_binary_url(), - "manager binary url not configured" - ) - .to_string(); - let container_runner_binary_url = unwrap_ref!( - pb_config.container_runner_binary_url(), - "container runner binary url not configured" - ) - .to_string(); - let isolate_runner_binary_url = unwrap_ref!( - pb_config.isolate_runner_binary_url(), - "isolate runner binary url not configured" - ) - .to_string(); + let cluster_config = &config.server()?.rivet.cluster()?; Ok(include_str!("../files/pegboard_install.sh") - .replace("__PEGBOARD_MANAGER_BINARY_URL__", &manager_binary_url) + .replace( + "__PEGBOARD_MANAGER_BINARY_URL__", + &cluster_config.manager_binary_url.to_string(), + ) .replace( "__CONTAINER_RUNNER_BINARY_URL__", - &container_runner_binary_url, + &cluster_config.container_runner_binary_url.to_string(), ) - .replace("__V8_ISOLATE_BINARY_URL__", &isolate_runner_binary_url)) + .replace( + "__V8_ISOLATE_BINARY_URL__", + &cluster_config.isolate_runner_binary_url.to_string(), + )) } pub fn configure(