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

add script for subnet deployment #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JukLee0ira
Copy link

@JukLee0ira JukLee0ira commented Dec 2, 2024

This PR adds the script file add_node.sh which adds node to subnet.

@gzliudan
Copy link
Collaborator

gzliudan commented Dec 5, 2024

please use a tool to format shell files

@gzliudan gzliudan changed the title adding nodes deployment add script for subnet deployment Dec 5, 2024
OS_TYPE=$(uname)

# Function to handle grep on macOS and Linux differently
grep_command() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing the function keyword

}

# Function to handle sed on macOS and Linux differently
sed_command() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing the function keyword


set -eo pipefail

FILE="../docker-compose.yml"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest to also use cd "$(dirname "$0")" to make script able to run from any directory

# New subnet configuration content
NEW_SUBNET="\
subnet$NEW_SUBNET_ID:
image: xinfinorg/xdcsubnets:v0.3.1
Copy link
Collaborator

@wanwiset25 wanwiset25 Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't hardcode the image version

@@ -0,0 +1,105 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer add-node.sh filename to be inline with other scritps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants