Skip to content

Commit

Permalink
renterd 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
artur9010 committed Mar 7, 2024
1 parent ad31af2 commit dd79e4e
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 83 deletions.
36 changes: 30 additions & 6 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,31 @@ entries:
renterd:
- apiVersion: v2
appVersion: 1.0.5
created: "2024-02-15T16:57:57.190118449Z"
created: "2024-03-07T22:31:11.687240034Z"
dependencies:
- condition: mysql.enabled
name: mysql
repository: https://charts.bitnami.com/bitnami
version: 9.22.0
description: Sia renterd helm chart
digest: 90d0f2bf3c9c2569ef3d1016194c4f2b5e0479e0cfa71d46368eeee63bd36b55
icon: https://i.imgur.com/pWg0PRK.png
keywords:
- storage
- distributed
- blockchain
- sia
- renter
- s3
- webui
name: renterd
type: application
urls:
- https://charts.motyka.pro/renterd-1.0.5.tgz
version: 1.0.5
- apiVersion: v2
appVersion: 1.0.5
created: "2024-03-07T22:31:11.683559739Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -27,7 +51,7 @@ entries:
version: 1.0.4
- apiVersion: v2
appVersion: 1.0.0
created: "2024-02-15T16:57:57.186249509Z"
created: "2024-03-07T22:31:11.66968001Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -51,7 +75,7 @@ entries:
version: 1.0.3
- apiVersion: v2
appVersion: 1.0.0
created: "2024-02-15T16:57:57.169480553Z"
created: "2024-03-07T22:31:11.655689622Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -75,7 +99,7 @@ entries:
version: 1.0.2
- apiVersion: v2
appVersion: 1.0.0
created: "2024-02-15T16:57:57.142236768Z"
created: "2024-03-07T22:31:11.644462703Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -99,7 +123,7 @@ entries:
version: 1.0.1
- apiVersion: v2
appVersion: 1.0.0
created: "2024-02-15T16:57:57.128435198Z"
created: "2024-03-07T22:31:11.631519918Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -113,4 +137,4 @@ entries:
urls:
- https://charts.motyka.pro/renterd-1.0.0.tgz
version: 1.0.0
generated: "2024-02-15T16:57:57.111908868Z"
generated: "2024-03-07T22:31:11.605182103Z"
Binary file added renterd-1.0.5.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions renterd/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: mysql
repository: https://charts.bitnami.com/bitnami
version: 9.19.1
digest: sha256:77114d81404187c5a71fb46579aebc23b1b469699ec57f5a4105eb5e512361cf
generated: "2024-02-05T17:11:14.267841086Z"
version: 9.22.0
digest: sha256:341503bd83dc35b422dd638138780ff2b945625eaf0b4d71543508c1f1f605aa
generated: "2024-03-02T04:09:41.447790141Z"
4 changes: 2 additions & 2 deletions renterd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: renterd
description: Sia renterd helm chart
type: application
version: 1.0.4
version: 1.0.5
appVersion: "1.0.5"
icon: https://i.imgur.com/pWg0PRK.png
keywords:
Expand All @@ -15,6 +15,6 @@ keywords:
- webui
dependencies:
- name: mysql
version: 9.19.1
version: 9.22.0
repository: https://charts.bitnami.com/bitnami
condition: mysql.enabled
61 changes: 38 additions & 23 deletions renterd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ Helm chart for [Sia renterd software](https://sia.tech/software/renterd).

```
helm repo add artur9010 https://charts.motyka.pro
helm install renterd artur9010/renterd --version 1.0.4
helm install renterd artur9010/renterd --version 1.0.5
```

## Requirements

- Kubernetes 1.28+ cluster, nodes should have at least 16GB of ram as renterd is memory hungry. It should work with older versions of k8s but I haven't tested it.
- Kubernetes 1.28+ cluster, nodes should have at least 8GB of ram as renterd is memory hungry. It should work with older versions of k8s but I haven't tested it.
- Some kind of persistent storage solution (longhorn, ceph, aws-ebs etc.) and 50GB of available storage (mostly for blockchain copy). It's only required by `renterd-bus` pod which contains consensus (blockchain) copy and partial slabs. There is no support for hostPath, but [rancher local path provisioner](https://github.com/rancher/local-path-provisioner) should work fine
- (Optional) VerticalPodAutoscaler, [there is a nice chart for it](https://artifacthub.io/packages/helm/cowboysysop/vertical-pod-autoscaler)

renterd can run with sqlite or mysql database, due to performance issues on sqlite one I decided to not include an option to use sqlite. This chart includes bitnami mysql chart that you can enable by setting `mysql.enabled` to `true`. If you already have a mysql databse - create two databases (eq. `renterd` and `renterd_metrics`) and grant all privileges on them to renterd user. Provide credentials to external database in section `mysqlExternal` in values

Expand All @@ -37,16 +36,6 @@ And while it's not a requirement, please increase innodb_buffer_pool_size from d
[mysqld]
innodb_buffer_pool_size=4G
```
## Changes
### 1.0.4
- Changed default image to `renterd:1.0.5-zen`
- Removed option to specify wallet seed and passwords in values.
- Added an option to specify name of secret containing
### 1.0.3
- Removed renterd.s3.keys from values as keypairs can now be managed inside webUI.
- mysql: changed default authentication plugin from `mysql_native_password` to `caching_sha2_password` due to massive spam in container logs, see https://github.com/bitnami/charts/issues/18606
## Creating secret
Expand All @@ -65,14 +54,19 @@ Now run `kubectl create secret generic <secret name from values> -n <your namesp
## CPU and memory requirements
Tested on Ryzen zen1 platform (Ryzen 5 2200G, 2400G), while uploading files to s3 api via rclone, max 4 uploads at once. As database gets bigger it will probably require more memory, renterd holds uploaded data in memory.
While uploading files via s3 api using rclone (--transfers 20)
```
NAME CPU(cores) MEMORY(bytes)
mysql-0 52m 875Mi
renterd-autopilot-0 8m 10Mi
renterd-bus-0 538m 112Mi
renterd-worker-0 215m 3314Mi
renterd-worker-1 196m 3415Mi
renterd-worker-2 1447m 1867Mi
➜ ~ kubectl top pod -n renterd-zen
NAME CPU(cores) MEMORY(bytes)
mysql-0 127m 2105Mi
renterd-autopilot-859cb75986-hws2g 13m 12Mi
renterd-bus-0 902m 1118Mi
renterd-worker-0 319m 2755Mi
renterd-worker-1 119m 2254Mi
renterd-worker-2 887m 2125Mi
renterd-worker-3 267m 2655Mi
renterd-worker-4 131m 2388Mi
```
## Looking for perfect server to run renterd? Check netcup
Expand All @@ -83,13 +77,34 @@ ARM servers are available from 7 eur per month. [Check netcup for more info.](ht
Use code `36nc16697741959` to get [5 EUR off](https://www.netcup.eu/bestellen/gutschein_einloesen.php?gutschein=36nc16697741959&ref=200705).
## [Experimental] VerticalPodAutoscaler support
## Changelog
### 1.0.5
- Removed support for `VerticalPodAutoscaler`
- Upgraded `bitnami/mysql` chart to `9.22.0`
- Added option to specify `autopilot`, `worker` and `bus` settings inside values - `Values.renterd.{autopilot,workers,bus}.config`.
- Changed user inside renterd containers from root to unnamed one with id 1000.
- Changed autopilot to Deployment as it is stateless.
### 1.0.4
- Changed default image to `renterd:1.0.5-zen`
- Removed option to specify wallet seed and passwords in values.
- Added an option to specify name of secret containing seed and password
### 1.0.3
- Removed renterd.s3.keys from values as keypairs can now be managed inside webUI.
- mysql: changed default authentication plugin from `mysql_native_password` to `caching_sha2_password` due to massive spam in container logs, see https://github.com/bitnami/charts/issues/18606
## Components
This chart runs all 3 of renterd components as separate pods - bus, autopilot and workers.
There can be only one bus, probably multiple autopilots and multiple workers. Bus also requires some kind of persistent storage for consensus (blockchain) and partial or not uploaded yet slabs.
Workers are stateless, but autopilot dosen't have any kind of service discovery - it need to have workers specified in env - that means we can't easily scale workers without restarting autopilot each time (it also dosen't like to scale down number of workers).
This helm chart supports VerticalPodAutoscaler, it can be enabled by setting `renterd.{bus,autopilot,worker}.vpa.enabled` to `true` in values.
Workers requires bus to start, autopilot requires workers, bus requires database.
## Testnet automatic faucet claimer
This helm chart has built-in automatic faucet claimer for Sia Zen testnet, you can enable it in `autofaucet` section in values. You can claim up to 5000 SC per day.
This helm chart has built-in automatic faucet claimer for Sia Zen testnet, you can enable it in `autofaucet` section in values. You can claim up to 5000 ZenSC per day.
Example:
```yaml
Expand Down
Binary file removed renterd/charts/mysql-9.19.1.tgz
Binary file not shown.
Binary file added renterd/charts/mysql-9.22.0.tgz
Binary file not shown.
19 changes: 18 additions & 1 deletion renterd/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,28 @@ kind: ConfigMap
metadata:
name: renterd
data:
renterd.yml: |
renterd.bus.yml: |
# Managed by Helm - configmap/renterd/renterd.bus.yml
bus:
gatewayAddr: "0.0.0.0:{{ .Values.service.bus.port }}"
{{ with .Values.renterd.bus.config }}
{{ . | toYaml | nindent 6 }}
{{- end }}
s3:
enabled: {{ .Values.renterd.s3.enabled }}
renterd.worker.yml: |
# Managed by Helm - configmap/renterd/renterd.worker.yml
s3:
enabled: {{ .Values.renterd.s3.enabled }}
{{ with .Values.renterd.workers.config }}
worker: {{ . | toYaml | nindent 6 }}
{{- end }}
renterd.autopilot.yml: |
# Managed by Helm - configmap/renterd/renterd.autopilot.yml
{{ with .Values.renterd.autopilot.config }}
autopilot: {{ . | toYaml | nindent 6 }}
{{- end }}
entrypoint.sh: |
#!/bin/sh
# Managed by Helm - configmap/renterd/entrypoint.sh
exec renterd -http=':{{ .Values.service.http.port }}' -s3.address=':{{ .Values.service.s3.port }}' "$@"
15 changes: 12 additions & 3 deletions renterd/templates/statefulset-renterd-autopilot.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: renterd-autopilot
labels:
{{- include "renterd.labels" . | nindent 4 }}
app.kubernetes.io/component: autopilot
spec:
serviceName: "renterd-autopilot"
replicas: 1
selector:
matchLabels:
Expand All @@ -21,6 +20,10 @@ spec:
checksum/configmap-renterd: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
automountServiceAccountToken: {{ .Values.renterd.autopilot.automountServiceAccountToken }}
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
initContainers:
- name: wait-for
image: ghcr.io/patrickdappollonio/wait-for:v1.0.0
Expand Down Expand Up @@ -55,9 +58,11 @@ spec:
periodSeconds: 10
volumeMounts:
# Autopilot does not save anything other than logs on /data
- mountPath: "/data"
name: renterd-data-emptydir
- mountPath: "/data/renterd.yml"
name: renterd-config
subPath: "renterd.yml"
subPath: "renterd.autopilot.yml"
- mountPath: "/entrypoint.sh"
name: renterd-config
subPath: "entrypoint.sh"
Expand Down Expand Up @@ -92,3 +97,7 @@ spec:
configMap:
name: renterd
defaultMode: 0755
- name: renterd-data-emptydir
emptyDir:
medium: "Memory"
sizeLimit: 128Mi
13 changes: 12 additions & 1 deletion renterd/templates/statefulset-renterd-bus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ spec:
checksum/secret-renterd-bus-env: {{ include (print $.Template.BasePath "/secrets/renterd-bus-env.yaml") . | sha256sum }}
spec:
automountServiceAccountToken: {{ .Values.renterd.bus.automountServiceAccountToken }}
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
# initContainers:
# - name: wait-for
# image: ghcr.io/patrickdappollonio/wait-for:v1.0.0
# args:
# - --verbose
# # Wait for db before starting bus
# - --host=""
containers:
- name: renterd
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand All @@ -48,7 +59,7 @@ spec:
name: renterd-bus-data
- mountPath: "/data/renterd.yml"
name: renterd-config
subPath: "renterd.yml"
subPath: "renterd.bus.yml"
- mountPath: "/entrypoint.sh"
name: renterd-config
subPath: "entrypoint.sh"
Expand Down
12 changes: 11 additions & 1 deletion renterd/templates/statefulset-renterd-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ spec:
checksum/configmap-renterd: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
automountServiceAccountToken: {{ .Values.renterd.workers.automountServiceAccountToken }}
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
initContainers:
- name: wait-for
image: ghcr.io/patrickdappollonio/wait-for:v1.0.0
Expand Down Expand Up @@ -51,9 +55,11 @@ spec:
initialDelaySeconds: 15
periodSeconds: 10
volumeMounts:
- mountPath: "/data"
name: renterd-data-emptydir
- mountPath: "/data/renterd.yml"
name: renterd-config
subPath: "renterd.yml"
subPath: "renterd.worker.yml"
- mountPath: "/entrypoint.sh"
name: renterd-config
subPath: "entrypoint.sh"
Expand Down Expand Up @@ -90,3 +96,7 @@ spec:
configMap:
name: renterd
defaultMode: 0755
- name: renterd-data-emptydir
emptyDir:
medium: "Memory"
sizeLimit: 128Mi
35 changes: 0 additions & 35 deletions renterd/templates/vpa.yaml

This file was deleted.

Loading

0 comments on commit dd79e4e

Please sign in to comment.