diff --git a/docker-deploy/generate_config.sh b/docker-deploy/generate_config.sh index 5f5c2fcda..bb5d845ab 100755 --- a/docker-deploy/generate_config.sh +++ b/docker-deploy/generate_config.sh @@ -206,11 +206,11 @@ GenerateConfig() { if [ "$federation" == "RabbitMQ" ]; then cp -r training_template/backends/spark/rabbitmq confs-$party_id/confs/ # delete Pulsar spec - sed -i '202,216d' confs-"$party_id"/docker-compose.yml + sed -i '203,217d' confs-"$party_id"/docker-compose.yml elif [ "$federation" == "Pulsar" ]; then cp -r training_template/backends/spark/pulsar confs-$party_id/confs/ # delete RabbitMQ spec - sed -i '183,200d' confs-"$party_id"/docker-compose.yml + sed -i '184,201d' confs-"$party_id"/docker-compose.yml fi fi fi @@ -225,10 +225,10 @@ GenerateConfig() { # federation if [ "$federation" == "RabbitMQ" ]; then cp -r training_template/backends/spark/rabbitmq confs-$party_id/confs/ - sed -i '146,160d' confs-$party_id/docker-compose.yml + sed -i '149,163d' confs-$party_id/docker-compose.yml elif [ "$federation" == "Pulsar" ]; then cp -r training_template/backends/spark/pulsar confs-$party_id/confs/ - sed -i '128,144d' confs-$party_id/docker-compose.yml + sed -i '131,147d' confs-$party_id/docker-compose.yml fi fi fi @@ -512,11 +512,7 @@ ${party_id}: port: 6650 sslPort: 6651 proxy: "" -default: - proxy: "proxy.fate.org:443" - domain: "fate.org" - brokerPort: 6650 - brokerSslPort: 6651 + EOF fi diff --git a/docker-deploy/training_template/docker-compose-spark-slim.yml b/docker-deploy/training_template/docker-compose-spark-slim.yml index 3dbbf12bc..21d7459d0 100644 --- a/docker-deploy/training_template/docker-compose-spark-slim.yml +++ b/docker-deploy/training_template/docker-compose-spark-slim.yml @@ -87,6 +87,9 @@ services: - "-c" - | set -x + sed -i "s/int(party.party_id)/str(party.party_id)/g" /data/projects/fate/fate/python/fate/arch/federation/pulsar/_federation.py + cp /data/projects/fate/fate_flow/conf/pulsar_route_table.yaml /data/projects/fate/fate_flow/pulsar_route_table.yaml + cp /data/projects/fate/fate_flow/conf/rabbitmq_route_table.yaml /data/projects/fate/fate_flow/rabbitmq_route_table.yaml sleep 5 && python fateflow/python/fate_flow/fate_flow_server.py environment: FATE_PROJECT_BASE: "/data/projects/fate" @@ -144,14 +147,14 @@ services: - fate-network pulsar: - image: "federatedai/pulsar:2.7.0" + image: "federatedai/pulsar:2.10.2" ports: - "6650:6650" - "6651:6651" - "8001:8080" volumes: - ./confs/pulsar/standalone.conf:/pulsar/conf/standalone.conf - - ./shared_dir/data/pulsar:/pulsar/data + # - ./shared_dir/data/pulsar:/pulsar/data - /etc/localtime:/etc/localtime:ro command: ["/bin/bash", "-c", "bin/pulsar standalone -nss"] diff --git a/docker-deploy/training_template/docker-compose-spark.yml b/docker-deploy/training_template/docker-compose-spark.yml index 3bc5b3053..1d43f8648 100644 --- a/docker-deploy/training_template/docker-compose-spark.yml +++ b/docker-deploy/training_template/docker-compose-spark.yml @@ -87,6 +87,7 @@ services: - "-c" - | set -x + sed -i "s/int(party.party_id)/str(party.party_id)/g" /data/projects/fate/fate/python/fate/arch/federation/pulsar/_federation.py cp /data/projects/fate/fate_flow/conf/pulsar_route_table.yaml /data/projects/fate/fate_flow/pulsar_route_table.yaml cp /data/projects/fate/fate_flow/conf/rabbitmq_route_table.yaml /data/projects/fate/fate_flow/rabbitmq_route_table.yaml sleep 5 && python fate_flow/python/fate_flow/fate_flow_server.py @@ -205,9 +206,10 @@ services: - "6650:6650" - "6651:6651" - "8001:8080" + user: root volumes: - ./confs/pulsar/standalone.conf:/pulsar/conf/standalone.conf - - ./shared_dir/data/pulsar:/pulsar/data + # - ./shared_dir/data/pulsar:/pulsar/data - /etc/localtime:/etc/localtime:ro command: ["/bin/bash", "-c", "bin/pulsar standalone -nss"] diff --git a/docs/FATE_On_Spark_With_Pulsar.md b/docs/FATE_On_Spark_With_Pulsar.md index 8559582ac..6b3b7e7aa 100644 --- a/docs/FATE_On_Spark_With_Pulsar.md +++ b/docs/FATE_On_Spark_With_Pulsar.md @@ -2,7 +2,7 @@ ## Overview -FATE supports using [Spark](https://spark.apache.org/) as a computing engine since v1.5.0 Along with Spark, it also requires HDFS and RabbitMQ as storage and transmission service respectively, to compose a functional FATE cluster. In v1.6.0, the FATE also supports to use [Pulsar](https://pulsar.apache.org/admin-rest-api/?version=2.7.0&apiversion=v2#tag/clusters) as the transmission engine, a user can switch the transmission engine easily. Ideally, the Pulsar provides better throughput and scalability, more importantly, organizations can compose FATE clusters of star network using Pulsar. The overall architecture of "FATE on Spark with Pulsar" is as the following diagram: +FATE supports using [Spark](https://spark.apache.org/) as a computing engine since v1.5.0 Along with Spark, it also requires HDFS and RabbitMQ as storage and transmission service respectively, to compose a functional FATE cluster. In v1.6.0, the FATE also supports to use [Pulsar](https://pulsar.apache.org/admin-rest-api/?version=2.10.2&apiversion=v2#tag/clusters) as the transmission engine, a user can switch the transmission engine easily. Ideally, the Pulsar provides better throughput and scalability, more importantly, organizations can compose FATE clusters of star network using Pulsar. The overall architecture of "FATE on Spark with Pulsar" is as the following diagram: