Skip to content

Commit

Permalink
chore: add example for GKE on 4core/4nodes (#1163)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Kuzmin <[email protected]>
  • Loading branch information
alex-kuzmin-hg authored Jan 14, 2025
1 parent d4e5124 commit 522b75d
Show file tree
Hide file tree
Showing 9 changed files with 1,165 additions and 0 deletions.
21 changes: 21 additions & 0 deletions examples/performance-tuning/solo-gke/Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 3
includes:
main:
taskfile: ../Taskfile.examples.yml
flatten: true
vars:
solo_home_override_dir: "/home/gke1"
env:
SOLO_NETWORK_SIZE: 4
SOLO_NAMESPACE: solo-gke1
SOLO_CHART_VERSION: 0.42.3
# CONSENSUS_NODE_VERSION: v0.58.0
VALUES_FLAG: "--values-file {{.USER_WORKING_DIR}}/init-containers-values.yaml"
SETTINGS_FLAG: "--settings-txt {{.USER_WORKING_DIR}}/settings.txt"
SOLO_HOME: "{{.solo_home_override_dir}}"
LOG4J2_FLAG: "--log4j2-xml {{.USER_WORKING_DIR}}/log4j2.xml"
APPLICATION_PROPERTIES_FLAG: "--application-properties {{.USER_WORKING_DIR}}/application.properties"
HEDERA_SERVICES_ROOT: "/home/gke1/workspaces/10nodes/hedera-services"
LOCAL_BUILD_FLAG: "--local-build-path {{.HEDERA_SERVICES_ROOT}}/hedera-node/data"
GENESIS_THROTTLES_FLAG: "--genesis-throttles-file {{.USER_WORKING_DIR}}/throttles.json"
# SOLO_CHARTS_DIR_FLAG: "-d /Users/user/source/solo-charts/charts"
24 changes: 24 additions & 0 deletions examples/performance-tuning/solo-gke/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
hedera.config.version=0
ledger.id=0x01
netty.mode=TEST
contracts.chainId=298
hedera.recordStream.logPeriod=1
balances.exportPeriodSecs=400
files.maxSizeKb=2048
hedera.recordStream.compressFilesOnCreation=true
balances.compressOnCreation=true
contracts.maxNumWithHapiSigsAccess=0
autoRenew.targetTypes=
nodes.gossipFqdnRestricted=false
hedera.profiles.active=TEST
# TODO: this is a workaround until prepareUpgrade freeze will recalculate the weight prior to writing the config.txt
staking.periodMins=1
nodes.updateAccountIdAllowed=true
blockStream.streamMode=BOTH

# Override the throttle definitions to be used during genesis.
# This override is required because release <= 0.58.x use a different default path.
bootstrap.throttleDefsJson.resource=data/config/genesis-throttles.json

#small GKE specific:
cache.warmThreads=6
174 changes: 174 additions & 0 deletions examples/performance-tuning/solo-gke/init-containers-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# hedera node configuration
hedera:
initContainers:
- name: init-hedera-node
image: busybox:stable-musl
command: ["sh", "-c", "cp -r /etc /data-saved"]
volumeMounts:
- name: hgcapp-data-saved
mountPath: /data-saved
nodes:
- name: node1
nodeId: 0
accountId: 0.0.3
root:
resources:
requests:
cpu: 2
memory: 16Gi
limits:
cpu: 4
memory: 31Gi
- name: node2
nodeId: 1
accountId: 0.0.4
root:
resources:
requests:
cpu: 2
memory: 16Gi
limits:
cpu: 4
memory: 31Gi
- name: node3
nodeId: 2
accountId: 0.0.5
root:
resources:
requests:
cpu: 2
memory: 16Gi
limits:
cpu: 4
memory: 31Gi
- name: node4
nodeId: 3
accountId: 0.0.6
root:
resources:
requests:
cpu: 2
memory: 16Gi
limits:
cpu: 4
memory: 31Gi
defaults:
haproxy:
serviceType: NodePort
envoyProxy:
loadBalancerEnabled: true
sidecars:
recordStreamUploader:
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 150m
memory: 200Mi
eventStreamUploader:
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 150m
memory: 200Mi
recordStreamSidecarUploader:
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 150m
memory: 200Mi
blockstreamUploader:
resources:
requests:
cpu: 100m
memory: 200Mi
limits:
cpu: 150m
memory: 400Mi
root:
resources:
requests:
cpu: 2
memory: 16Gi
limits:
cpu: 4
memory: 31Gi
extraEnv:
- name: JAVA_OPTS
value: "-XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ZAllocationSpikeTolerance=2 -XX:ConcGCThreads=4 -XX:MaxDirectMemorySize=4g -XX:MetaspaceSize=100M -XX:+ZGenerational -Xlog:gc*:gc.log --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true"
- name: JAVA_HEAP_MIN
value: "16g"
- name: JAVA_HEAP_MAX
value: "19g"
- name: MALLOC_ARENA_MAX
value: "1"
deployment:
podAnnotations: {}
podLabels: {}
nodeSelector:
solo.hashgraph.io/role: "consensus-node"
tolerations:
- key: "solo.hashgraph.io/role"
operator: "Equal"
value: "consensus-node"
effect: "NoSchedule"
minio-server:
secrets:
# This secret has [accessKey, secretKey] and will be randomly generated by helm
existingSecret: minio-secrets
tenant:
buckets:
- name: solo-streams
- name: solo-backups
name: minio
pools:
- servers: 1
name: pool-1
volumesPerServer: 1
size: 512Gi
storageClassName: standard-rwo
nodeSelector: {}
configuration:
name: minio-secrets
certificate:
requestAutoCert: false
environment:
MINIO_BROWSER_LOGIN_ANIMATION: off # https://github.com/minio/console/issues/2539#issuecomment-1619211962
haproxyDeployment:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: solo.hedera.com/type
operator: In
values:
- network-node
topologyKey: kubernetes.io/hostname
envoyDeployment:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: solo.hedera.com/type
operator: In
values:
- network-node
topologyKey: kubernetes.io/hostname
minioDeployment:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: solo.hedera.com/type
operator: In
values:
- network-node
topologyKey: kubernetes.io/hostname
Loading

0 comments on commit 522b75d

Please sign in to comment.