Skip to content

Commit 0206eb5

Browse files
committed
update ppc_builder
1 parent e2af74a commit 0206eb5

File tree

7 files changed

+75
-3
lines changed

7 files changed

+75
-3
lines changed

cpp/tools/build_ppc.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,14 @@ generate_node_config_ini() {
484484
replace-datanode-on-failure = false
485485
; the connection-timeout, in ms, default is 1000ms
486486
connection-timeout = 1000
487+
; enable auth or not, default is false
488+
; enable_krb5_auth = false
489+
; the hdfs kerberos auth principal, used when enable_krb5_auth
490+
; auth_principal =
491+
; the hdfs kerberos auth password, used when enable_krb5_auth
492+
; auth_password =
493+
; the ccache path, used when enable_krb5_auth
494+
; ccache_path = /tmp/krb5cc_ppc_node
487495
488496
489497
[ra2018psi]

cpp/tools/build_wedpr_cem.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,14 @@ generate_config_ini() {
362362
replace-datanode-on-failure = false
363363
; the connection-timeout, in ms, default is 1000ms
364364
connection-timeout = 2000
365+
; enable auth or not, default is false
366+
; enable_krb5_auth = false
367+
; the hdfs kerberos auth principal, used when enable_krb5_auth
368+
; auth_principal =
369+
; the hdfs kerberos auth password, used when enable_krb5_auth
370+
; auth_password =
371+
; the ccache path, used when enable_krb5_auth
372+
; ccache_path = /tmp/krb5cc_ppc_node
365373
366374
[cert]
367375
; directory the certificates located in

cpp/tools/build_wedpr_mpc.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,14 @@ generate_config_ini() {
366366
replace-datanode-on-failure = false
367367
; the connection-timeout, in ms, default is 1000ms
368368
connection-timeout = 2000
369+
; enable auth or not, default is false
370+
; enable_krb5_auth = false
371+
; the hdfs kerberos auth principal, used when enable_krb5_auth
372+
; auth_principal =
373+
; the hdfs kerberos auth password, used when enable_krb5_auth
374+
; auth_password =
375+
; the ccache path, used when enable_krb5_auth
376+
; ccache_path = /tmp/krb5cc_ppc_node
369377
370378
[transport]
371379
; the endpoint information

cpp/tools/ppc-builder/conf/config-example.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ holding_msg_minutes = 30
9494
name_node = "127.0.0.1"
9595
name_node_port = 9000
9696
token = ""
97+
# enable auth or not, default is false
98+
enable_krb5_auth = false
99+
# the hdfs kerberos auth principal, used when enable_krb5_auth
100+
auth_principal = ""
101+
# the hdfs kerberos auth password, used when enable_krb5_auth
102+
auth_password = ""
103+
# the ccache path, used when enable_krb5_auth
104+
ccache_path = "/tmp/krb5cc_ppc_node"
105+
97106
# the gateway config
98107
[agency.node.gateway]
99108
gateway_grpc_target = ["127.0.0.1:40600", "127.0.0.1:40601"]
@@ -179,6 +188,14 @@ holding_msg_minutes = 30
179188
name_node = "127.0.0.1"
180189
name_node_port = 9000
181190
token = ""
191+
# enable auth or not, default is false
192+
enable_krb5_auth = false
193+
# the hdfs kerberos auth principal, used when enable_krb5_auth
194+
auth_principal = ""
195+
# the hdfs kerberos auth password, used when enable_krb5_auth
196+
auth_password = ""
197+
# the ccache path, used when enable_krb5_auth
198+
ccache_path = "/tmp/krb5cc_ppc_node"
182199
# the gateway config
183200
[agency.node.gateway]
184201
gateway_grpc_target = ["127.0.0.1:40620", "127.0.0.1:40621"]

cpp/tools/ppc-builder/src/config/ppc_deploy_config.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,24 @@ def __init__(self, config, config_section, must_exist):
116116
self.config, "name_node_port", None, must_exist, config_section)
117117
self.token = utilities.get_item_value(
118118
self.config, "token", "", False, config_section)
119+
# enable auth or not
120+
enable_krb5_auth = utilities.get_item_value(
121+
self.config, "enable_krb5_auth", "",
122+
False, config_section)
123+
self.enable_krb5_auth_str = utilities.convert_bool_to_str(
124+
enable_krb5_auth)
125+
# auth principal
126+
self.auth_principal = utilities.get_item_value(
127+
self.config, "auth_principal",
128+
"", enable_krb5_auth, config_section)
129+
# auth password
130+
self.auth_password = utilities.get_item_value(
131+
self.config, "auth_password",
132+
"", enable_krb5_auth, config_section)
133+
# cacche path
134+
self.ccache_path = utilities.get_item_value(
135+
self.config, "ccache_path",
136+
"", enable_krb5_auth, config_section)
119137

120138

121139
class RA2018PSIConfig:

cpp/tools/ppc-builder/src/config/ppc_node_config_generator.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,14 @@ def __generate_hdfs_storage_config__(self, config_content, hdfs_storage_config):
191191
config_content[section_name]["name_node_port"] = str(
192192
hdfs_storage_config.name_node_port)
193193
config_content[section_name]["token"] = hdfs_storage_config.token
194-
195-
def __generate_transport_config__(self, config_content, node_config, node_id, deploy_ip, node_index):
194+
config_content[section_name]["enable_krb5_auth"] = hdfs_storage_config.enable_krb5_auth_str
195+
config_content[section_name]["auth_principal"] = hdfs_storage_config.auth_principal
196+
config_content[section_name]["auth_password"] = hdfs_storage_config.auth_password
197+
config_content[section_name]["ccache_path"] = hdfs_storage_config.ccache_path
198+
199+
def __generate_transport_config__(self, config_content,
200+
node_config, node_id,
201+
deploy_ip, node_index):
196202
"""_summary_
197203
198204
Args:

cpp/tools/ppc-builder/src/tpl/config.ini.node

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,14 @@
6161
replace-datanode-on-failure = false
6262
; the connection-timeout, in ms, default is 1000ms
6363
connection-timeout = 1000
64-
64+
; enable auth or not, default is false
65+
; enable_krb5_auth = false
66+
; the hdfs kerberos auth principal, used when enable_krb5_auth
67+
; auth_principal =
68+
; the hdfs kerberos auth password, used when enable_krb5_auth
69+
; auth_password =
70+
; the ccache path, used when enable_krb5_auth
71+
; ccache_path = /tmp/krb5cc_ppc_node
6572

6673
[ra2018psi]
6774
; The database used to store cuckoo-filter

0 commit comments

Comments
 (0)