Skip to content

Commit

Permalink
update ppc_builder
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjseagull committed Dec 1, 2024
1 parent e2af74a commit 0206eb5
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 3 deletions.
8 changes: 8 additions & 0 deletions cpp/tools/build_ppc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,14 @@ generate_node_config_ini() {
replace-datanode-on-failure = false
; the connection-timeout, in ms, default is 1000ms
connection-timeout = 1000
; enable auth or not, default is false
; enable_krb5_auth = false
; the hdfs kerberos auth principal, used when enable_krb5_auth
; auth_principal =
; the hdfs kerberos auth password, used when enable_krb5_auth
; auth_password =
; the ccache path, used when enable_krb5_auth
; ccache_path = /tmp/krb5cc_ppc_node
[ra2018psi]
Expand Down
8 changes: 8 additions & 0 deletions cpp/tools/build_wedpr_cem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,14 @@ generate_config_ini() {
replace-datanode-on-failure = false
; the connection-timeout, in ms, default is 1000ms
connection-timeout = 2000
; enable auth or not, default is false
; enable_krb5_auth = false
; the hdfs kerberos auth principal, used when enable_krb5_auth
; auth_principal =
; the hdfs kerberos auth password, used when enable_krb5_auth
; auth_password =
; the ccache path, used when enable_krb5_auth
; ccache_path = /tmp/krb5cc_ppc_node
[cert]
; directory the certificates located in
Expand Down
8 changes: 8 additions & 0 deletions cpp/tools/build_wedpr_mpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,14 @@ generate_config_ini() {
replace-datanode-on-failure = false
; the connection-timeout, in ms, default is 1000ms
connection-timeout = 2000
; enable auth or not, default is false
; enable_krb5_auth = false
; the hdfs kerberos auth principal, used when enable_krb5_auth
; auth_principal =
; the hdfs kerberos auth password, used when enable_krb5_auth
; auth_password =
; the ccache path, used when enable_krb5_auth
; ccache_path = /tmp/krb5cc_ppc_node
[transport]
; the endpoint information
Expand Down
17 changes: 17 additions & 0 deletions cpp/tools/ppc-builder/conf/config-example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ holding_msg_minutes = 30
name_node = "127.0.0.1"
name_node_port = 9000
token = ""
# enable auth or not, default is false
enable_krb5_auth = false
# the hdfs kerberos auth principal, used when enable_krb5_auth
auth_principal = ""
# the hdfs kerberos auth password, used when enable_krb5_auth
auth_password = ""
# the ccache path, used when enable_krb5_auth
ccache_path = "/tmp/krb5cc_ppc_node"

# the gateway config
[agency.node.gateway]
gateway_grpc_target = ["127.0.0.1:40600", "127.0.0.1:40601"]
Expand Down Expand Up @@ -179,6 +188,14 @@ holding_msg_minutes = 30
name_node = "127.0.0.1"
name_node_port = 9000
token = ""
# enable auth or not, default is false
enable_krb5_auth = false
# the hdfs kerberos auth principal, used when enable_krb5_auth
auth_principal = ""
# the hdfs kerberos auth password, used when enable_krb5_auth
auth_password = ""
# the ccache path, used when enable_krb5_auth
ccache_path = "/tmp/krb5cc_ppc_node"
# the gateway config
[agency.node.gateway]
gateway_grpc_target = ["127.0.0.1:40620", "127.0.0.1:40621"]
18 changes: 18 additions & 0 deletions cpp/tools/ppc-builder/src/config/ppc_deploy_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,24 @@ def __init__(self, config, config_section, must_exist):
self.config, "name_node_port", None, must_exist, config_section)
self.token = utilities.get_item_value(
self.config, "token", "", False, config_section)
# enable auth or not
enable_krb5_auth = utilities.get_item_value(
self.config, "enable_krb5_auth", "",
False, config_section)
self.enable_krb5_auth_str = utilities.convert_bool_to_str(
enable_krb5_auth)
# auth principal
self.auth_principal = utilities.get_item_value(
self.config, "auth_principal",
"", enable_krb5_auth, config_section)
# auth password
self.auth_password = utilities.get_item_value(
self.config, "auth_password",
"", enable_krb5_auth, config_section)
# cacche path
self.ccache_path = utilities.get_item_value(
self.config, "ccache_path",
"", enable_krb5_auth, config_section)


class RA2018PSIConfig:
Expand Down
10 changes: 8 additions & 2 deletions cpp/tools/ppc-builder/src/config/ppc_node_config_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,14 @@ def __generate_hdfs_storage_config__(self, config_content, hdfs_storage_config):
config_content[section_name]["name_node_port"] = str(
hdfs_storage_config.name_node_port)
config_content[section_name]["token"] = hdfs_storage_config.token

def __generate_transport_config__(self, config_content, node_config, node_id, deploy_ip, node_index):
config_content[section_name]["enable_krb5_auth"] = hdfs_storage_config.enable_krb5_auth_str
config_content[section_name]["auth_principal"] = hdfs_storage_config.auth_principal
config_content[section_name]["auth_password"] = hdfs_storage_config.auth_password
config_content[section_name]["ccache_path"] = hdfs_storage_config.ccache_path

def __generate_transport_config__(self, config_content,
node_config, node_id,
deploy_ip, node_index):
"""_summary_
Args:
Expand Down
9 changes: 8 additions & 1 deletion cpp/tools/ppc-builder/src/tpl/config.ini.node
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@
replace-datanode-on-failure = false
; the connection-timeout, in ms, default is 1000ms
connection-timeout = 1000

; enable auth or not, default is false
; enable_krb5_auth = false
; the hdfs kerberos auth principal, used when enable_krb5_auth
; auth_principal =
; the hdfs kerberos auth password, used when enable_krb5_auth
; auth_password =
; the ccache path, used when enable_krb5_auth
; ccache_path = /tmp/krb5cc_ppc_node

[ra2018psi]
; The database used to store cuckoo-filter
Expand Down

0 comments on commit 0206eb5

Please sign in to comment.