Skip to content

Commit

Permalink
refactored taskfile.yml and bumped hedera version to 0.57.2
Browse files Browse the repository at this point in the history
Signed-off-by: Jeromy Cannon <[email protected]>
  • Loading branch information
jeromy-cannon committed Dec 11, 2024
1 parent 1783428 commit f9bbbf8
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 110 deletions.
93 changes: 77 additions & 16 deletions HelperTasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ tasks:
- echo "SOLO_NAMESPACE={{ .SOLO_NAMESPACE }}"
- echo "nodes={{ .nodes }}"
- echo "node_identifiers={{ .node_identifiers }}"
- echo "run_build_file={{ .run_build_file }}"
- echo "VALUES_FLAG={{ .VALUES_FLAG }}"
- echo "SETTINGS_FLAG={{ .SETTINGS_FLAG }}"
- echo "SOLO_HOME_DIR={{ .SOLO_HOME_DIR }}"
- echo "LOG4J2_FLAG={{ .LOG4J2_FLAG }}"
- echo "APPLICATION_PROPERTIES_FLAG={{ .APPLICATION_PROPERTIES_FLAG }}"
- echo "LOCAL_BUILD_FLAG={{ .LOCAL_BUILD_FLAG }}"
- touch {{ .var_check_file }}

readme:
Expand All @@ -85,12 +90,9 @@ tasks:

install:solo:
internal: true
status:
- command -v solo
cmds:
- npm install -g @hashgraph/solo
- cd ../..
- npm link
- cd ..
- npm install

install:kubectl:darwin:
internal: true
Expand Down Expand Up @@ -128,7 +130,7 @@ tasks:
#- test "$(yq -r '.flags."node-ids"' < {{ .solo_user_dir }}/solo.yaml)" == "{{ .node_identifiers }}"
- test "$(jq -r '.flags."node-ids"' < {{ .solo_user_dir }}/solo.config)" == "{{ .node_identifiers }}"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo init
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- init

solo:keys:
internal: true
Expand All @@ -143,29 +145,29 @@ tasks:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo node keys --gossip-keys --tls-keys --node-aliases-unparsed {{.node_identifiers}}
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- node keys --gossip-keys --tls-keys --node-aliases-unparsed {{.node_identifiers}}

solo:network:deploy:
internal: true
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo network deploy --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" --solo-chart-version "${SOLO_CHART_VERSION}"
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo node setup --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}"
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- network deploy --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" --solo-chart-version "${SOLO_CHART_VERSION}"
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- node setup --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}"

solo:network:destroy:
internal: true
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo network destroy --namespace "${SOLO_NAMESPACE}" --delete-pvcs --delete-secrets --force
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- network destroy --namespace "${SOLO_NAMESPACE}" --delete-pvcs --delete-secrets --force

solo:node:start:
internal: true
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo node start --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} {{ .CLI_ARGS }}
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- node start --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} {{ .CLI_ARGS }}
- kubectl port-forward -n "${SOLO_NAMESPACE}" svc/haproxy-node1-svc 50211:50211 &
- task: "sleep_after_port_forward"

Expand All @@ -175,13 +177,13 @@ tasks:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo node stop --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} {{ .CLI_ARGS }}
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- node stop --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} {{ .CLI_ARGS }}

solo:relay:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo relay deploy -n "${SOLO_NAMESPACE}" -i node1
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- relay deploy -n "${SOLO_NAMESPACE}" -i node1
- echo "Enable port forwarding for Hedera JSON RPC Relay"
- kubectl port-forward -n "${SOLO_NAMESPACE}" svc/relay-node1-hedera-json-rpc-relay 7546:7546 &
- task: "sleep_after_port_forward"
Expand All @@ -192,7 +194,7 @@ tasks:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo relay destroy -n "${SOLO_NAMESPACE}" -i node1
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- relay destroy -n "${SOLO_NAMESPACE}" -i node1

solo:cache:remove:
internal: true
Expand Down Expand Up @@ -220,12 +222,13 @@ tasks:
- kind get clusters | grep -q "${SOLO_CLUSTER_NAME}"
cmds:
- kind create cluster -n "${SOLO_CLUSTER_NAME}" --image "${KIND_IMAGE}"
- sleep 10 # wait for control plane to come up

cluster:setup:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo cluster setup --cluster-setup-namespace "${SOLO_CLUSTER_SETUP_NAMESPACE}"
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- cluster setup --cluster-setup-namespace "${SOLO_CLUSTER_SETUP_NAMESPACE}"

cluster:destroy:
cmds:
Expand Down Expand Up @@ -259,3 +262,61 @@ tasks:
else
echo "--no-minio" > {{ .minio_flag }}
fi
solo:cluster:setup:
deps:
- task: "init"
- task: "solo:cluster:minio"
status:
- helm list --all-namespaces | grep -qz "${SOLO_CLUSTER_RELEASE_NAME}"
cmds:
- export MINIO_FLAG=$(cat {{ .minio_flag }})
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- cluster setup --cluster-setup-namespace "${SOLO_CLUSTER_SETUP_NAMESPACE}" "${MINIO_FLAG}"

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 }}

solo:custom:network:deploy:
internal: true
dir: "{{.USER_WORKING_DIR}}"
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- network deploy --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" --solo-chart-version "${SOLO_CHART_VERSION}" ${VALUES_FLAG} ${SETTINGS_FLAG} ${LOG4J2_FLAG} ${APPLICATION_PROPERTIES_FLAG}
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- node setup --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" ${LOCAL_BUILD_FLAG}

start:
desc: solo node start
deps:
- task: "init"
cmds:
- task: "solo:node:start"

stop:
desc: solo node stop
deps:
- task: "init"
cmds:
- task: "solo:node:stop"

show:ips:
deps:
- task: "init"
cmds:
- task: "solo:node:addresses"

clean:cache:
desc: remove solo cache directory
deps:
- task: "init"
cmds:
- task: "solo:cache:remove"

clean:logs:
desc: remove solo logs director
deps:
- task: "init"
cmds:
- task: "solo:logs:remove"
38 changes: 6 additions & 32 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ env:
SOLO_NETWORK_SIZE: 2
SOLO_NAMESPACE: solo-e2e
SOLO_CHART_VERSION: 0.36.1
CONSENSUS_NODE_VERSION: v0.57.1
CONSENSUS_NODE_VERSION: v0.57.2
vars:
ip_list_template_file: "{{.ROOT_DIR}}/list-external-ips.gotemplate"

tasks:
default:
desc: install Solo, deploy the network, set it up, and start it
desc: install Solo, create a kind cluster, deploy the network, set it up, and start it
deps:
- task: "init"
cmds:
Expand Down Expand Up @@ -47,26 +49,12 @@ tasks:
- task: "solo:keys"
- task: "solo:network:deploy"

start:
desc: solo node start
deps:
- task: "init"
cmds:
- task: "solo:node:start"

stop:
desc: solo node stop
deps:
- task: "init"
cmds:
- task: "solo:node:stop"

solo:mirror-node:
desc: solo mirror-node deploy with port forward on explorer
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo mirror-node deploy --namespace "${SOLO_NAMESPACE}"
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- mirror-node deploy --namespace "${SOLO_NAMESPACE}"
- echo "Enable port forwarding for Hedera Explorer & Mirror Node Network"
- kubectl port-forward -n "${SOLO_NAMESPACE}" svc/hedera-explorer 8080:80 &
- kubectl port-forward svc/mirror-grpc -n "${SOLO_NAMESPACE}" 5600:5600 &
Expand All @@ -79,7 +67,7 @@ tasks:
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo mirror-node destroy --namespace "${SOLO_NAMESPACE}" --force || true
- SOLO_HOME_DIR=${SOLO_HOME_DIR} npm run solo -- mirror-node destroy --namespace "${SOLO_NAMESPACE}" --force || true

destroy:
desc: destroy relay, mirror-node, and network
Expand All @@ -102,17 +90,3 @@ tasks:
- task: "clean:logs"
- task: "solo:config:remove"
- task: "clean:port-forward"

clean:cache:
desc: remove solo cache directory
deps:
- task: "init"
cmds:
- task: "solo:cache:remove"

clean:logs:
desc: remove solo logs director
deps:
- task: "init"
cmds:
- task: "solo:logs:remove"
59 changes: 2 additions & 57 deletions examples/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,15 @@ tasks:
- task: "start"

install:
desc: solo init, solo cluster create, solo node keys, solo network deploy
deps:
- task: "init"
cmds:
- task: "solo:init"
- task: "solo:keys"
- task: "solo:cluster:setup"
- task: "solo:keys"
- task: "solo:custom:network:deploy"

start:
deps:
- task: "init"
cmds:
- task: "solo:node:start"

stop:
deps:
- task: "init"
cmds:
- task: "solo:node:stop"

show:ips:
deps:
- task: "init"
cmds:
- task: "solo:node:addresses"

destroy:
deps:
- task: "init"
Expand All @@ -56,41 +39,3 @@ tasks:
- task: "destroy"
- task: "clean:cache"
- task: "clean:logs"

clean:cache:
deps:
- task: "init"
cmds:
- task: "solo:cache:remove"

clean:logs:
deps:
- task: "init"
cmds:
- task: "solo:logs:remove"

# Do not use network:deploy from HelperTasks.yml since custom network need extra settings and values files
solo:custom:network:deploy:
internal: true
dir: "{{.USER_WORKING_DIR}}"
deps:
- task: "init"
cmds:
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo network deploy --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" --solo-chart-version "${SOLO_CHART_VERSION}" ${VALUES_FLAG} ${SETTINGS_FLAG} ${LOG4J2_FLAG} ${APPLICATION_PROPERTIES_FLAG}
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo node setup --namespace "${SOLO_NAMESPACE}" --node-aliases-unparsed {{.node_identifiers}} --release-tag "${CONSENSUS_NODE_VERSION}" ${LOCAL_BUILD_FLAG}

# 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 }}

solo:cluster:setup:
deps:
- task: "init"
- task: "solo:cluster:minio"
status:
- helm list --all-namespaces | grep -qz "${SOLO_CLUSTER_RELEASE_NAME}"
cmds:
- export MINIO_FLAG=$(cat {{ .minio_flag }})
- SOLO_HOME_DIR=${SOLO_HOME_DIR} solo cluster setup --cluster-setup-namespace "${SOLO_CLUSTER_SETUP_NAMESPACE}" "${MINIO_FLAG}"
5 changes: 3 additions & 2 deletions examples/custom-network-config/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ env:
SOLO_NETWORK_SIZE: 10
SOLO_NAMESPACE: solo-alex-kuzmin-n4
SOLO_CHART_VERSION: 0.36.1
CONSENSUS_NODE_VERSION: v0.57.1
CONSENSUS_NODE_VERSION: v0.57.2
VALUES_FLAG: "--values-file init-containers-values.yaml"
SETTINGS_FLAG: "--settings-txt settings.txt"
SOLO_HOME_DIR: "/Users/user/.solo-${SOLO_NAMESPACE}"
# LOG4J2_FLAG: "--log4j2-xml log4j2.xml"
# APPLICATION_PROPERTIES_FLAG: "--application-properties application.properties"
# LOCAL_BUILD_FLAG: "--local-build \"${LOCALDIR}/hedera-node/data\""
# HEDERA_SERVICES_ROOT: "/Users/user/source/hedera-services"
# LOCAL_BUILD_FLAG: "--local-build \"${HEDERA_SERVICES_ROOT}/hedera-node/data\""
5 changes: 3 additions & 2 deletions examples/hashsphere-0001/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ env:
SOLO_NETWORK_SIZE: 5
SOLO_NAMESPACE: solo-jeromy-20241231
SOLO_CHART_VERSION: 0.36.1
CONSENSUS_NODE_VERSION: v0.57.1
CONSENSUS_NODE_VERSION: v0.57.2
VALUES_FLAG: "--values-file init-containers-values.yaml"
SETTINGS_FLAG: "--settings-txt settings.txt"
SOLO_HOME_DIR: "/Users/user/.solo-${SOLO_NAMESPACE}"
# LOG4J2_FLAG: "--log4j2-xml log4j2.xml"
# APPLICATION_PROPERTIES_FLAG: "--application-properties application.properties"
# LOCAL_BUILD_FLAG: "--local-build \"${LOCALDIR}/hedera-node/data\""
# HEDERA_SERVICES_ROOT: "/Users/user/source/hedera-services"
# LOCAL_BUILD_FLAG: "--local-build \"${HEDERA_SERVICES_ROOT}/hedera-node/data\""
17 changes: 17 additions & 0 deletions examples/performance-tuning/HashSphere/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 3
includes:
main:
taskfile: ../Taskfile.yml
flatten: true
env:
SOLO_NETWORK_SIZE: 7
SOLO_NAMESPACE: solo-perf-hashsphere
SOLO_CHART_VERSION: 0.36.1
CONSENSUS_NODE_VERSION: v0.57.2
VALUES_FLAG: "--values-file init-containers-values.yaml"
SETTINGS_FLAG: "--settings-txt settings.txt"
SOLO_HOME_DIR: "/Users/user/.solo-${SOLO_NAMESPACE}"
# LOG4J2_FLAG: "--log4j2-xml log4j2.xml"
# APPLICATION_PROPERTIES_FLAG: "--application-properties application.properties"
# HEDERA_SERVICES_ROOT: "/Users/user/source/hedera-services"
# LOCAL_BUILD_FLAG: "--local-build \"${HEDERA_SERVICES_ROOT}/hedera-node/data\""
17 changes: 17 additions & 0 deletions examples/performance-tuning/Latitude/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 3
includes:
main:
taskfile: ../Taskfile.yml
flatten: true
env:
SOLO_NETWORK_SIZE: 10
SOLO_NAMESPACE: solo-perf-hashsphere
SOLO_CHART_VERSION: 0.36.1
CONSENSUS_NODE_VERSION: v0.57.2
VALUES_FLAG: "--values-file init-containers-values.yaml"
SETTINGS_FLAG: "--settings-txt settings.txt"
SOLO_HOME_DIR: "/Users/user/.solo-${SOLO_NAMESPACE}"
# LOG4J2_FLAG: "--log4j2-xml log4j2.xml"
# APPLICATION_PROPERTIES_FLAG: "--application-properties application.properties"
# HEDERA_SERVICES_ROOT: "/Users/user/source/hedera-services"
# LOCAL_BUILD_FLAG: "--local-build \"${HEDERA_SERVICES_ROOT}/hedera-node/data\""
2 changes: 1 addition & 1 deletion version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
export const JAVA_VERSION = '21.0.1+12';
export const HELM_VERSION = 'v3.14.2';
export const SOLO_CHART_VERSION = '0.36.1';
export const HEDERA_PLATFORM_VERSION = 'v0.57.1';
export const HEDERA_PLATFORM_VERSION = 'v0.57.2';
export const MIRROR_NODE_VERSION = '0.118.1';
export const HEDERA_EXPLORER_VERSION = '0.2.1';
export const HEDERA_JSON_RPC_RELAY_VERSION = 'v0.59.0';

0 comments on commit f9bbbf8

Please sign in to comment.