fahclient

by Helm

Helm chartv2.6.0MIT

A resilient Helm chart for Folding@Home with GPU support

About this chart

fahclient

Helm Chart for Folding@Home Client (FAHClient)

Install Folding@Home on Kubernetes

Motivation

Learned about the Folding@Home initiative during the COVID-19 crisis.

https://foldingathome.org/2020/03/15/coronavirus-what-were-doing-and-how-you-can-help-in-simple-terms/

Companies, enterprises and individuals can donate their compute capacity that is available inside their Kubernetes clusters to foldingathome.org.

Features

  • Make use of StatefulSet with Persistent Volumes so that compute capacity does not get lost when being rescheduled on other nodes. This fits for example the design pattern of using Spot Instances in AWS EKS.
  • Horizontal Pod Autoscaling
  • Vertical Pod Autoscaling

TL;DR

helm repo add pcktdmp https://pcktdmp.github.io/charts
helm install pcktdmp/fahclient --name fahclient

Support

If you need basic support to getting up and running please drop me an e-mail at [email protected].

Chart Values

KeyTypeDefaultDescription
fahClient.extraArgsobject{}Extra arguments for FAHClient, passed like - --somearg=value
fahClient.powerstring"full"Valid values are light, medium, full
fahClient.smpbooltrue
fahClient.teamint0Team identifier
fahClient.userstring"Anonymous"The user you identify yourself with to Folding@Home
fullnameOverridestring""
horizontalPodAutoscaling.enabledboolfalse
horizontalPodAutoscaling.maxReplicasint1
horizontalPodAutoscaling.minReplicasint1
horizontalPodAutoscaling.targetCPUUtilizationPercentageint90
storageClassNamestring""When not specified take the default storage class
image.pullPolicystring"Always"
image.repositorystring"foldingathome/fah-gpu"
image.tagstring"latest"
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.enabledboolfalse
ingress.hosts[0].hoststring"chart-example.local"
ingress.hosts[0].pathslist[]
ingress.tlslist[]
nameOverridestring""
podSecurityContext.fsGroupint9999
priorityClassNamestringnilWhen not specified, take the default priority class
replicaCountint1
resources.limits.cpufloat1
resources.limits.memorystring"256Mi"
resources.requests.cpufloat1
resources.requests.memorystring"128Mi"
securityContext.capabilities.drop[0]string"ALL"
securityContext.readOnlyRootFilesystemboolfalse
podSecurityContext.runAsNonRootbooltrue
podSecurityContext.runAsGroupint9999
podSecurityContext.runAsUserint9999
podSecurityContext.fsGroupint9999
service.portint80
service.typestring"ClusterIP"
serviceAccount.annotationsobject{}
serviceAccount.createboolfalse
serviceAccount.namestringnil
verticalPodAutoscaling.enabledboolfalse
verticalPodAutoscaling.updateModestring"Auto"Valid values are Auto, Recreate, Initial, Off

FAQ

Q: I want to stop folding but don't want work to be lost, what do I need to do?

A: Assuming you have the pods running in a separate namespace where no other pods reside: kubectl get pods -n <yournamespace> | awk '{print $1}' | xargs -I{} kubectl exec {} -- /usr/bin/FAHClient --send-command shutdown.

Q: How do I set up persistent storage for my cluster quickly?

A: Setup an NFS server in your network or leverage an existing one and setup nfs-client-provisioner.

Package release

cd fahclient
helm package fahclient
mv fahclient-x.x.x.tgz docs/
helm repo index --url https://pcktdmp.github.io/charts docs

Helm Hub Compatible Search Terms

Folding@Home folding@home Folding@home folding@Home Folding at Home Folding At Home folding at home Folding at home

Deploy fahclient with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has fahclient 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 chartfahclient is pinned at v2.6.0 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