diff --git a/src/risedevtool/src/bin/risedev-dev.rs b/src/risedevtool/src/bin/risedev-dev.rs index 02cef8655db2f..8b9b9493d6acb 100644 --- a/src/risedevtool/src/bin/risedev-dev.rs +++ b/src/risedevtool/src/bin/risedev-dev.rs @@ -284,9 +284,15 @@ fn task_main( ExecuteContext::new(&mut logger, manager.new_progress(), status_dir.clone()); let mut service = SchemaRegistryService::new(c.clone()); service.execute(&mut ctx)?; - let mut task = - risedev::TcpReadyCheckTask::new(c.address.clone(), c.port, c.user_managed)?; - task.execute(&mut ctx)?; + if c.user_managed { + let mut task = + risedev::TcpReadyCheckTask::new(c.address.clone(), c.port, c.user_managed)?; + task.execute(&mut ctx)?; + } else { + let mut task = + risedev::LogReadyCheckTask::new("Server started, listening for requests")?; + task.execute(&mut ctx)?; + } ctx.pb .set_message(format!("schema registry http://{}:{}", c.address, c.port)); } diff --git a/src/risedevtool/src/task/kafka_service.rs b/src/risedevtool/src/task/kafka_service.rs index 7c415b6d9749a..24c6dff2e3e36 100644 --- a/src/risedevtool/src/task/kafka_service.rs +++ b/src/risedevtool/src/task/kafka_service.rs @@ -62,6 +62,11 @@ impl DockerServiceConfig for KafkaConfig { "KAFKA_INTER_BROKER_LISTENER_NAME".to_owned(), "HOST".to_owned(), ), + // https://docs.confluent.io/platform/current/installation/docker/config-reference.html#example-configurations + ( + "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR".to_owned(), + "1".to_owned(), + ), ("CLUSTER_ID".to_owned(), "RiseDevRiseDevRiseDev1".to_owned()), ] } diff --git a/src/risedevtool/src/task/schema_registry_service.rs b/src/risedevtool/src/task/schema_registry_service.rs index 5c5eba4fa8f35..95a84a562ff07 100644 --- a/src/risedevtool/src/task/schema_registry_service.rs +++ b/src/risedevtool/src/task/schema_registry_service.rs @@ -15,6 +15,9 @@ use super::docker_service::{DockerService, DockerServiceConfig}; use crate::SchemaRegistryConfig; +/// Schema Registry listener port in the container. +const SCHEMA_REGISTRY_LISTENER_PORT: &str = "8081"; + impl DockerServiceConfig for SchemaRegistryConfig { fn id(&self) -> String { self.id.clone() @@ -43,7 +46,7 @@ impl DockerServiceConfig for SchemaRegistryConfig { ("SCHEMA_REGISTRY_HOST_NAME".to_owned(), self.address.clone()), ( "SCHEMA_REGISTRY_LISTENERS".to_owned(), - format!("http://{}:{}", self.address, self.port), + format!("http://{}:{}", "0.0.0.0", SCHEMA_REGISTRY_LISTENER_PORT), ), ( "SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS".to_owned(), @@ -53,7 +56,10 @@ impl DockerServiceConfig for SchemaRegistryConfig { } fn ports(&self) -> Vec<(String, String)> { - vec![(self.port.to_string(), "8081".to_owned())] + vec![( + self.port.to_string(), + SCHEMA_REGISTRY_LISTENER_PORT.to_owned(), + )] } fn data_path(&self) -> Option {