From 89deee3b56159890effd63c1589476857280cb12 Mon Sep 17 00:00:00 2001 From: Chenlong Ma Date: Tue, 23 Jan 2024 16:52:30 +0800 Subject: [PATCH] helm-chart fix Signed-off-by: Chenlong Ma --- .../eggroll/clustermanager/deployment.yaml | 7 ---- .../templates/backends/eggroll/configmap.yaml | 6 +-- .../eggroll/nodemanager/statefulSet.yaml | 7 ---- .../templates/core/fateflow/configmap.yaml | 42 +++++++++---------- .../FATE/templates/core/mysql/configmap.yaml | 39 +++++++++-------- .../FATE/templates/core/osx/configmap.yaml | 2 +- helm-charts/FATE/values-template.yaml | 8 ++-- 7 files changed, 49 insertions(+), 62 deletions(-) diff --git a/helm-charts/FATE/templates/backends/eggroll/clustermanager/deployment.yaml b/helm-charts/FATE/templates/backends/eggroll/clustermanager/deployment.yaml index 47ed8efc5..6397fffc8 100644 --- a/helm-charts/FATE/templates/backends/eggroll/clustermanager/deployment.yaml +++ b/helm-charts/FATE/templates/backends/eggroll/clustermanager/deployment.yaml @@ -50,13 +50,6 @@ spec: - -c - | set -x - mkdir -p /data/projects/fate/eggroll/logs/eggroll/ - touch /data/projects/fate/eggroll/logs/eggroll/eggroll-audit.log - ln -sf /dev/stdout /data/projects/fate/eggroll/logs/eggroll/eggroll-audit.log - touch /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.log - ln -sf /dev/stdout /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.log - touch /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.err.log - ln -sf /dev/stderr /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.err.log java -server -Dlog4j.configurationFile=$${EGGROLL_HOME}/conf/log4j2.xml -Dmodule=clustermanager -cp $${EGGROLL_HOME}/lib/*: org.fedai.eggroll.clustermanager.Bootstrap -p 4670 -s EGGROLL_DAEMON ports: - containerPort: 4670 diff --git a/helm-charts/FATE/templates/backends/eggroll/configmap.yaml b/helm-charts/FATE/templates/backends/eggroll/configmap.yaml index 71f5d7a8b..4767072e4 100644 --- a/helm-charts/FATE/templates/backends/eggroll/configmap.yaml +++ b/helm-charts/FATE/templates/backends/eggroll/configmap.yaml @@ -33,11 +33,9 @@ data: eggroll.resourcemanager.clustermanager.jdbc.username={{ .Values.externalMysqlUser | default .Values.modules.mysql.user | default "fate" }} eggroll.resourcemanager.clustermanager.jdbc.password={{ .Values.externalMysqlPassword | default .Values.modules.mysql.password | default "fate_dev" }} - - eggroll.data.dir=data/ - eggroll.logs.dir=logs/ eggroll.resourcemanager.clustermanager.host=clustermanager eggroll.resourcemanager.clustermanager.port=4670 + eggroll.resourcemanager.nodemanager.host=nodemanager eggroll.resourcemanager.nodemanager.port=4671 eggroll.resourcemanager.process.tag={{ .Values.partyId }} @@ -61,7 +59,7 @@ data: eggroll.resourcemanager.bootstrap.egg_pair.ld_library_path= # session - eggroll.session.processors.per.node={{ .Values.modules.nodemanager.sessionProcessorsPerNode | default 2 }} + eggroll.session.processors.per.node={{ .Values.modules.nodemanager.sessionProcessorsPerNode | default 4 }} # deepspeed ## where deepspeed containers locate, required for deepspeed diff --git a/helm-charts/FATE/templates/backends/eggroll/nodemanager/statefulSet.yaml b/helm-charts/FATE/templates/backends/eggroll/nodemanager/statefulSet.yaml index acdef98fe..f2d39caa9 100644 --- a/helm-charts/FATE/templates/backends/eggroll/nodemanager/statefulSet.yaml +++ b/helm-charts/FATE/templates/backends/eggroll/nodemanager/statefulSet.yaml @@ -67,13 +67,6 @@ spec: - -c - | set -x - mkdir -p /data/projects/fate/eggroll/logs/eggroll/ - touch /data/projects/fate/eggroll/logs/eggroll/eggroll-audit.log - ln -sf /dev/stdout /data/projects/fate/eggroll/logs/eggroll/eggroll-audit.log - touch /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.log - ln -sf /dev/stdout /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.log - touch /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.err.log - ln -sf /dev/stderr /data/projects/fate/eggroll/logs/eggroll/eggroll.jvm.err.log /tini -- java -server -Dlog4j.configurationFile=$${EGGROLL_HOME}/conf/log4j2.xml -Dmodule=nodemanager -cp $${EGGROLL_HOME}/lib/*: org.fedai.eggroll.nodemanager.Bootstrap -p 4671 -s EGGROLL_DAEMON ports: - containerPort: 4671 diff --git a/helm-charts/FATE/templates/core/fateflow/configmap.yaml b/helm-charts/FATE/templates/core/fateflow/configmap.yaml index d5eec4623..1df81440b 100644 --- a/helm-charts/FATE/templates/core/fateflow/configmap.yaml +++ b/helm-charts/FATE/templates/core/fateflow/configmap.yaml @@ -44,6 +44,8 @@ data: service_conf.yaml: | party_id: {{ .Values.partyId | quote }} use_registry: false + # DEBUG 10/INFO 20 + log_level: 20 encrypt: key_0: module: fate_flow.hub.encrypt.password_encrypt#pwdecrypt @@ -57,7 +59,7 @@ data: {{- if eq .Values.computing "Spark" "Spark_local" }} proxy_name: nginx {{- else }} - proxy_name: rollsite + proxy_name: osx {{- end }} nginx: host: @@ -85,18 +87,32 @@ data: {{- else }} computing: {{ .Values.computing | lower }} {{- end }} - {{- if eq .Values.computing "Eggroll" }} - federation: "rollsite" - {{- else }} federation: {{ .Values.federation | lower }} - {{- end }} storage: {{ .Values.storage | lower }} default_provider: name: fate # version default: fateflow.env version: device: local + computing: + standalone: + cores: 32 + eggroll: + cores: 16 + nodes: 2 + # cluster manager host and port + host: clustermanager + port: 4670 + spark: + # default use SPARK_HOME environment variable + home: /data/projects/spark-3.1.3-bin-hadoop3.2/ + cores: 32 federation: + osx: + host: osx + port: 9370 + # stream or queue + mode: stream pulsar: host: {{ .Values.modules.python.pulsar.host }} port: {{ .Values.modules.python.pulsar.port }} @@ -126,22 +142,6 @@ data: # mode: replication / client, default: replication mode: replication max_message_size: 1048576 - rollsite: - host: rollsite - port: 9370 - osx: - host: osx - port: 9370 - computing: - standalone: - cores: 32 - eggroll: - cores: 32 - nodes: 2 - spark: - # default use SPARK_HOME environment variable - home: /data/projects/spark-3.1.3-bin-hadoop3.2/ - cores: 32 storage: hdfs: name_node: {{ .Values.modules.python.hdfs.name_node | default "hdfs://namenode:9000" }} diff --git a/helm-charts/FATE/templates/core/mysql/configmap.yaml b/helm-charts/FATE/templates/core/mysql/configmap.yaml index 35af166ba..ae82aa472 100644 --- a/helm-charts/FATE/templates/core/mysql/configmap.yaml +++ b/helm-charts/FATE/templates/core/mysql/configmap.yaml @@ -22,26 +22,27 @@ data: {{- else }} create-eggroll-meta-tables.sql: | -- create database if not exists, default database is eggroll_meta - CREATE DATABASE IF NOT EXISTS `{{ .Values.modules.mysql.database }}`; - + CREATE DATABASE IF NOT EXISTS `eggroll_meta`; + -- all operation under this database - USE `{{ .Values.modules.mysql.database }}`; - + USE `eggroll_meta`; + -- store_locator CREATE TABLE IF NOT EXISTS `store_locator` ( - `store_locator_id` SERIAL PRIMARY KEY, - `store_type` VARCHAR(255) NOT NULL, - `namespace` VARCHAR(2000) NOT NULL DEFAULT 'DEFAULT', - `name` VARCHAR(2000) NOT NULL, - `path` VARCHAR(2000) NOT NULL DEFAULT '', - `total_partitions` INT UNSIGNED NOT NULL, - `partitioner` VARCHAR(2000) NOT NULL DEFAULT 'BYTESTRING_HASH', - `serdes` VARCHAR(2000) NOT NULL DEFAULT '', - `version` INT UNSIGNED NOT NULL DEFAULT 0, - `status` VARCHAR(255) NOT NULL, - `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, - `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP + `store_locator_id` SERIAL PRIMARY KEY, + `store_type` VARCHAR(255) NOT NULL, + `namespace` VARCHAR(2000) NOT NULL DEFAULT 'DEFAULT', + `name` VARCHAR(2000) NOT NULL, + `path` VARCHAR(2000) NOT NULL DEFAULT '', + `total_partitions` INT UNSIGNED NOT NULL, + `key_serdes_type` INT NOT NULL DEFAULT 0, + `value_serdes_type` INT NOT NULL DEFAULT 0, + `partitioner_type` INT NOT NULL DEFAULT 0, + `version` INT UNSIGNED NOT NULL DEFAULT 0, + `status` VARCHAR(255) NOT NULL, + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP, + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; @@ -116,6 +117,8 @@ data: `session_id` VARCHAR(767) PRIMARY KEY, `name` VARCHAR(2000) NOT NULL DEFAULT '', `status` VARCHAR(255) NOT NULL, + `status_reason` VARCHAR(255), + `before_status` VARCHAR(255), `tag` VARCHAR(255), `total_proc_count` INT, `active_proc_count` INT, @@ -150,6 +153,7 @@ data: `server_node_id` INT NOT NULL, `processor_type` VARCHAR(255) NOT NULL, `status` VARCHAR(255), + `before_status` VARCHAR(255), `tag` VARCHAR(255), `command_endpoint` VARCHAR(255), `transfer_endpoint` VARCHAR(255), @@ -216,7 +220,6 @@ data: COLLATE latin1_swedish_ci; CREATE INDEX `idx_session_id_session_ranks` ON `session_ranks` (`session_id`); - - {{- end }} + {{- end }} --- {{- end }} \ No newline at end of file diff --git a/helm-charts/FATE/templates/core/osx/configmap.yaml b/helm-charts/FATE/templates/core/osx/configmap.yaml index 31d4a5a0c..87ff26cbe 100644 --- a/helm-charts/FATE/templates/core/osx/configmap.yaml +++ b/helm-charts/FATE/templates/core/osx/configmap.yaml @@ -43,7 +43,7 @@ data: } }, "self_party":[ - ".Values.partyId" + "{{ .Values.partyId }}" ], "permission": { diff --git a/helm-charts/FATE/values-template.yaml b/helm-charts/FATE/values-template.yaml index 2d4386d45..a03d51b3d 100644 --- a/helm-charts/FATE/values-template.yaml +++ b/helm-charts/FATE/values-template.yaml @@ -116,7 +116,7 @@ podSecurityPolicy: ingressClassName: {{ .ingressClassName | default "nginx"}} exchange: -{{- with .rollsite }} +{{- with .osx }} {{- with .exchange }} partyIp: {{ .ip }} partyPort: {{ .port }} @@ -133,7 +133,7 @@ exchangeList: {{- end }} partyList: -{{- with .rollsite }} +{{- with .osx }} {{- range .partyList }} - partyId: {{ .partyId }} partyIp: {{ .partyIp }} @@ -147,8 +147,8 @@ persistence: modules: osx: include: {{ has "osx" .modules }} - {{- with .rollsite }} - ip: rollsite + {{- with .osx }} + ip: osx image: {{ .image | default "federatedai/osx" }} imageTag: {{ .imageTag | default "2.0.0-release" }} type: {{ .type | default "ClusterIP" }}