forked from FederatedAI/KubeFATE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh
97 lines (78 loc) · 5 KB
/
config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
source party.config
echo "FATE chartVersion: "${fate_chartVersion}
echo "FATE-Serving chartVersion: "${fate_serving_chartVersion}
echo "Party 9999 IP: "${party_9999_IP}
echo "Party 10000 IP: "${party_10000_IP}
echo "Party exchange IP: "${party_exchange_IP}
# Compatible with Mac
SED=sed
unamestr=`uname`
if [[ "$unamestr" == "Darwin" ]] ; then
SED=gsed
type $SED >/dev/null 2>&1 || {
echo >&2 "$SED it's not installed. Try: brew install gnu-sed" ;
exit 1;
}
fi
# 9999 config
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" party-9999/cluster.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_serving_chartVersion}/g" ./party-9999/cluster-serving.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-9999/cluster-spark-rabbitmq.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-9999/cluster-spark-pulsar.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-9999/cluster-spark-local-pulsar.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-9999/cluster.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-9999/cluster-serving.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-9999/cluster-spark-rabbitmq.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-9999/cluster-spark-pulsar.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-9999/cluster-spark-local-pulsar.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-9999/cluster.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-9999/cluster-serving.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-9999/cluster-spark-rabbitmq.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-9999/cluster-spark-pulsar.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-9999/cluster-spark-local-pulsar.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-9999/cluster.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-9999/cluster-serving.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-9999/cluster-spark-rabbitmq.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-9999/cluster-spark-pulsar.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-9999/cluster-spark-local-pulsar.yaml
for item in `ls party-9999`
do
$SED -i "s/algorithm: .*/algorithm: ${algorithm}/g" ./party-9999/$item
$SED -i "s/device: .*/device: ${device}/g" ./party-9999/$item
done
# 10000 config
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-10000/cluster.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_serving_chartVersion}/g" ./party-10000/cluster-serving.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-10000/cluster-spark-rabbitmq.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-10000/cluster-spark-pulsar.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-10000/cluster-spark-local-pulsar.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-10000/cluster.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-10000/cluster-serving.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-10000/cluster-spark-rabbitmq.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-10000/cluster-spark-pulsar.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-10000/cluster-spark-local-pulsar.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-10000/cluster.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-10000/cluster-serving.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-10000/cluster-spark-rabbitmq.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-10000/cluster-spark-pulsar.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-10000/cluster-spark-local-pulsar.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-10000/cluster.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-10000/cluster-serving.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-10000/cluster-spark-rabbitmq.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-10000/cluster-spark-pulsar.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-10000/cluster-spark-local-pulsar.yaml
for item in `ls party-10000`
do
$SED -i "s/algorithm: .*/algorithm: ${algorithm}/g" ./party-10000/$item
$SED -i "s/device: .*/device: ${device}/g" ./party-10000/$item
done
# exchange config
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-exchange/rollsite.yaml
$SED -i "s/chartVersion: .*/chartVersion: ${fate_chartVersion}/g" ./party-exchange/trafficServer.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-exchange/rollsite.yaml
$SED -i "s/192.168.9.1/${party_9999_IP}/g" ./party-exchange/trafficServer.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-exchange/rollsite.yaml
$SED -i "s/192.168.10.1/${party_10000_IP}/g" ./party-exchange/trafficServer.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-exchange/rollsite.yaml
$SED -i "s/192.168.0.1/${party_exchange_IP}/g" ./party-exchange/trafficServer.yaml