Skip to content

Commit

Permalink
Head node and login node ip in motd (#470)
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Smith <[email protected]>
  • Loading branch information
sean-smith authored Oct 29, 2024
1 parent 368f304 commit 9021ae3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ def main(args):

print("This is a slurm cluster. Do additional slurm setup")
self_ip = get_ip_address()
head_node_ip = resource_config.get_list_of_addresses(params.controller_group)
login_node_ip = resource_config.get_list_of_addresses(params.login_group)
print(f"This node ip address is {self_ip}")

group, instance = resource_config.find_instance_by_address(self_ip)
Expand All @@ -177,7 +179,7 @@ def main(args):
ExecuteBashScript("./setup_mariadb_accounting.sh").run()

ExecuteBashScript("./apply_hotfix.sh").run(node_type)
ExecuteBashScript("./utils/motd.sh").run(node_type)
ExecuteBashScript("./utils/motd.sh").run(node_type, ",".join(head_node_ip), ",".join(login_node_ip))
ExecuteBashScript("./utils/fsx_ubuntu.sh").run()

ExecuteBashScript("./start_slurm.sh").run(node_type, ",".join(controllers))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ instance_type=$(curl -H "X-aws-ec2-metadata-token: $token" -v http://169.254.169
GREEN="\e[32m"
ENDCOLOR="\e[0m"
echo -e "You're on the ${GREEN}$1${ENDCOLOR}" | sudo tee -a /etc/motd
echo -e "Controller Node IP: ${GREEN}$2${ENDCOLOR}" | sudo tee -a /etc/motd
echo -e "Login Node IP: ${GREEN}$3${ENDCOLOR}" | sudo tee -a /etc/motd
echo -e "Instance Type: ${GREEN}ml.${instance_type}${ENDCOLOR}" | sudo tee -a /etc/motd

0 comments on commit 9021ae3

Please sign in to comment.