ganache

by ethPandaOps

Helm chartv0.1.4App 6.12.2Verified publisher

Ganache is an Ethereum simulator that makes developing Ethereum applications faster, easier, and safer. It includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze.

About this chart

ganache

Ganache is an Ethereum simulator that makes developing Ethereum applications faster, easier, and safer. It includes all popular RPC functions and features (like events) and can be run deterministically to make development a breeze.

Homepage: https://www.trufflesuite.com/ganache

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}Affinity configuration for pods
annotationsobject{}Annotations for the StatefulSet
containerSecurityContextobjectSee values.yamlThe security context for containers
customCommandlist[]Command replacement for the ganache container
extraArgslist[]Extra args for the ganache container
extraContainerslist[]Additional containers
extraEnvlist[]Additional env variables
extraPortslist[]Additional ports. Useful when using extraContainers
extraVolumeMountslist[]Additional volume mounts
extraVolumeslist[]Additional volumes
fullnameOverridestring""Overrides the chart's computed fullname
image.pullPolicystring"IfNotPresent"Ganache container pull policy
image.repositorystring"trufflesuite/ganache-cli"Ganache container image repository
image.tagstring"v6.12.2"Ganache container image tag
imagePullSecretslist[]Image pull secrets for Docker images
ingress.annotationsobject{}Annotations for Ingress
ingress.enabledboolfalseIngress resource for the HTTP API
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].pathslist[]
ingress.tlslist[]Ingress TLS
initChownData.enabledbooltrueInit container to set the correct permissions to access data directories
initChownData.image.pullPolicystring"IfNotPresent"Container pull policy
initChownData.image.repositorystring"busybox"Container repository
initChownData.image.tagstring"1.34.0"Container tag
initChownData.resourcesobject{}Resource requests and limits
initContainerslist[]Additional init containers
livenessProbeobjectSee values.yamlLiveness probe
nameOverridestring""Overrides the chart's name
nodeSelectorobject{}Node selector for pods
persistence.accessModeslist["ReadWriteOnce"]Access mode for the volume claim template
persistence.annotationsobject{}Annotations for volume claim template
persistence.enabledboolfalseUses an EmptyDir when not enabled
persistence.existingClaimstringnilUse an existing PVC when persistence.enabled
persistence.selectorobject{}Selector for volume claim template
persistence.sizestring"5Gi"Requested size for volume claim template
persistentVolumeClaimRetentionPolicyobject{}PersistentVolumeClaim retention policy for the StatefulSet's volumeClaimTemplates (whenDeleted, whenScaled: Retain or Delete). Not rendered when empty, so Kubernetes keeps its default of retaining the PVCs. Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention
podAnnotationsobject{}Pod annotations
podDisruptionBudgetobject{}Define the PodDisruptionBudget spec If not set then a PodDisruptionBudget will not be created
podLabelsobject{}Pod labels
podManagementPolicystring"OrderedReady"Pod management policy
priorityClassNamestringnilPod priority class
readinessProbeobjectSee values.yamlReadiness probe
resourcesobject{}Resource requests and limits
secretEnvobject{}Additional env variables injected via a created secret
securityContextobjectSee values.yamlThe security context for pods
service.typestring"ClusterIP"Service type
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
terminationGracePeriodSecondsint30How long to wait until the pod is forcefully terminated
tolerationslist[]Tolerations for pods
topologySpreadConstraintslist[]Topology Spread Constraints for pods
updateStrategyobject{"type":"RollingUpdate"}Update strategy for the Statefulset
updateStrategy.typestring"RollingUpdate"Update strategy type

Examples

Private blockchain with pre-filled accounts generated from an HD wallet using a mnemonic phrase

secretEnv:
  # Don't re-use this mnemonic for production environments
  MNEMONIC: census exchange hotel volcano sea hunt mother enlist twelve lonely cause female

extraArgs:
  - --mnemonic="$(MNEMONIC)"
  - --accounts=10
  - --defaultBalanceEther=1000
  - --networkId=5123
  - --chainId=5123
  - --blockTime=3

Fork an existing blockchain

extraEnv:
  - name: BLOCK_NUMBER
    value: "13331332"
secretEnv:
  INFURA_PROJECT_ID: "xxxxx"

extraArgs:
  - --fork="https://mainnet.infura.io/v3/$(INFURA_PROJECT_ID)@$(BLOCK_NUMBER)"

Deploy ganache with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ganache on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartganache is pinned at v0.1.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply