-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a03f64b
commit d6fa4a5
Showing
15 changed files
with
170 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -476,7 +476,7 @@ generate_node_config_ini() { | |
[hdfs_storage] | ||
; the hdfs configuration | ||
user = app | ||
user = root | ||
name_node = 127.0.0.1 | ||
name_node_port = 9000 | ||
token = | ||
|
@@ -487,11 +487,13 @@ generate_node_config_ini() { | |
; enable auth or not, default is false | ||
; enable_krb5_auth = false | ||
; the hdfs kerberos auth principal, used when enable_krb5_auth | ||
; auth_principal = | ||
; auth_principal = [email protected] | ||
; 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 krb5.conf path | ||
; krb5_conf_path = conf/krb5.conf | ||
[ra2018psi] | ||
|
@@ -549,6 +551,36 @@ generate_node_config_ini() { | |
EOF | ||
} | ||
|
||
generate_krb5_file_template() | ||
{ | ||
local filepath=$1 | ||
mkdir -p $(dirname $filepath) | ||
cat << EOF > "${filepath}" | ||
[logging] | ||
default = FILE:/var/log/kerberos/krb5libs.log | ||
kdc = FILE:/var/log/kerberos/krb5kdc.log | ||
admin_server = FILE:/var/log/kerberos/kadmind.log | ||
[libdefaults] | ||
default_realm = NODE.DC1.CONSUL | ||
dns_lookup_realm = false | ||
dns_lookup_kdc = false | ||
ticket_lifetime = 24h | ||
renew_lifetime = 7d | ||
forwardable = true | ||
[realms] | ||
NODE.DC1.CONSUL = { | ||
kdc = | ||
admin_server = | ||
} | ||
[domain_realm] | ||
.node.dc1.consul = NODE.DC1.CONSUL | ||
node.dc1.consul = NODE.DC1.CONSUL | ||
EOF | ||
} | ||
|
||
generate_script_template() | ||
{ | ||
local filepath=$1 | ||
|
@@ -923,6 +955,7 @@ deploy_nodes() | |
private_key=$(generate_private_key "${node_dir}/conf") | ||
node_id=$(cat "${node_dir}/conf/node.nodeid") | ||
generate_node_config_ini "${node_dir}/config.ini" "${listen_ip}" "${gateway_port}" "${listen_ip}" "${rpc_port}" "${listen_ip}" "${grpc_port}" ${agency_id} "${count}" "${node_id}" | ||
generate_krb5_file_template "${node_dir}/conf/krb5.conf" | ||
generate_p2p_connected_conf "${node_dir}/${p2p_connected_conf_name}" "${connected_nodes}" "false" | ||
set_value ${ip//./}_count $(($(get_value ${ip//./}_count) + 1)) | ||
((++count)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -354,7 +354,7 @@ generate_config_ini() { | |
[hdfs_storage] | ||
; the hdfs configuration | ||
user = ppc | ||
user = root | ||
name_node = 127.0.0.1 | ||
name_node_port = 9900 | ||
token = | ||
|
@@ -365,11 +365,13 @@ generate_config_ini() { | |
; enable auth or not, default is false | ||
; enable_krb5_auth = false | ||
; the hdfs kerberos auth principal, used when enable_krb5_auth | ||
; auth_principal = | ||
; auth_principal = [email protected] | ||
; 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 krb5.conf path | ||
; krb5_conf_path = conf/krb5.conf | ||
[cert] | ||
; directory the certificates located in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -358,7 +358,7 @@ generate_config_ini() { | |
[hdfs_storage] | ||
; the hdfs configuration | ||
user = ppc | ||
user = root | ||
name_node = 127.0.0.1 | ||
name_node_port = 9900 | ||
token = | ||
|
@@ -369,11 +369,13 @@ generate_config_ini() { | |
; enable auth or not, default is false | ||
; enable_krb5_auth = false | ||
; the hdfs kerberos auth principal, used when enable_krb5_auth | ||
; auth_principal = | ||
; auth_principal = [email protected] | ||
; 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 krb5.conf path | ||
; krb5_conf_path = conf/krb5.conf | ||
[transport] | ||
; the endpoint information | ||
|
@@ -404,6 +406,36 @@ generate_config_ini() { | |
EOF | ||
} | ||
|
||
generate_krb5_file_template() | ||
{ | ||
local filepath=$1 | ||
mkdir -p $(dirname $filepath) | ||
cat << EOF > "${filepath}" | ||
[logging] | ||
default = FILE:/var/log/kerberos/krb5libs.log | ||
kdc = FILE:/var/log/kerberos/krb5kdc.log | ||
admin_server = FILE:/var/log/kerberos/kadmind.log | ||
[libdefaults] | ||
default_realm = NODE.DC1.CONSUL | ||
dns_lookup_realm = false | ||
dns_lookup_kdc = false | ||
ticket_lifetime = 24h | ||
renew_lifetime = 7d | ||
forwardable = true | ||
[realms] | ||
NODE.DC1.CONSUL = { | ||
kdc = | ||
admin_server = | ||
} | ||
[domain_realm] | ||
.node.dc1.consul = NODE.DC1.CONSUL | ||
node.dc1.consul = NODE.DC1.CONSUL | ||
EOF | ||
} | ||
|
||
generate_script_template() | ||
{ | ||
local filepath=$1 | ||
|
@@ -731,6 +763,7 @@ deploy_nodes() | |
private_key=$(generate_private_key "${output_dir}/conf") | ||
node_id=$(cat "${output_dir}/conf/node.nodeid") | ||
generate_config_ini "${output_dir}/config.ini" "${listen_ip}" "${rpc_port}" "${agency_info}" ${agency_id} "${listen_ip}" "${grpc_port}" "${node_id}" | ||
generate_krb5_file_template "{output_dir}/conf/krb5.conf" | ||
print_result | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,19 +90,20 @@ holding_msg_minutes = 30 | |
database = "" | ||
# the hdfs storage config | ||
[agency.node.hdfs_storage] | ||
user = "" | ||
user = "root" | ||
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 = "" | ||
auth_principal = "[email protected]" | ||
# 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 krb5 conf path | ||
krb5_conf_path = "conf/krb5.conf" | ||
# the gateway config | ||
[agency.node.gateway] | ||
gateway_grpc_target = ["127.0.0.1:40600", "127.0.0.1:40601"] | ||
|
@@ -184,18 +185,21 @@ holding_msg_minutes = 30 | |
database = "" | ||
# the hdfs storage config | ||
[agency.node.hdfs_storage] | ||
user = "" | ||
user = "root" | ||
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 = "" | ||
auth_principal = "[email protected]" | ||
# 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 krb5 conf path | ||
krb5_conf_path = "conf/krb5.conf" | ||
|
||
# the gateway config | ||
[agency.node.gateway] | ||
gateway_grpc_target = ["127.0.0.1:40620", "127.0.0.1:40621"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ | |
|
||
[hdfs_storage] | ||
; the hdfs configuration | ||
user = app | ||
user = root | ||
name_node = 127.0.0.1 | ||
name_node_port = 9000 | ||
token = | ||
|
@@ -64,11 +64,13 @@ | |
; enable auth or not, default is false | ||
; enable_krb5_auth = false | ||
; the hdfs kerberos auth principal, used when enable_krb5_auth | ||
; auth_principal = | ||
; auth_principal = [email protected] | ||
; 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 krb5.conf path | ||
; krb5_conf_path = conf/krb5.conf | ||
|
||
[ra2018psi] | ||
; The database used to store cuckoo-filter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[logging] | ||
default = FILE:/var/log/kerberos/krb5libs.log | ||
kdc = FILE:/var/log/kerberos/krb5kdc.log | ||
admin_server = FILE:/var/log/kerberos/kadmind.log | ||
|
||
[libdefaults] | ||
default_realm = NODE.DC1.CONSUL | ||
dns_lookup_realm = false | ||
dns_lookup_kdc = false | ||
ticket_lifetime = 24h | ||
renew_lifetime = 7d | ||
forwardable = true | ||
|
||
[realms] | ||
NODE.DC1.CONSUL = { | ||
kdc = | ||
admin_server = | ||
} | ||
|
||
[domain_realm] | ||
.node.dc1.consul = NODE.DC1.CONSUL | ||
node.dc1.consul = NODE.DC1.CONSUL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.