|
| 1 | +# Bitcoin-core |
| 2 | + |
| 3 | +## TL;DR |
| 4 | + |
| 5 | +```console |
| 6 | +$ helm repo add hirosystems https://charts.hiro.so/hirosystems |
| 7 | +$ helm install my-release hirosystems/bitcoin-core |
| 8 | +``` |
| 9 | + |
| 10 | +## Introduction |
| 11 | + |
| 12 | +This chart bootstraps a [bitcoin-core node](https://github.com/bitcoin/bitcoin) deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. |
| 13 | + |
| 14 | +## Prerequisites |
| 15 | + |
| 16 | +- Kubernetes 1.19+ |
| 17 | +- Helm 3.2.0+ |
| 18 | +- PV provisioner support in the underlying infrastructure |
| 19 | + |
| 20 | +## Installing the Chart |
| 21 | + |
| 22 | +To install the chart with the release name `my-release`: |
| 23 | + |
| 24 | +```console |
| 25 | +helm install my-release hirosystems/bitcoin-core |
| 26 | +``` |
| 27 | + |
| 28 | +The command deploys a bitcoin-core node on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation. |
| 29 | + |
| 30 | +> **Tip**: List all releases using `helm list` |
| 31 | +
|
| 32 | +## Uninstalling the Chart |
| 33 | + |
| 34 | +To uninstall/delete the `my-release` deployment: |
| 35 | + |
| 36 | +```console |
| 37 | +helm delete my-release |
| 38 | +``` |
| 39 | + |
| 40 | +The command removes all the Kubernetes components associated with the chart and deletes the release. |
| 41 | + |
| 42 | +## Parameters |
| 43 | + |
| 44 | +See https://github.com/hirosystems-labs/readme-generator-for-helm to create the table |
| 45 | + |
| 46 | +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, |
| 47 | + |
| 48 | +```console |
| 49 | +helm install my-release \ |
| 50 | + --set image.tag=22.0 \ |
| 51 | + --set image.debug=true \ |
| 52 | + --set replicaCount=2 \ |
| 53 | + hirosystems/bitcoin-core |
| 54 | +``` |
| 55 | + |
| 56 | +The above command sets the bitcoin-core image tag to `22.0`, enables `debug` logging, and deploys two nodes. |
| 57 | + |
| 58 | +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, |
| 59 | + |
| 60 | +```console |
| 61 | +helm install my-release -f values.yaml hirosystems/bitcoin-core |
| 62 | +``` |
| 63 | + |
| 64 | +> **Tip**: You can use the default [values.yaml](values.yaml) |
| 65 | +
|
| 66 | +## Configuration and installation details |
| 67 | + |
| 68 | +### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/) |
| 69 | + |
| 70 | +It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. |
| 71 | + |
| 72 | +Hiro Systems will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist. |
| 73 | + |
| 74 | +### Ingress |
| 75 | + |
| 76 | +This chart provides support for Ingress resources. If you have an ingress controller installed on your cluster, you can utilize the ingress controller to serve your application. |
| 77 | + |
| 78 | +To enable Ingress integration, set `ingress.enabled` to `true`. The `ingress.hostname` property can be used to set the host name. The `ingress.tls` parameter can be used to add the TLS configuration for this host. It is also possible to have more than one host, with a separate TLS configuration for each host. |
| 79 | + |
| 80 | +### TLS secrets |
| 81 | + |
| 82 | +The chart also facilitates the creation of TLS secrets for use with the Ingress controller, with different options for certificate management. |
| 83 | + |
| 84 | +## Persistence |
| 85 | + |
| 86 | +The [bitcoin-core](https://github.com/ruimarinho/docker-bitcoin-core) image stores the Bitcoin Blockchain data and configurations at the `/hirosystems` path of the container. Persistent Volume Claims are used to keep the data across deployments. |
| 87 | + |
| 88 | +### Additional environment variables |
| 89 | + |
| 90 | +In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property. |
| 91 | + |
| 92 | +```yaml |
| 93 | +extraEnvVars: |
| 94 | + - name: FOO |
| 95 | + value: bar |
| 96 | +``` |
| 97 | +
|
| 98 | +Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values. |
| 99 | + |
| 100 | +### Sidecars |
| 101 | + |
| 102 | +If additional containers are needed in the same pod as the bitcoin-core pod (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter. If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter. |
| 103 | + |
| 104 | +### Pod affinity |
| 105 | + |
| 106 | +This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). |
| 107 | + |
| 108 | +As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters. |
| 109 | + |
| 110 | +## License |
| 111 | + |
| 112 | +Copyright © 2022 Hiro Systems |
| 113 | + |
| 114 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 115 | +you may not use this file except in compliance with the License. |
| 116 | +You may obtain a copy of the License at |
| 117 | + |
| 118 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 119 | + |
| 120 | +Unless required by applicable law or agreed to in writing, software |
| 121 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 122 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 123 | +See the License for the specific language governing permissions and |
| 124 | +limitations under the License. |
0 commit comments