Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemd Port in template value #109

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions node-runner-cli/config/CoreSystemDConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, config_dict: dict):
self.node_dir: str = "/etc/radixdlt/node"
self.node_secrets_dir: str = "/etc/radixdlt/node/secrets"
self.validator_address: str = ""
self.core_api_port: str = "3334"
self.java_opts: str = (
"--enable-preview -server -Xms12g -Xmx12g "
"-XX:MaxDirectMemorySize=2048m "
Expand Down Expand Up @@ -75,3 +76,7 @@ def ask_validator_address(self, validator_address=None):
if validator_address is None:
validator_address = Prompts.ask_validator_address()
self.set_validator_address(validator_address)

def ask_core_api_port(self):
core_api_port = Prompts.ask_core_api_port()
self.core_api_port = core_api_port
1 change: 1 addition & 0 deletions node-runner-cli/setup/SystemDSetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ def ask_core_node(argument_object: SystemDConfigArguments) -> CoreSystemdConfig:
systemd_config.core_node.generate_download_urls()
systemd_config.core_node.ask_data_directory(argument_object.data_directory)
systemd_config.core_node.ask_validator_address(argument_object.validator)
systemd_config.core_node.ask_core_api_port()
systemd_config.core_node.keydetails = BaseSetup.ask_keydetails(
argument_object.keystore_password, argument_object.new_keystore
)
Expand Down
2 changes: 1 addition & 1 deletion node-runner-cli/templates/systemd-default.config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ network.host_ip={{common_config.host_ip}}

log.level=debug

api.port=3334
api.port={{core_node.core_api_port or '3334'}}
api.transactions.enable=true
api.sign.enable=true
api.bind.address=0.0.0.0
Expand Down
1 change: 1 addition & 0 deletions node-runner-cli/utils/PromptFeeder.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class QuestionKeys:
basic_auth_password = "basic_auth_password"
core_api_disable_https_verify = "core_api_disable_https_verify"
core_api_node_name = "core_api_node_name"
core_api_port = "core_api_port"
postgres_location = "postgres_location"
postgres_db_host = "postgres_db_host"
postgres_db_port = "postgres_db_port"
Expand Down
12 changes: 12 additions & 0 deletions node-runner-cli/utils/Prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def ask_postgress_password() -> str:
)
return answer


@staticmethod
def get_postgress_user() -> str:
print(
Expand Down Expand Up @@ -104,6 +105,17 @@ def ask_CopeAPINodeName(default: str = "Core") -> str:
)
return Prompts.check_default(answer, default)

@staticmethod
def ask_core_api_port(default: str = "3334") -> str :
print(
"\nCORE API PORT: This is the port number used by core api. This config only support systemD setup"
)
answer = Helpers.input_guestion(
f"Default value is '{default}'. Press ENTER to accept default value or type in new name':",
QuestionKeys.core_api_port,
)
return Prompts.check_default(answer, default)

@staticmethod
def get_TrustWeighting():
answer = input(
Expand Down
Loading