huginn

by utkuozdemir

Helm chartv2.2.1App 4d17829cf6b15b004ad3f4be196303dca4944810MITVerified publisher

Huginn Helm chart based on its official Docker image

About this chart

huginn

Huginn Huginn is a system for building agents that perform automated tasks for you online.

TL;DR

$ helm repo add utkuozdemir https://utkuozdemir.org/helm-charts
$ helm install my-release utkuozdemir/huginn

Introduction

This chart installs and starts 3 applications:

  • The Huginn main instance that also function as the web interface
  • A Huginn worker instance
  • Optionally, one of Bitnami's MySQL or PostgreSQL charts as a database dependency (default is MySQL)

It is based on the single-process docker image of Huginn.

Prerequisites

  • Kubernetes 1.15+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add utkuozdemir https://utkuozdemir.org/helm-charts
$ helm install my-release utkuozdemir/huginn

These commands deploy Huginn in the default configuration. The Parameters section lists the parameters that can be configured during installation.

!!! Make sure you replace the default passwords with secure ones !!!

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release release:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

KeyDescriptionDefault
image.repositoryImage repository"huginn/huginn-single-process"
image.pullPolicyImage pull policy"IfNotPresent"
image.tagImage tag (if not specified, defaults to the chart's appVersion)""
imagePullSecretsImage pull secrets[]
nameOverrideString to partially override huginn.fullname template with a string (will prepend the release name)""
fullnameOverrideString to fully override huginn.fullname template with a string""
serviceAccount.createCreate a service accounttrue
serviceAccount.annotationsAnnotations for the service account{}
serviceAccount.nameThe name of the service account to create""
service.typeType of the service"ClusterIP"
service.annotationsAnnotations for the service{}
ingress.enabledEnable the use of the ingress controller to access the web UIfalse
ingress.classNameClass name for the Ingress{}
ingress.annotationsAnnotations for the Ingress{}
ingress.hostsHosts configuration of the ingresssee values.yaml
ingress.tlsThe TLS configuration for the ingress[]
otherEnvThe additional env variable key-value pairs to be passed to the all of the web and worker pods{}
otherSecretEnvThe additional sensitive env variable key-value pairs to be passed to the all of the web and worker pods{}
web.init.enabledUse an init container to wait for the db on the web podtrue
web.init.image.repositoryWeb init container image repositorybusybox
web.init.image.pullPolicyWeb init container image pull policyIfNotPresent
web.init.image.tagWeb init container image tagstable
web.init.resourcesWeb init container resource requests and limits{}
web.init.securityContextWeb initContainer security context{}
web.replicaCountWeb pod replica count. Investigate the scaling behavior of Huginn before scaling it up and do it at your own risk1
web.updateStrategyUpdate strategy for the web deploymentRecreate
web.livenessProbeThe liveness probe configuration for web pod{"initialDelaySeconds":60,"httpGet":{"path":"/","port":"http"}}
web.readinessProbeThe readiness probe configuration for web pod{"httpGet":{"path":"/","port":"http"}}
web.portThe web port number for Huginn inside the container3000
web.resourcesThe resource requests and limits of the container{}
web.podAnnotationsAnnotations for the web pod{}
web.podSecurityContextSecurity context for the web pod{}
web.securityContextSecurity context for the web container{}
web.nodeSelectorThe node selector for the web deployment{}
web.tolerationsTolerations for the web pod assignment[]
web.affinityAffinity for the web pod assignment{}
worker.init.enabledUse an init container to wait for the main application on the worker podtrue
worker.init.image.repositoryWorker init container image repositorybusybox
worker.init.image.pullPolicyWorker init container image pull policyIfNotPresent
worker.init.image.tagWorker init container image tagstable
worker.init.resourcesWorker init container resource requests and limits{}
worker.init.securityContextWorker init container security context{}
worker.replicaCountWorker pod replica count. Investigate the scaling behavior of Huginn before scaling it up and do it at your own risk1
worker.updateStrategyUpdate strategy for the web deploymentRecreate
worker.podAnnotationsAnnotations for the worker pod{}
worker.podSecurityContextSecurity context for the worker pod{}
worker.securityContextSecurity context for the worker container{}
worker.resourcesThe resource requests and limits of the worker container{}
worker.nodeSelectorThe node selector for the worker deployment{}
worker.tolerationsTolerations for the worker pod assignment[]
worker.affinityAffinity for the worker pod assignment{}
seed.enabledSeed the database with an initial admin usertrue
seed.usernameIf seed.enabled is true, the username for the initial useradmin
seed.passwordIf seed.enabled is true, the password for the initial user. Make sure you change this to a secure passwordChangeMe!
database.typeThe type of the backing database. Valid values are mysql and postgresql. Ignored if mysql.deployChart or postgresql.deployChart is true.""
database.hostThe host address of the backing database. Ignored if mysql.deployChart or postgresql.deployChart is true.nil
database.nameThe name of the backing database. Ignored if mysql.deployChart or postgresql.deployChart is true.nil
database.usernameThe auth username for the backing database. Ignored if mysql.deployChart or postgresql.deployChart is true.nil
database.passwordThe auth password of the backing database. Ignored if mysql.deployChart or postgresql.deployChart is true.nil
database.portThe port number of the backing database. Ignored if mysql.deployChart or postgresql.deployChart is true.nil
mysql.deployChartInstall a bitnami/mysql instance as a dependency. Mutually exclusive with postgresql.deployCharttrue
mysqlThe configuration for the bitnami/mysql subchart. For additional configuration, see the official chart READMESee below
mysql.auth.databaseIf mysql.deployChart is true, the database with this name will be configured in the db and will be used by the applicationhuginn
mysql.auth.usernameIf mysql.deployChart is true, the user with this name will be configured in the db and will be used by the applicationhuginn
mysql.auth.passwordIf mysql.deployChart is true, the user with this password will be configured in the db and will be used by the application. Make sure you change this to a secure passwordChangeMe!
mysql.auth.rootPasswordThe MySQL root password. Used only when mysql.deployChart is true. Make sure you change this to a secure passwordDefinitelyChangeMe!
postgresql.deployChartInstall a bitnami/postgresql instance as a dependency. Mutually exclusive with mysql.deployChartfalse
postgresqlThe configuration for the bitnami/postgresql subchart. For additional configuration, see the official chart READMESee below
postgresql.postgresqlDatabaseIf postgresql.deployChart is true, the database with this name will be configured in the db and will be used by the applicationhuginn
postgresql.postgresqlUsernameIf postgresql.deployChart is true, the user with this name will be configured in the db and will be used by the applicationhuginn
postgresql.postgresqlPasswordIf postgresql.deployChart is true, the user with this name will be configured in the db and will be used by the application. Make sure you change this to a secure passwordChangeMe!
postgresql.postgresqlPostgresPasswordThe PostgreSQL admin user password. Used only when postgresql.deployChart is true. Make sure you change this to a secure passwordDefinitelyChangeMe!

The above config parameters map to the various configuration env variables of a typical Huginn server.

For more information please refer to the Huginn Installation Guide and to the Docker examples for Huginn.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

helm install my-release \
    --set seed.username=utku \
    --set seed.password=MyReallyStrongPassword111 \
    --set mysql.auth.password=MyStrongDbPassword111 \
    --set mysql.auth.rootPassword=MyEvenStrongerDbRootPassword111 \
    utkuozdemir/huginn

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

helm install my-release -f values.yaml utkuozdemir/huginn

Tip: You can use the default values.yaml (but set strong passwords)

Deploy huginn with OpenTenant

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