improwised-charts/charts/erpnext
Pratik 459f692e33
Chart testing (#13)
* init

* add release logic

* fix: pr workflow repo

* fix: typo in tasks

* fix: release task

* fix: linting

* add: more log

* fix: stopping at linting

* fix: charts

* check linting

* lint target branch master

* cat git ref

* check branch

* checkout this branch

* linting against master

* test: remove checkout

* test: ct since based linting

* test: add git log and use origin with branch name

* test: git fetch all

* test: shorten log

* test: add origin

* test: remove exit 0

* test: unshallowing

* test: add fetch all

* test: remove clutter

* test: remove more clutter

* test: chart testing

* test: add git config

* fix: charts

* fix: test and release

* fix: add cleanup

* fix: brackets

* fix: remove helm extra args

* exit on testing fail

* fix: handle exit codes and remove errexit

* add: error exit

* add: erroexit in linting

* fix: table format changed by ide vscode plugin

* feat: ct config

* fix: get sc, silent curl, fix kind img condition

* fix: output path in release task

* fix: storage class

* fix: livenesspob initial seconds

* chnages in erpnext

* fix: by pre-commit hook

* fix: chart testing

* feat: mega linter

* fix: n8n charts-yaml

* fix: filename

* fix: erpnext ct test remove affinity

* test

* fix: minio upload source

* error handling

* remove n8n helm chart

* remove images from task

* fix: chart release

* feat: more pre-commit hooks

* feat: env based helm and ct downloading

* feat: conventional commit linting using precommit

* feat(precommit): yaml linting with fixed

* ci: github release for charts

- add github release for individual charts
- add custom tarr bash function

* ci: conventional commit linting insted of angula

* ci: add chart bumping and changelog with gitchglog

* ci: fix github release script

* docs: add init ci step for charts [ci skip]

* ci: bump, package and release seprate tasks

* ci: skip all error based on SKIP_ERR env

* ci: move skip error portion to only chart testing

* ci: fix pipeline

* ci: remove bumping from linting task

* ci: redirect err to /dev/null and fix SKIP_ERR

* fix: ci fix healthchecks test

* fix:  increase initial dealy in probs healthchecks

* bump: erpnext:- 3.1.8 → 3.2.0 [ci skip]

* bump: freeipa:- 0.1.1 → 0.2.0 [ci skip]

* bump: healthchecks:- 1.0.4 → 1.0.5 [ci skip]

* chore(status): modify status pointer [ci skip]

* chore(status): move status pointer [ci skip]

* ci: move .yamllint to .ci

* fix: merge upstream chart with our changes

- Add mariadb as dependent chart which helps in chart testing pipeline
- Separate backup pre upgrade job
- Remove test (it was default test that comes with chart template)
- MUST NOT provide storage class, it will pickup from default sc in k8s
- Add affinity where necessary

* fix: capabilities to all

* ci: better ct lsc condition

* ci: handle ct exit code

* ci: fix ct lsc

* ci: fix entry condition

* chore(status): move status pointer [ci skip]

* ci: fix fetching  when linting to stop exit 128

* ci: remove SKIP_ERR

* ci: diffrent task fro pr workflow

* ci: move back status pointer, ignore freeipa chart

- move back status pointer to check testing

* ci: remove trap

* ci: docker system prine on exit, forking on docker load

* bump: erpnext:- 3.2.4 → 3.2.5 [ci skip]

* chore(status): modify status pointer [ci skip]

* chore(status): move status pointer [ci skip]

Co-authored-by: concourse <concourse@github-noreply.com>
2021-11-10 12:55:23 +05:30
..
ci Chart testing (#13) 2021-11-10 12:55:23 +05:30
templates Chart testing (#13) 2021-11-10 12:55:23 +05:30
.helmignore Chart testing (#13) 2021-11-10 12:55:23 +05:30
Chart.lock Chart testing (#13) 2021-11-10 12:55:23 +05:30
Chart.yaml Chart testing (#13) 2021-11-10 12:55:23 +05:30
README.md Chart testing (#13) 2021-11-10 12:55:23 +05:30
values.yaml Chart testing (#13) 2021-11-10 12:55:23 +05:30

README.md

Frappe / ERPNext

Frappe/ERPNext world's best 100% open source ERP.

ERPNext is a full-featured business management solution that helps SMEs to record all their business transactions in a single system. With ERPNext, SMEs can make informed, fact-based, timely decisions to remain ahead in the competition. It serves as the backbone of a business adding strength, transparency, and control to your growing enterprise.

TL;DR;

$ helm repo add frappe https://helm.erpnext.com

$ helm install frappe-bench-0001 --namespace erpnext frappe/erpnext \
    --set mariadbHost=mariadb.mariadb.svc.cluster.local \
    --set persistence.worker.storageClass=rook-cephfs \
    --set persistence.logs.storageClass=rook-cephfs

Introduction

This chart bootstraps a Frappe/ERPNext deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.15+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure
  • Mariadb host available for access

Installing the Chart

To install the chart with the release name frappe-bench-0001:

$ helm install frappe-bench-0001 --namespace erpnext frappe/erpnext \
    --set mariadbHost=mariadb.mariadb.svc.cluster.local \
    --set persistence.worker.storageClass=rook-cephfs \
    --set persistence.logs.storageClass=rook-cephfs

The command deploys ERPNext on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the frappe-bench-0001 deployment:

$ helm --namespace erpnext delete frappe-bench-0001

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

Parameters

The following table lists the configurable parameters of the ERPNext chart and their default values.

Parameter Description Default
replicaCount Replica Count for App Deployments 1
nginxImage.repository Frappe/ERPNext Nginx Docker image registry frappe/erpnext-nginx
nginxImage.tag Frappe/ERPNext Nginx Docker image tag Latest Stable Release
nginxImage.pullPolicy Frappe/ERPNext Nginx Docker image pullPolicy IfNotPresent
nginxImage.nginxConfig Frappe/ERPNext Nginx Docker image custom default.conf nil
pythonImage.repository Frappe/ERPNext Python Docker image registry frappe/erpnext-worker
pythonImage.tag Frappe/ERPNext Python Docker image tag Latest Stable Release
pythonImage.pullPolicy Frappe/ERPNext Python Docker image pullPolicy IfNotPresent
socketIOImage.repository Frappe/ERPNext SocketIO Docker image registry frappe/frappe-socketio
socketIOImage.tag Frappe/ERPNext SocketIO Docker image tag Latest Stable Release
socketIOImage.pullPolicy Frappe/ERPNext SocketIO Docker image pullPolicy IfNotPresent
redis.image.repository Redis Docker image registry bitnami/redis
redis.image.tag Redis Docker image tag Latest Stable Release
redis.image.pullPolicy Redis Docker image pullPolicy IfNotPresent
redis.extraEnv Redis Extra Environment Variables ALLOW_EMPTY_PASSWORD=true
frappePyPort Frappe/ERPNext Python Gunicorn Worker Port 8000
socketIOPort Frappe/ERPNext SocketIO Port 9000
upstreamRealIPAddress Trusted address (or ip range) of upstream proxy servers 127.0.0.1
upstreamRealIPRecursive Recursive look for upstream proxy server for real IP if on off
upstreamRealIPHeader Header name sent by your upstream proxy server X-Forwarded-For
mariadbHost MariaDB Host to connect (Required) nil
redisQueueHost Queue Redis Host to connect (Optional) nil
redisCacheHost Cache Redis Host to connect (Optional) nil
redisSocketIOHost Socket IO Redis Host to connect (Optional) nil
postgresHost Postgres Host (Optional) nil
postgresPort Postgres Port (Optional) nil
dbRootPassword MariaDB Root Password to create first site (Optional) nil
createSite.enabled Create First site false
createSite.siteName Site name to create the site erp.cluster.local
createSite.dbRootUser DB root user to create first site root
createSite.adminPassword DB root password to create first site admin
createSite.installApps Apps to be installed on site separated by comma (,) erpnext
createSite.dropSiteOnUninstall Drop created site on uninstall of helm release false
ingress.enabled Enable ingress for first site false
ingress.annotations Annotation object to be used with ingress {}
ingress.hosts[0].host Hostname for the site erp.cluster.local
ingress.hosts[0].paths[0].path Ingress Path /
ingress.hosts[0].paths[0].pathType Ingress Path Type ImplementationSpecific
ingress.tls Ingress TLS array []
migrateJob.enable Run migrate sites Job after helm install / upgrade false
migrateJob.backup Backup before migrate sites Job true
persistence.worker.enable Creates PVC with helm release name true
persistence.worker.size Creates PVC with size 8Gi
persistence.worker.storageClass StorageClass with RWX, Required if PVC is created nil
persistence.logs.enable Creates PVC for logs volume with helm release name true
persistence.logs.size Creates PVC for logs volume with size 8Gi
persistence.logs.storageClass StorageClass with RWX, Required if PVC is created nil
volumePermissions.enabled Enable init container that changes volume permissions in the data directory (for cases where the default k8s runAsUser and fsUser values do not work) false

The above parameters map to the env variables defined in frappe_docker. For more information please refer to the frappe_docker images documentation.

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

$ helm install frappe-bench-0001 --namespace erpnext frappe/erpnext \
    --set mariadbHost=mariadb.mariadb.svc.cluster.local \
    --set persistence.worker.storageClass=rook-cephfs \
    --set persistence.logs.storageClass=rook-cephfs
    --set migrateJob.enable=true

The above command sets the MariaDB host to mariadb.mariadb.svc.cluster.local. Additionally it creates a PVC named with mentioned storageClass rook-cephfs and creates a migration job.

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

$ helm install frappe-bench-0001 -f values.yaml erpnext