Skip to content

Commit

Permalink
renterd 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
artur9010 committed Feb 6, 2024
1 parent d979f5e commit cf684d7
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 46 deletions.
32 changes: 28 additions & 4 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.0
created: "2024-01-19T12:36:10.531255932Z"
created: "2024-02-06T14:29:19.769138379Z"
dependencies:
- condition: mysql.enabled
name: mysql
repository: https://charts.bitnami.com/bitnami
version: 9.19.1
description: Sia renterd helm chart
digest: f6c26b4e78e998898baa93a94736a4b9d12ae6f23be15588676514ffa5c53820
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.3.tgz
version: 1.0.3
- apiVersion: v2
appVersion: 1.0.0
created: "2024-02-06T14:29:19.764492708Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -27,7 +51,7 @@ entries:
version: 1.0.2
- apiVersion: v2
appVersion: 1.0.0
created: "2024-01-19T12:36:10.526421531Z"
created: "2024-02-06T14:29:19.75359192Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -51,7 +75,7 @@ entries:
version: 1.0.1
- apiVersion: v2
appVersion: 1.0.0
created: "2024-01-19T12:36:10.516465275Z"
created: "2024-02-06T14:29:19.710655739Z"
dependencies:
- condition: mysql.enabled
name: mysql
Expand All @@ -65,4 +89,4 @@ entries:
urls:
- https://charts.motyka.pro/renterd-1.0.0.tgz
version: 1.0.0
generated: "2024-01-19T12:36:10.509394918Z"
generated: "2024-02-06T14:29:19.697287946Z"
Binary file added renterd-1.0.3.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.16.0
digest: sha256:24bd9e37f8c20326196847f3c5f20e30804ac688e02c38aae1adb86b343ea7d3
generated: "2023-12-28T17:58:36.221619748Z"
version: 9.19.1
digest: sha256:77114d81404187c5a71fb46579aebc23b1b469699ec57f5a4105eb5e512361cf
generated: "2024-02-05T17:11:14.267841086Z"
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.2
version: 1.0.3
appVersion: "1.0.0"
icon: https://i.imgur.com/pWg0PRK.png
keywords:
Expand All @@ -15,6 +15,6 @@ keywords:
- webui
dependencies:
- name: mysql
version: 9.16.0
version: 9.19.1
repository: https://charts.bitnami.com/bitnami
condition: mysql.enabled
57 changes: 39 additions & 18 deletions renterd/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Basic Sia renterd helm chart
# Unofficial Sia renterd helm chart

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/artur9010)](https://artifacthub.io/packages/search?repo=artur9010)

Simple helm chart containing [Sia renterd software](https://sia.tech/software/renterd).
Helm chart for [Sia renterd software](https://sia.tech/software/renterd).

## Helm repository

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

## Requirements

- Kubernetes 1.28+ cluster, nodes should have at least 8GB of ram.
- Some kind of persistent storage solution (longhorn, ceph, aws-ebs etc.). It's only required by `renterd-bus` pod which contains consensus (blockchain) copy and partial slabs. There is no support for hostPath for now.
- 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.
- 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 @@ -28,13 +28,40 @@ mysqlExternal:
databaseMetrics: "renterd_metrics"
```
Additional requirements for external mysql database:
- `max_connections` a bit higher than default 151, 1024 works fine
- `log_bin_trust_function_creators` set to 1 (as long as your db user dosen't have SUPER privilage, see https://github.com/SiaFoundation/renterd/issues/910)

And while it's not a requirement, please increase innodb_buffer_pool_size from default 128MB, 4G should be ok for 16GB node. I've tested it with those params and it works fine for me, those are also a defaults if you enable built-in mysql chart (Values.mysql.primary.configuration)
```
[mysqld]
innodb_buffer_pool_size=4G
```
## Changes
### 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
## 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.
```
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
```
## Looking for perfect server to run renterd? Check netcup
[![netcup](https://i.imgur.com/2Sjxas5.png)](https://www.netcup.eu/?ref=IHREKUNDENNUMMER)
[![netcup](https://i.imgur.com/2Sjxas5.png)](https://www.netcup.eu/?ref=200705)
ARM servers are available from 7 eur per month. [Check netcup for more info.](https://www.netcup.eu/?ref=IHREKUNDENNUMMER)
ARM servers are available from 7 eur per month. [Check netcup for more info.](https://www.netcup.eu/?ref=200705)
Use code `36nc16697741959` to get [5 EUR off](https://www.netcup.eu/bestellen/gutschein_einloesen.php?gutschein=36nc16697741959&ref=IHREKUNDENNUMMER).
Use code `36nc16697741959` to get [5 EUR off](https://www.netcup.eu/bestellen/gutschein_einloesen.php?gutschein=36nc16697741959&ref=200705).
## [Experimental] VerticalPodAutoscaler support
Expand Down Expand Up @@ -83,34 +110,28 @@ ingress:
- path: /
pathType: ImplementationSpecific
svcName: renterd-bus
svcPort: 9880
svcPort: 9980
- path: /api/worker
pathType: ImplementationSpecific
svcName: renterd-worker
svcPort: 9880
svcPort: 9980
- path: /api/autopilot
pathType: ImplementationSpecific
svcName: renterd-autopilot
svcPort: 9880
svcPort: 9980
- host: s3.example.com
paths:
- path: /
pathType: ImplementationSpecific
svcName: renterd-worker
svcPort: 7070
svcPort: 8080
tls:
- secretName: ingress-tls
hosts:
- renterd.example.com
- s3.example.com
```
## Cloudflared tunnel

It also should work fine with cloudflared tunnel, just make sure to point /api/worker and /api/autopilot to renterd-worker and renterd-autopilot services, all other traffic should go to renterd-bus.

All traffic from s3 domain should go to `renterd-worker:7070`

## Values
See values.yaml file.
Binary file removed renterd/charts/mysql-9.16.0.tgz
Binary file not shown.
Binary file added renterd/charts/mysql-9.19.1.tgz
Binary file not shown.
4 changes: 0 additions & 4 deletions renterd/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ data:
gatewayAddr: "0.0.0.0:{{ .Values.service.bus.port }}"
s3:
enabled: {{ .Values.renterd.s3.enabled }}
keypairsV4:
{{- range $v := .Values.renterd.s3.keys }}
{{ $v.accessKey }}: "{{ $v.secretKey }}"
{{- end }}
entrypoint.sh: |
#!/bin/sh
exec renterd -http=':{{ .Values.service.http.port }}' -s3.address=':{{ .Values.service.s3.port }}' "$@"
6 changes: 3 additions & 3 deletions renterd/templates/statefulset-renterd-autopilot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ spec:
# Wait for bus before starting autopilot
- --host="renterd-bus:{{$.Values.service.http.port}}"
# Make sure all workers are online before starting autopilot
{{range $i, $e := until (int .Values.renterd.workers.replicas) }}
{{ range $i, $e := until (int .Values.renterd.workers.replicas) }}
- --host="renterd-worker-{{$i}}.renterd-worker:{{$.Values.service.http.port}}"
{{end}}
{{ end }}
containers:
- name: renterd
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -92,4 +92,4 @@ spec:
- name: renterd-config
configMap:
name: renterd
defaultMode: 0755
defaultMode: 0755
4 changes: 2 additions & 2 deletions renterd/templates/statefulset-renterd-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
image: ghcr.io/patrickdappollonio/wait-for:v1.0.0
args:
- --verbose
# Wait for bus before starting autopilot
# Wait for bus before starting workers
- --host="renterd-bus:{{$.Values.service.http.port}}"
containers:
- name: renterd
Expand Down Expand Up @@ -90,4 +90,4 @@ spec:
- name: renterd-config
configMap:
name: renterd
defaultMode: 0755
defaultMode: 0755
12 changes: 6 additions & 6 deletions renterd/templates/vpa.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.renterd.bus.vpa.enabled -}}
{{ if .Values.renterd.bus.vpa.enabled -}}
apiVersion: "autoscaling.k8s.io/v1"
kind: VerticalPodAutoscaler
metadata:
Expand All @@ -8,9 +8,9 @@ spec:
apiVersion: "apps/v1"
kind: StatefulSet
name: renterd-bus
{{- end }}
{{ end }}
---
{{- if .Values.renterd.autopilot.vpa.enabled -}}
{{ if .Values.renterd.autopilot.vpa.enabled }}
apiVersion: "autoscaling.k8s.io/v1"
kind: VerticalPodAutoscaler
metadata:
Expand All @@ -20,9 +20,9 @@ spec:
apiVersion: "apps/v1"
kind: StatefulSet
name: renterd-autopilot
{{- end }}
{{ end }}
---
{{- if .Values.renterd.workers.vpa.enabled -}}
{{ if .Values.renterd.workers.vpa.enabled }}
apiVersion: "autoscaling.k8s.io/v1"
kind: VerticalPodAutoscaler
metadata:
Expand All @@ -32,4 +32,4 @@ spec:
apiVersion: "apps/v1"
kind: StatefulSet
name: renterd-worker
{{- end }}
{{ end }}
43 changes: 39 additions & 4 deletions renterd/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:
repository: ghcr.io/siafoundation/renterd
pullPolicy: IfNotPresent
tag: "1.0.2-zen"
tag: "1.0.3-zen"

service:
bus:
Expand All @@ -22,9 +22,6 @@ renterd:
password: "renterdApiPassowrd2"
s3:
enabled: true
keys:
- accessKey: "key_must_be_at_least_40_chars_CHANGE_ME_NOW"
secretKey: "key_must_be_at_least_40_chars_CHANGE_ME_NOW"
bus:
vpa:
enabled: false
Expand Down Expand Up @@ -119,8 +116,46 @@ mysql:
databaseMetrics: "renterd_metrics"
username: "renterd"
password: "renterd"
rootPassword: "renterd"
primary:
resources:
requests:
cpu: 250m
memory: 3072Mi
extraFlags: "--max_connections=1024 --log_bin_trust_function_creators=1"
configuration: |-
[mysqld]
default_authentication_plugin=caching_sha2_password
skip-name-resolve
explicit_defaults_for_timestamp
basedir=/opt/bitnami/mysql
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
datadir=/bitnami/mysql/data
tmpdir=/opt/bitnami/mysql/tmp
max_allowed_packet=16M
bind-address=*
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
log-error=/opt/bitnami/mysql/logs/mysqld.log
character-set-server=UTF8
slow_query_log=0
long_query_time=10.0
# renterd chart
innodb_buffer_pool_size=4G
[client]
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
default-character-set=UTF8
plugin_dir=/opt/bitnami/mysql/lib/plugin
[manager]
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
# Only used if mysql.enabled==false
mysqlExternal:
Expand Down

0 comments on commit cf684d7

Please sign in to comment.