Skip to content

Commit

Permalink
Make Kubefate support Fate v1.5.3 (#560) (#561)
Browse files Browse the repository at this point in the history
* Support v1.5.3

Signed-off-by: Chen Jing <[email protected]>
  • Loading branch information
LaynePeng authored Mar 18, 2022
1 parent baaff8a commit e03365c
Show file tree
Hide file tree
Showing 20 changed files with 76 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docker-build/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#PREFIX=federatedai
#IMG_TAG=1.5.1-release
#IMG_TAG=1.5.3-release
2 changes: 1 addition & 1 deletion docker-deploy/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RegistryURI=
TAG=1.5.1-release
TAG=1.5.3-release
SERVING_TAG=2.0.0-release

# PREFIX: namespace on the registry's server.
Expand Down
3 changes: 3 additions & 0 deletions docker-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ computing_backend=eggroll

# true if you need python-nn else false, the default value will be false
enabled_nn=false

fateboard_username=admin # Username to access fateboard
fateboard_password=admin # Password to access fateboard
```

Spark was introduced in FATE v1.5 as the underlying computing backend, for more details
Expand Down
4 changes: 4 additions & 0 deletions docker-deploy/generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ GenerateConfig() {

eval fateboard_ip=fateboard
eval fateboard_port=8080
eval fateboard_username=${fateboard_username}
eval fateboard_password=${fateboard_password}

eval fate_flow_ip=python
eval fate_flow_grpc_port=9360
Expand Down Expand Up @@ -150,6 +152,8 @@ GenerateConfig() {
sed -i "s#<jdbc.username>#${db_user}#g" ./confs-$party_id/confs/fateboard/conf/application.properties
sed -i "s#<jdbc.password>#${db_password}#g" ./confs-$party_id/confs/fateboard/conf/application.properties
sed -i "s#<jdbc.url>#jdbc:mysql://${db_ip}:3306/${db_name}?characterEncoding=utf8\&characterSetResults=utf8\&autoReconnect=true\&failOverReadOnly=false\&serverTimezone=GMT%2B8#g" ./confs-$party_id/confs/fateboard/conf/application.properties
sed -i "s#<fateboard.username>#${fateboard_username}#g" ./confs-$party_id/confs/fateboard/conf/application.properties
sed -i "s#<fateboard.password>#${fateboard_password}#g" ./confs-$party_id/confs/fateboard/conf/application.properties
echo fateboard module of $party_id done!

# mysql
Expand Down
4 changes: 4 additions & 0 deletions docker-deploy/parties.conf
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ redis_port=6379
redis_password=fate_dev

name_node=hdfs://namenode:9000

# Define fateboard login information
fateboard_username=admin
fateboard_password=admin
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ spring.datasource.druid.filter.config.enabled=false
spring.datasource.druid.web-stat-filter.enabled=false
spring.datasource.druid.stat-view-servlet.enabled=false
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain
server.board.login.username=<fateboard.username>
server.board.login.password=<fateboard.password>
1 change: 1 addition & 0 deletions fml_manager/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ COPY . /fml_manager
RUN pip install notebook fate-client
RUN python setup.py sdist bdist_wheel && pip install dist/*.whl
RUN mkdir /fml_manager/Examples/Pipeline/logs
Run pip install markupsafe==2.0.1

CMD flow init -c /data/projects/fate/conf/service_conf.yaml && pipeline init -c /data/projects/fate/conf/pipeline_conf.yaml && jupyter notebook --ip=0.0.0.0 --port=20000 --allow-root --debug --NotebookApp.notebook_dir='/fml_manager/Examples' --no-browser --NotebookApp.token='' --NotebookApp.password=''
2 changes: 1 addition & 1 deletion fml_manager/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME ?= federatedai/client
VERSION ?= v1.5.0
VERSION ?= v1.5.3
IMG ?= ${NAME}:${VERSION:v%=%-release}

docker-build:
Expand Down
9 changes: 6 additions & 3 deletions helm-charts/FATE-Serving/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# limitations under the License.

{{ if .Values.servingProxy.include }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: serving-proxy
Expand All @@ -26,8 +26,11 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: serving-proxy
servicePort: 8059
service:
name: serving-proxy
port:
number: 8059
---
{{ end }}
4 changes: 2 additions & 2 deletions helm-charts/FATE/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
appVersion: v1.5.1
appVersion: v1.5.3
description: A Helm chart for fate-training
name: fate
version: v1.5.1
version: v1.5.3
home: https://fate.fedai.org
icon: https://aisp-1251170195.cos.ap-hongkong.myqcloud.com/wp-content/uploads/sites/12/2019/09/logo.png
sources:
Expand Down
36 changes: 24 additions & 12 deletions helm-charts/FATE/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{ if .Values.istio.enabled }}
{{ else }}
{{ if .Values.modules.fateboard.include }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: fateboard
Expand All @@ -24,14 +24,17 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: fateboard
servicePort: 8080
service:
name: fateboard
port:
number: 8080
---
{{ end }}

{{ if .Values.modules.client.include }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: client
Expand All @@ -44,14 +47,17 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: notebook
servicePort: 20000
service:
name: notebook
port:
number: 20000
---
{{ end }}

{{ if .Values.modules.spark.include }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: spark
Expand All @@ -64,14 +70,17 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: spark-master
servicePort: 8080
service:
name: spark-master
port:
number: 8080
---
{{ end }}

{{ if .Values.modules.rabbitmq.include }}
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: rabbitmq
Expand All @@ -84,9 +93,12 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: rabbitmq
servicePort: 15672
service:
name: rabbitmq
port:
number: 15672
---
{{ end }}
{{ end }}
2 changes: 2 additions & 0 deletions helm-charts/FATE/templates/python-spark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ data:
spring.datasource.druid.stat-view-servlet.enabled=false
server.compression.enabled=true
server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain
server.board.login.username={{ .Values.modules.fateboard.username }}
server.board.login.password={{ .Values.modules.fateboard.password }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
10 changes: 7 additions & 3 deletions helm-charts/FATE/values-template-example.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fate-9999
namespace: fate-9999
chartName: fate
chartVersion: v1.5.1
chartVersion: v1.5.3
partyId: 9999
registry: ""
imageTag: ""
Expand Down Expand Up @@ -123,15 +123,15 @@ backend: eggroll
# spark:
# master:
# Image: "federatedai/spark-master"
# ImageTag: "1.5.0-release"
# ImageTag: "1.5.3-release"
# replicas: 1
# cpu: "100m"
# memory: "512Mi"
# nodeSelector:
# type: ClusterIP
# worker:
# Image: "federatedai/spark-worker"
# ImageTag: "1.5.0-release"
# ImageTag: "1.5.3-release"
# replicas: 2
# cpu: "1000m"
# memory: "512Mi"
Expand Down Expand Up @@ -159,6 +159,10 @@ backend: eggroll
# - host: 192.168.0.1
# http_port: 30107
# grpc_port: 30102
# fateboard:
# type: ClusterIP
# username: admin
# password: admin
# rabbitmq:
# nodeSelector:
# type: ClusterIP
Expand Down
6 changes: 4 additions & 2 deletions helm-charts/FATE/values-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
image:
registry: {{ .registry | default "federatedai" }}
isThridParty: {{ empty .registry | ternary "false" "true" }}
tag: {{ .imageTag | default "1.5.1-release" }}
tag: {{ .imageTag | default "1.5.3-release" }}
pullPolicy: {{ .pullPolicy | default "IfNotPresent" }}
{{- with .imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -211,8 +211,10 @@ modules:

fateboard:
include: {{ has "fateboard" .modules }}
{{- with .spark }}
{{- with .fateboard }}
type: {{ .type }}
username: {{ .username }}
password: {{ .password }}
{{- end }}


Expand Down
4 changes: 3 additions & 1 deletion helm-charts/FATE/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
image:
registry: federatedai
isThridParty:
tag: 1.5.1-release
tag: 1.5.3-release
pullPolicy: IfNotPresent
imagePullSecrets:
# - name:
Expand Down Expand Up @@ -129,6 +129,8 @@ modules:
fateboard:
include: true
type: ClusterIP
username: admin
password: admin
spark:
include: true
master:
Expand Down
1 change: 1 addition & 0 deletions k8s-deploy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
2 changes: 1 addition & 1 deletion k8s-deploy/cluster.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fate-9999
namespace: fate-9999
chartName: fate
chartVersion: v1.5.1
chartVersion: v1.5.3
partyId: 9999
registry: ""
imageTag: ""
Expand Down
2 changes: 1 addition & 1 deletion k8s-deploy/examples/party-10000/cluster-spark.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fate-10000
namespace: fate-10000
chartName: fate
chartVersion: v1.5.1
chartVersion: v1.5.3
partyId: 10000
registry: ""
imageTag: ""
Expand Down
2 changes: 1 addition & 1 deletion k8s-deploy/examples/party-9999/cluster-spark.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fate-9999
namespace: fate-9999
chartName: fate
chartVersion: v1.5.1
chartVersion: v1.5.3
partyId: 9999
registry: ""
imageTag: ""
Expand Down
9 changes: 6 additions & 3 deletions k8s-deploy/kubefate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ spec:
selector:
fate: kubefate
---
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: kubefate
Expand All @@ -162,6 +162,9 @@ spec:
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: kubefate
servicePort: 8080
service:
name: kubefate
port:
number: 8080

0 comments on commit e03365c

Please sign in to comment.