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

fix: node id should start from 1 #884

Merged
merged 9 commits into from
Dec 2, 2024
23 changes: 19 additions & 4 deletions examples/custom-network-config/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 3
includes:
helper: ../HelperTasks.yml
helper: ../../HelperTasks.yml
dotenv:
- .env

Expand All @@ -20,7 +20,7 @@ vars:
ip_list_template_file: "{{.ROOT_DIR}}/list-external-ips.gotemplate"
nodes:
ref: until (env "SOLO_NETWORK_SIZE" | default .SOLO_NETWORK_SIZE | int)
node_list_internal: "{{range $idx, $n := .nodes }}node{{$n}},{{end}}"
node_list_internal: "{{range $idx, $n := .nodes }}node{{add $n 1}},{{end}}"
node_identifiers: "{{ .node_list_internal | trimSuffix \",\" }}"
solo_user_dir: "{{ env \"HOME\" }}/.solo"
solo_cache_dir: "{{ .solo_user_dir }}/cache"
Expand All @@ -41,7 +41,7 @@ tasks:
cmds:
- task: "helper:solo:init"
- task: "helper:solo:keys"
- task: "helper:solo:network:deploy"
- task: "solo:network:deploy"

start:
cmds:
Expand All @@ -53,7 +53,7 @@ tasks:

show:ips:
cmds:
- task: "helper:solo:node:addresses"
- task: "solo:node:addresses"

destroy:
cmds:
Expand All @@ -73,3 +73,18 @@ tasks:
clean:logs:
cmds:
- task: "helper:solo:logs:remove"

# Do not use network:deploy from HelperTasks.yml since custom network need extra settings and values files
solo:network:deploy:
internal: true
cmds:
- npm run build
- solo network deploy --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" --solo-chart-version "${SOLO_CHART_VERSION}" --values-file {{ .solo_values_file }} --settings-txt {{ .solo_settings_file }}
- solo node setup --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}"

# Do not use node:addresses from HelperTasks.yml since we need to use template file to get output the list of IPs
solo:node:addresses:
internal: true
cmds:
- kubectl get svc -n "${SOLO_NAMESPACE}" -l "solo.hedera.com/type=network-node-svc" --output=go-template-file={{ .ip_list_template_file }}

14 changes: 7 additions & 7 deletions examples/custom-network-config/init-containers-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ hedera:
- name: hgcapp-data-saved
mountPath: /data-saved
nodes:
- name: node0
- name: node1
accountId: 0.0.3
root:
resources:
Expand All @@ -18,7 +18,7 @@ hedera:
limits:
cpu: 24
memory: 256Gi
- name: node1
- name: node2
accountId: 0.0.4
root:
resources:
Expand All @@ -28,7 +28,7 @@ hedera:
limits:
cpu: 24
memory: 256Gi
- name: node2
- name: node3
accountId: 0.0.5
root:
resources:
Expand All @@ -38,7 +38,7 @@ hedera:
limits:
cpu: 24
memory: 256Gi
- name: node3
- name: node4
accountId: 0.0.6
root:
resources:
Expand All @@ -48,7 +48,7 @@ hedera:
limits:
cpu: 24
memory: 256Gi
- name: node4
- name: node5
accountId: 0.0.7
root:
resources:
Expand All @@ -58,7 +58,7 @@ hedera:
limits:
cpu: 24000m
memory: 64000Mi
- name: node5
- name: node6
accountId: 0.0.8
root:
resources:
Expand All @@ -68,7 +68,7 @@ hedera:
limits:
cpu: 24
memory: 256Gi
- name: node6
- name: node7
accountId: 0.0.9
root:
resources:
Expand Down
Loading