Giter Site home page Giter Site logo

helm's Introduction

Contents

Frappe/ERPNext Helm Chart

Helm Chart to deploy a frappe-bench-like environment on Kubernetes. It adds following resources:

ConfigMaps:

  • nginx-config is used to override default.conf for nginx reverse proxy and static assets container.

Deployments:

  • gunicorn deployment contains frappe/erpnext gunicorn.
  • nginx deployment contains frappe/erpnext static assets and nginx reverse proxy.
  • scheduler deployment contains frappe/erpnext scheduler.
  • socketio deployment contains frappe/erpnext socketio.
  • worker-d deployment contains frappe/erpnext default worker.
  • worker-l deployment contains frappe/erpnext long worker.
  • worker-s deployment contains frappe/erpnext short worker.

HorizontalPodAutoscalers:

  • gunicorn hpa scales frappe/erpnext gunicorn deployment.
  • nginx hpa scales frappe/erpnext nginx deployment.
  • socketio hpa scales frappe/erpnext socketio deployment.
  • worker-d hpa scales frappe/erpnext default worker deployment.
  • worker-l hpa scales frappe/erpnext long worker deployment.
  • worker-s hpa scales frappe/erpnext short worker deployment.

Ingresses:

  • ingress with custom name can be dynamically generated using helm template and configured values.

Jobs:

  • vol-fix job to fix volume permissions, changes the uid and gid to 1000:1000.
  • bench-conf job to configure db host, redis hosts and socketio port.
  • create-site job to create new site.
  • drop-site job to drop existing site.
  • backup-push job to backup and optionally push backup to S3 for existing site.
  • migrate job to migrate existing site.
  • custom job to run custom additional commands and configuration.

PVC:

  • erpnext persistent volume claim is used to allocate volume for sites and config deployed with this release
  • erpnext-logs persistent volume claim is used to allocate volume for logs

Secrets:

  • secret is used to store db-root-password for external db host

Services:

  • gunicorn service exposes pods from gunicorn deployment.
  • nginx service exposes pods from nginx deployment.
  • socketio service exposes pods from socketio deployment.

ServiceAccounts:

  • erpnext service account is used by all deployments.

Release Wizard

This is a release script for maintainers. It does the following:

  • Checks latest tag for given major release for frappe and erpnext using git.
  • Validates that release always bumps up.
  • Bumps values.yaml and Chart.yaml for release changes
  • Adds git tag for chart version
  • Push to selected remote

This will trigger workflow to publish new version of helm chart.

helm's People

Contributors

ceefour avatar cortopy avatar dependabot[bot] avatar drzoidberg09 avatar georgevenco avatar github-actions[bot] avatar jefferypalmer avatar jimmy-newtron avatar joker00777 avatar joshuarestivo avatar jrestivo avatar l0nax avatar revant avatar riscie avatar sgtpepper9907 avatar tbe avatar thunderbottom avatar v0112358 avatar vf88 avatar vinzenzs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helm's Issues

Asset files not loading in kubernetes using a nginx ingress + ssl cert

Description of the issue

  • Assets are not loaded in kubernetes (Google cloud cluster)
  • Used the template for site ingress

Steps to reproduce the issue

  1. Access to https://cloud001.aguacate.codes/
  2. See the consle logs
  3. Access to any asset https://cloud001.aguacate.codes/assets/js/bootstrap-4-web.min.js

Observed result

Expected result

  • All assets loading

Stacktrace / full error message if available

All assets get the following message in browser console 

- GET https://cloud001.aguacate.codes/assets/js/bootstrap-4-web.min.js 404

Context information (for bug reports)

  • The certificate is created without issue

My site ingress .yaml file (belox):

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-cloud001.aguacate.codes
  # Optional Labels
  labels:
    app.kubernetes.io/instance: frappe-bench-0001-erpnext
  annotations:
    # required for cert-manager letsencrypt
    cert-manager.io/cluster-issuer: letsencrypt-prod
    # other annotations as needed, e.g timestamp
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
spec:
  rules:
  - host: cloud001.aguacate.codes
    http:
      paths:
      - backend:
          serviceName: frappe-bench-0001-erpnext
          servicePort: 8000
        path: /
  tls:
  - hosts:
    - cloud001.aguacate.codes
    secretName: frappe-bench-0001-erpnext-tls

White I am trying to set the TLS , it is giving below error

Error: UPGRADE FAILED: template: erpnext/templates/ingress.yaml:19:16: executing "erpnext/templates/ingress.yaml" at <.hosts>: can't evaluate field hosts in type interface {}

 helm upgrade frappe-bench-0001 --namespace erpnext frappe/erpnext  --set mariadbHost=<REDACTED> --set persistence.worker.storageClass=efs-sc  --set persistence.logs.storageClass=efs-sc-log  --set dbRootPassword=<REDACTED>   --set ingress.enabled=true --set ingress.hosts[0].host=<REDACTED>  --set createSite.enabled=true --set createSite.siteName=<REDACTED>  --set ingress.hosts[0].paths[0].path=/  --set ingress.hosts[0].paths[0].pathType=ImplementationSpecific --set createSite.dbRootUser=<REDACTED> --set createSite.adminPassword=<REDACTED> --set upstreamRealIPAddress=10.0.0.0/8 --set ingress.tls[0]=<REDACTED> 

problem with restore-backups

Hello,

  1. I Create Push Backup S3 Secret .
  2. After Create Backup Sites Job
  3. Then Backups to Cloud
    and then i try Restore Backups from Cloud I have next error -
    Traceback (most recent call last): File "/home/frappe/frappe-bench/commands/restore_backup.py", line 187, in <module> main() File "/home/frappe/frappe-bench/commands/restore_backup.py", line 148, in main pull_backup_from_s3() File "/home/frappe/frappe-bench/commands/restore_backup.py", line 134, in pull_backup_from_s3 for obj in bucket.objects.filter(Prefix=bucket_dir): File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/boto3/resources/collection.py", line 83, in __iter__ for page in self.pages(): File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/boto3/resources/collection.py", line 166, in pages for page in pages: File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/botocore/paginate.py", line 255, in __iter__ response = self._make_request(current_kwargs) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/botocore/paginate.py", line 332, in _make_request return self._method(**current_kwargs) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/botocore/client.py", line 316, in _api_call return self._make_api_call(operation_name, kwargs) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/botocore/client.py", line 626, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.NoSuchKey: An error occurred (NoSuchKey) when calling the ListObjects operation: The specified key does not exist.

Can you help me what I do wrong?
Thanks!

I see my backup on S3 like
Amazon S3/frappe/frappe/backups/test.example.ru/20200520_005432

Mariadb rejects connection

Hi,
I've installed erpnext with helm in k8 & have a woking mariadb-galera. Tried with several mariadb deployment also. All times recieve a msq like this:

2021-09-25 23:00:33 154 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 155 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 156 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 157 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 158 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 159 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 160 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:33 | 2021-09-25 23:00:33 161 [Warning] Access denied for user 'frappe'@'10.42.11.41' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 7 [ERROR] Slave SQL: Error 'Operation DROP USER failed for '_dea7e04cce7812bc'@'10.42.11.41'' on query. Default database: ''. Query: 'DROP USER '_dea7e04cce7812bc'@'10.42.11.41'', Internal MariaDB error code: 1396
25/9/2021 20:00:34 | 2021-09-25 23:00:34 7 [Warning] WSREP: Ignoring error 'Operation DROP USER failed for '_dea7e04cce7812bc'@'10.42.11.41'' on query. Default database: ''. Query: 'DROP USER '_dea7e04cce7812bc'@'10.42.11.41'', Error_code: 1396
25/9/2021 20:00:34 | 2021-09-25 23:00:34 6 [Warning] 'proxies_priv' entry '@% root@mariadb-ga-0' ignored in --skip-name-resolve mode.
25/9/2021 20:00:34 | 2021-09-25 23:00:34 163 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 165 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 166 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 167 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 168 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 169 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 170 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 171 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 172 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 173 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 174 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 175 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 176 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 177 [Warning] Access denied for user 'frappe'@'10.42.11.40' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 162 [Warning] Aborted connection 162 to db: '_dea7e04cce7812bc' user: '_dea7e04cce7812bc' host: '10.42.11.41' (Got an error reading communication packets)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 178 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 179 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 180 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 181 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 182 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 183 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 184 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 185 [Warning] Access denied for user 'frappe'@'10.42.11.34' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 186 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 187 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 188 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 189 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 190 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 191 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 192 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:34 | 2021-09-25 23:00:34 193 [Warning] Access denied for user 'frappe'@'10.42.11.35' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 194 [Warning] Aborted connection 194 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.34' (This connection closed normally without authentication)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 195 [Warning] Aborted connection 195 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.39' (This connection closed normally without authentication)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 196 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 197 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 198 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 199 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 200 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 201 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 202 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 203 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 204 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 205 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 206 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 207 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 208 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 209 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 210 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:35 | 2021-09-25 23:00:35 211 [Warning] Access denied for user 'frappe'@'10.42.11.39' (using password: NO)
25/9/2021 20:00:40 | 2021-09-25 23:00:40 212 [Warning] Aborted connection 212 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.35' (This connection closed normally without authentication)
25/9/2021 20:00:40 | 2021-09-25 23:00:40 213 [Warning] Aborted connection 213 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.34' (This connection closed normally without authentication)
25/9/2021 20:00:41 | 2021-09-25 23:00:41 214 [Warning] Aborted connection 214 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.40' (This connection closed normally without authentication)
25/9/2021 20:00:41 | # Time: 210925 23:00:41
25/9/2021 20:00:41 | # User@Host: root[root] @ localhost []
25/9/2021 20:00:41 | # Thread_id: 215 Schema: QC_hit: No
25/9/2021 20:00:41 | # Query_time: 0.000216 Lock_time: 0.000079 Rows_sent: 3 Rows_examined: 3
25/9/2021 20:00:41 | # Rows_affected: 0 Bytes_sent: 709
25/9/2021 20:00:41 | SET timestamp=1632610841;
25/9/2021 20:00:41 | select * from mysql.wsrep_cluster_members;
25/9/2021 20:00:45 | 2021-09-25 23:00:45 217 [Warning] Aborted connection 217 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.34' (This connection closed normally without authentication)
25/9/2021 20:00:46 | 2021-09-25 23:00:46 218 [Warning] Aborted connection 218 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.40' (This connection closed normally without authentication)
25/9/2021 20:00:50 | 2021-09-25 23:00:50 219 [Warning] Aborted connection 219 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.35' (This connection closed normally without authentication)
25/9/2021 20:00:50 | 2021-09-25 23:00:50 220 [Warning] Aborted connection 220 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.34' (This connection closed normally without authentication)
25/9/2021 20:00:50 | 2021-09-25 23:00:50 221 [Warning] Aborted connection 221 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.34' (This connection closed normally without authentication)
25/9/2021 20:00:51 | 2021-09-25 23:00:51 222 [Warning] Aborted connection 222 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.40' (This connection closed normally without authentication)
25/9/2021 20:00:51

....



2021-09-25 23:21:55 1168 [Warning] Aborted connection 1168 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.35' (This connection closed normally without authentication)
--
25/9/2021 20:21:56 | 2021-09-25 23:21:56 1169 [Warning] Aborted connection 1169 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.40' (This connection closed normally without authentication)
25/9/2021 20:22:00 | 2021-09-25 23:22:00 1170 [Warning] Aborted connection 1170 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.35' (This connection closed normally without authentication)
25/9/2021 20:22:00 | 2021-09-25 23:22:00 1171 [Warning] Aborted connection 1171 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.35' (This connection closed normally without authentication)
25/9/2021 20:22:00 | 2021-09-25 23:22:00 1172 [Warning] Aborted connection 1172 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.39' (This connection closed normally without authentication)
25/9/2021 20:22:00 | 2021-09-25 23:22:00 1173 [Warning] Aborted connection 1173 to db: 'unconnected' user: 'unauthenticated' host: '10.42.11.39' (This connection closed normally without authentication)

.....

any suggestion "where to look' for the problem ...

Many Thanks in advance!


CAP_CHOWN vs CHOWN

What's the difference between CAP_CHOWN and CHOWN in here?

CAP_CHOWN gave me issues on gcloud. I changed to CHOWN and it worked just fine. I could send a PR to change this but I'm not sure about the effects on other platforms. should it be a configurable Value?

Internal Server Error After Site Creation

I am using kubernetes cluster with docker.

I Successfully created site here is the logs.

Attempt 1 to connect to mariadb.default.svc.cluster.local:3306
Attempt 1 to connect to frappe-bench-erpnext-redis-queue:12000
Attempt 1 to connect to 10.103.190.138:6379
Attempt 1 to connect to frappe-bench-erpnext-redis-socketio:11000
Connections OK
Created user _3c3d3934fa5e49ca
Created database _3c3d3934fa5e49ca
Granted privileges to user _3c3d3934fa5e49ca and database _3c3d3934fa5e49ca
Starting database import...
Imported from database /home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/framework_mariadb.sql

Installing frappe...
Updating DocTypes for frappe : [========================================] 100%
Updating country info : [========================================] 100%

Installing erpnext...
Updating DocTypes for erpnext : [========================================] 100%
Updating customizations for Address
Updating customizations for Contact
*** Scheduler is disabled ***

I access website outside. here is the error.

Internal Server Error

Why it show ??

I reinstall site manually its work fine. here is the command.

bench --site test1.example.ae reinstall

This will wipe your database. Are you sure you want to reinstall? [y/N]: y
MySQL root password:

Installing frappe...
Updating DocTypes for frappe : [========================================] 100%
Updating country info : [========================================] 100%
Set Administrator password:
Re-enter Administrator password:

Installing erpnext...
Updating DocTypes for erpnext : [========================================] 100%
Updating customizations for Address
Updating customizations for Contact
*** Scheduler is disabled ***

SocketIO deployment enters crashloopbackoff when using external redis deployment

Description of the issue

Helm chart socketio deployment crashes when trying to use an existing redis deployment

Context information (for bug reports)

Steps to reproduce the issue

  1. Install MariaDB and Redis externally from erpnext
  2. Install ERPnext using the helm chart and the following values for Redis:
redisQueueHost: "redis-master.default.svc.cluster.local"
redisCacheHost: "redis-master.default.svc.cluster.local"
redisSocketIOHost: "redis-master.default.svc.cluster.local"

Observed result

SocketIO deployment enters crash loop backoff because it still expects the following host: erpnext-redis-socketio not the one specified in the helm chart. This is also the case if the chart is named anything other than "erpnext".

Expected result

Chart deploys successfully

Stacktrace / full error message if available

listening on *: 9000
node:events:356
      throw er; // Unhandled 'error' event
      ^

Error: getaddrinfo ENOTFOUND erpnext-redis-socketio
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:69:26)
Emitted 'error' event on RedisClient instance at:
    at RedisClient.on_error (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:406:14)
    at Socket.<anonymous> (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:279:14)
    at Socket.emit (node:events:379:20)
    at emitErrorNT (node:internal/streams/destroy:188:8)
    at emitErrorCloseNT (node:internal/streams/destroy:153:3)
    at processTicksAndRejections (node:internal/process/task_queues:81:21) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'erpnext-redis-socketio'
}

ingress is not working in custom-values.yaml

Hello,

I set value enabled for ingress is True in file - https://github.com/frappe/helm/blob/master/erpnext/values.yaml like this

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:

  • host: example.com
    paths:
    • backend:
      serviceName: example.com
      servicePort: 80
      path: /

tls:
- hosts:
- example.com
secretName: example.com-secret

and after deploy i don't have new Ingresses

Can you tell me what i do wrong?

manifest bellow do it pretty

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: example.com
  labels:
    app.kubernetes.io/instance: "FRAPPE_SERVICE"
  annotations:
    # required for cert-manager letsencrypt
    cert-manager.io/cluster-issuer: letsencrypt-prod
    # other annotations as needed, e.g timestamp
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
spec:
  rules:
  - host: example.com
    http:
      paths:
      - backend:
          serviceName: "{{ name }}-erpnext"
          servicePort: 80
        path: /
  tls:
  - hosts:
    - example.com
    secretName: example.com-secret

Points to document

  • other resources

    • New Site Job
    • Migrate Job
    • Backup Job
    • Push to cloud Job
    • Restore from cloud Job
    • Backup and push to cloud CronJob
  • What can be scaled and what cannot?
    - Scale: gunicorn worker, background workers, frappe socketio (socketio is created as service)
    - Scaling may break: 3 redis servers and scheduler. supervisor.conf in native bench doesn't scale these services. Redis scaling will create multiple databases.

Unable to install erpnext using helm chart and azure mariadb database

Hi

I am trying to setup erpnext using below steps referred from: https://helm.erpnext.com.
My k8s cluster is azure AKS.
I have created a storage class named: rook-cephfs which is used in the helm deployment.
nginx ingress controller is also installed.

kubectl create namespace erpnextv904
kubectl apply -f mariadb-password.yaml -n erpnextv904

helm  upgrade --install frappe-bench-0001 --namespace erpnextv904 frappe/erpnext --version 3.2.31 \
 --set mariadbHost=mytestmariadbserver.mariadb.database.azure.com     \
 --set persistence.worker.storageClass=rook-cephfs    \
 --set persistence.logs.storageClass=rook-cephfs 

After this I have verified that in the azure storage account 2 file shares are created for pvc's frappe-bench-0001-erpnext and frappe-bench-0001-erpnext-logs.
These are file share contents of frappe-bench-0001-erpnext:
image

At this point the scheduler and worker containers are in State CrashLoopBackOff (due to healthcheck failure?). The logs dont show any errors.

Here are the default worker pod logs

Attempt 1 to connect to mytestmariadbserver.mariadb.database.azure.com:3306
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-queue:12000
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-cache:13000
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-socketio:11000
Connections OK
11:12:32 Worker rq:worker:9bc88174c71b4f1a9c21cd4f22f2e165.frappe-bench-0001-erpnext-worker-d-758ccb9f8-k77gc.10.default: started, version 1.8.1
11:12:32 Subscribing to channel rq:pubsub:9bc88174c71b4f1a9c21cd4f22f2e165.frappe-bench-0001-erpnext-worker-d-758ccb9f8-k77gc.10.default
11:12:32 *** Listening on default...

I would guess before installing the site the pods should be in stable/Running state. But I still tried to create site using steps here: https://helm.erpnext.com/kubernetes-resources/create-new-site-job

Here are the create site job logs:

kubectl logs create-new-site-erpnextv904--1-494j7  -n erpnextv904
Attempt 1 to connect to mytestmariadbserver.mariadb.database.azure.com:3306
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-queue:12000
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-cache:13000
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-socketio:11000
Connections OK
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/commands/new.py", line 118, in <module>
    main()
  File "/home/frappe/frappe-bench/commands/new.py", line 70, in main
    db_port=db_port,
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 74, in _new_site
    no_mariadb_socket=no_mariadb_socket,
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 108, in install_db
    setup_database(force, source_sql, verbose, no_mariadb_socket)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/__init__.py", line 16, in setup_database
    return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose, no_mariadb_socket=no_mariadb_socket)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py", line 39, in setup_database
    if force or (db_name not in dbman.get_database_list()):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/db_manager.py", line 60, in get_database_list
    return [d[0] for d in self.db.sql("SHOW DATABASES")]
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql
    self.connect()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 74, in connect
    self._conn = self.get_connection()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 82, in get_connection
    local_infile=frappe.conf.local_infile
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 353, in __init__
    self.connect()
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 633, in connect
    self._request_authentication()
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 921, in _request_authentication
    auth_packet = self._process_auth(plugin_name, auth_packet)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 1018, in _process_auth
    pkt = self._read_packet()
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1045, "Access denied for user 'mariadbadminuser'@'10.244.4.19' (using password: YES)")

From the default worker pod I verified that connection to the mysql database is successful.
The root user seems to have access from all IPs:

SELECT user,authentication_string,plugin,host,Grant_priv FROM mysql.user;
+-----------------+-----------------------+-----------------------+---------------------------------------------+------------+
| user | authentication_string | plugin | host | Grant_priv |
+-----------------+-----------------------+-----------------------+---------------------------------------------+------------+
| mariadbadminuser | | | % | Y |

I can see the site folder created in the file share. Here are its contents:
image

What am I missing? Any help greatly appreciated.

Thanks.
Sachin

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)\n",

Description of the issue

I am installing ERPNext on GKE using the Helm Chart. I followed the steps here - https://helm.erpnext.com/faq.html - and when I get to the step - Create New Site Job. I get the error - UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)\n",

Context information (for bug reports)

I follow the steps outlined successfully until I have to create a new site using the config below;

kubectl apply -n erpnext -f - <<EOF
apiVersion: batch/v1
kind: Job
metadata:
name: create-new-site
spec:
backoffLimit: 1
template:
spec:
securityContext:
supplementalGroups: [1000]
containers:
- name: create-site
image: frappe/erpnext-worker:v12.10.1
args: ["new"]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: sites-dir
mountPath: /home/frappe/frappe-bench/sites
env:
- name: "SITE_NAME"
value: staging.example.com
- name: "DB_ROOT_USER"
value: root
- name: "MYSQL_ROOT_PASSWORD"
valueFrom:
secretKeyRef:
key: password
name: mariadb-root-password
- name: "ADMIN_PASSWORD"
value: mypassword
- name: "INSTALL_APPS"
value: "erpnext"
restartPolicy: Never
volumes:
- name: sites-dir
persistentVolumeClaim:
claimName: frappe-bench-0001-erpnext
readOnly: false
EOF

Steps to reproduce the issue

1.I run the command above to create a new site and then I navigate to my google cloud console to check
2.Under Kubernetes Engine > Workload I notice the Status for the Create New Site Job says BackoffLimit Exceeded
3.I then click on that particular Job > Job Details > Cloud logs and I see the Observed result below

Observed result

Traceback (most recent call last): File "/home/frappe/frappe-bench/commands/new.py", line 106, in main() File "/home/frappe/frappe-bench/commands/new.py", line 59, in main db_port=db_port, File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 89, in _new_site db_password=db_password, db_type=db_type, db_host=db_host, db_port=db_port, no_mariadb_socket=no_mariadb_socket) File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 35, in install_db setup_database(force, source_sql, verbose, no_mariadb_socket) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/init.py", line 16, in setup_database return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose, no_mariadb_socket=no_mariadb_socket) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py", line 39, in setup_database if force or (db_name not in dbman.get_database_list()): File "/home/frappe/frappe-bench/apps/frappe/frappe/database/db_manager.py", line 61, in get_database_list return [d[0] for d in self.db.sql("SHOW DATABASES")] File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql self.connect() File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect self._conn = self.get_connection() File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 90, in get_connection local_infile = frappe.conf.local_infile) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/init.py", line 94, in Connect return Connection(*args, **kwargs) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 260, in init self.password = self.password.encode('latin1') UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)
"
timestamp: "2020-07-22T18:38:34.283260158Z"
}
2020-07-22 20:38:57.482 SAST
Attempt 1 to connect to mariadb.mariadb.svc.cluster.local:3306
2020-07-22 20:38:57.515 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-queue:12000
2020-07-22 20:38:57.522 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-cache:13000
2020-07-22 20:38:57.530 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-socketio:11000
2020-07-22 20:38:57.697 SAST
Connections OK
2020-07-22 20:39:17.495 SAST
Site staging.example.com already exists

Expected result

I expected a green OK Status

Stacktrace / full error message if available

  
2020-07-22 20:38:12.778 SAST
Attempt 1 to connect to mariadb.mariadb.svc.cluster.local:3306
2020-07-22 20:38:12.803 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-queue:12000
2020-07-22 20:38:12.811 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-cache:13000
2020-07-22 20:38:12.948 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-socketio:11000
2020-07-22 20:38:12.956 SAST
Connections OK
2020-07-22 20:38:34.283 SAST
Traceback (most recent call last): File "/home/frappe/frappe-bench/commands/new.py", line 106, in <module> main() File "/home/frappe/frappe-bench/commands/new.py", line 59, in main db_port=db_port, File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 89, in _new_site db_password=db_password, db_type=db_type, db_host=db_host, db_port=db_port, no_mariadb_socket=no_mariadb_socket) File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 35, in install_db setup_database(force, source_sql, verbose, no_mariadb_socket) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/__init__.py", line 16, in setup_database return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose, no_mariadb_socket=no_mariadb_socket) File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py", line 39, in setup_database if force or (db_name not in dbman.get_database_list()): File "/home/frappe/frappe-bench/apps/frappe/frappe/database/db_manager.py", line 61, in get_database_list return [d[0] for d in self.db.sql("SHOW DATABASES")] File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql self.connect() File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect self._conn = self.get_connection() File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 90, in get_connection local_infile = frappe.conf.local_infile) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/__init__.py", line 94, in Connect return Connection(*args, **kwargs) File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 260, in __init__ self.password = self.password.encode('latin1') UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)
Expand all | Collapse all{
 insertId: "yje4y7zus9bfilwna"  
 labels: {…}  
 logName: "projects/erpnext-284021/logs/stderr"  
 receiveTimestamp: "2020-07-22T18:38:47.347061313Z"  
 resource: {…}  
 severity: "ERROR"  
 textPayload: "Traceback (most recent call last):
  File "/home/frappe/frappe-bench/commands/new.py", line 106, in <module>
    main()
  File "/home/frappe/frappe-bench/commands/new.py", line 59, in main
    db_port=db_port,
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 89, in _new_site
    db_password=db_password, db_type=db_type, db_host=db_host, db_port=db_port, no_mariadb_socket=no_mariadb_socket)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 35, in install_db
    setup_database(force, source_sql, verbose, no_mariadb_socket)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/__init__.py", line 16, in setup_database
    return frappe.database.mariadb.setup_db.setup_database(force, source_sql, verbose, no_mariadb_socket=no_mariadb_socket)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/setup_db.py", line 39, in setup_database
    if force or (db_name not in dbman.get_database_list()):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/db_manager.py", line 61, in get_database_list
    return [d[0] for d in self.db.sql("SHOW DATABASES")]
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 122, in sql
    self.connect()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py", line 75, in connect
    self._conn = self.get_connection()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/database.py", line 90, in get_connection
    local_infile = frappe.conf.local_infile)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/__init__.py", line 94, in Connect
    return Connection(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.7/site-packages/pymysql/connections.py", line 260, in __init__
    self.password = self.password.encode('latin1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)
"  
 timestamp: "2020-07-22T18:38:34.283260158Z"  
}
2020-07-22 20:38:57.482 SAST
Attempt 1 to connect to mariadb.mariadb.svc.cluster.local:3306
2020-07-22 20:38:57.515 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-queue:12000
2020-07-22 20:38:57.522 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-cache:13000
2020-07-22 20:38:57.530 SAST
Attempt 1 to connect to frappe-bench-0001-erpnext-redis-socketio:11000
2020-07-22 20:38:57.697 SAST
Connections OK
2020-07-22 20:39:17.495 SAST
Site staging.example.com already exists```

mariadb config

Hello,
I install mariadb by https://helm.erpnext.com/prepare-kubernetes/mariadb.html
Use master.config and slave.config like in url above and after install bitnami/mariadb with helm i see the next -
no folder
Screenshot_20210620_222726

and i found my.cnf in path /opt/bitnami/mariadb/conf
Screenshot_20210620_222844

but i's not contain right cnf which i write in values-production.yaml file when install mariadb.

I try reinstall mariadb and now have this problem.

MariaDB is not properly

Hello!
I Install MariaDB Helm Chart by Instruction

After I try run Job by Create New Site Job (container - image: frappe/erpnext-worker:v12.8.0)

and my logs is -


Created user _3b119d647a0c4667
Created database _3b119d647a0c4667
Granted privileges to user _3b119d647a0c4667 and database _3b119d647a0c4667
For key character_set_server. Expected value utf8mb4, found value utf8
For key collation_server. Expected value utf8mb4_unicode_ci, found value utf8_general_ci
================================================================================
Creation of your site - stteam.ru failed because MariaDB is not properly 
configured.  If using version 10.2.x or earlier, make sure you use the 
the Barracuda storage engine. 
Please verify the settings above in MariaDB's my.cnf.  Restart MariaDB.  And 
then run `bench new-site stteam.ru` again.
================================================================================
Database settings do not match expected values; stopping database setup.

Can you help me?

and

Create the resource:

$ kubectl -n <namespace> -f add-example-site-job.yaml

Is missing apply??

Template for custom app nginx/worker images

Following the docs in https://github.com/frappe/frappe_docker, I've created worker and nginx images for a custom app. Now, the helm chart needs to be made aware of these additional images. It looks like a deployment template needs to be created and the job* templates modified accordingly.

Are there docs or examples available for inserting custom images like this?

workers environment variable

In the common/worker/docker_entrypoint.sh , there is a line:

if [[ -z "$WORKERS" ]]; then
    export WORKERS=2
 fi

and

if [[ -z "$RUN_AS_ROOT" ]]; then

I am using helm chart and confused what these options are doing and where to set them.

failing test pod

I have tested and it deploy everything smoothly

The only point to remark is the failing test pod

image

I think it is due to some initial startup delay

Originally posted by @Jimmy-Newtron in #91 (comment)

Support ReadWriteOnce

When I deploy it tries to create a PVC using ReadWriteMany, but my cluster only supports ReadWriteOnce. Can someone explain why ReadWriteMany is required, and any ways I can get around it.

Cannot create site due to the mistaken value in the template

Description of the issue

In the templates folder, the createSite feature is not working. The reason:

In the create site Job template, this line:

{{- if and (.Values.createSite.enabled) (.Values.dbRootPassword) }}

should actually be like this:

{{- if and (.Values.createSite.enabled) (.Values.createSite.dbRootPassword) }}

Context information (for bug reports)

Trying to deploy Erpnext and create a site, not working

Steps to reproduce the issue

  1. Deploy with "createSite: enabled" as an input

Observed result

The ingress is created but not the site. This is due to the fact that the create site Job template is not created, since the if at the beginning does not result true.

Expected result

Both site and ingress created.

How to make a new app and install it on existing site

kubectl exec -it -n <namespace> <helm-frappe-bench-release>-erpnext-erpnext-xxxxxxxxx-xxxxx -c erpnext-python -- docker-entrypoint.sh console site.name.com

The above command will list the app on the given site.

Apps in this namespace:
frappe, erpnext

In [1]: frappe.get_installed_apps()
Out[1]: ['frappe', 'erpnext']
In [2]: exit

  1. What command to use In order to create a new custom app.
    In bench we used : bench new-app {app_name}

  2. Let's say I have custom app from GitHub or other sources and converted the app in to chart. how to add this to already running sites. In bench we used:
    bench --site [site_name] install-app [app_name]
    Do I need to run helm upgrade ??

unable to delete helm release

helm delete -n efb efb-gh-imp-2021-00082
Error: warning: Hook pre-delete erpnext/templates/pre-delete-drop-site-job.yaml failed: Job.batch "drop-site-efb-gh-imp-2021-00082-erpnext-GH-IMP-2021-00082.test-erpnext.org" is invalid: [metadata.name: Invalid value: "drop-site-efb-gh-imp-2021-00082-erpnext-GH-IMP-2021-00082.test-erpnext.org": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), spec.template.labels: Invalid value: "drop-site-efb-gh-imp-2021-00082-erpnext-GH-IMP-2021-00082.test-erpnext.org": must be no more than 63 characters]

Migration job fails on develop

changes to docker images now mount node_modules from assets/nginx container

migrate job does not have this mount point.

frappe.patches.v13_0.generate_theme_files_in_public_folder fails

Observation while installation

  • mariadb. create my_database, my_user and password
  • nfs needs helm install nfs-server -n nfs stable/nfs-server-provisioner --set persistence.size=16Gi --set persistence.storageClass=scw-bssd --set persistence.enabled=true --set storageClass.defaultClass=true command

unable to install erpnext helm chart

hey,

I try to install erpnext in my Kubernetes cluster.

I installed the bitnami/mariadb helm chart as described https://helm.erpnext.com/prepare-kubernetes/mariadb

when I know execute
helm install frappe-bench-0001 -f erpnext-values.yaml frappe/erpnext --namespace erpnext --version 3.2.3
the installation seems to work, but after a while (2min) some pods are failing.

the erpnext/erpnext logs

error: a container name must be specified for pod frappe-bench-0001-erpnext-erpnext-75f95767bc-qq5sd, choose one of: [erpnext-assets erpnext-python]

the worker pod logs:

/usr/local/bin/docker-entrypoint.sh: line 68: /home/frappe/frappe-bench/sites/apps.txt: Permission denied
config file not created, retry 1
config file not created, retry 2
config file not created, retry 3
config file not created, retry 4
config file not created, retry 5
config file not created, retry 6
config file not created, retry 7
config file not created, retry 8
config file not created, retry 9
config file not created, retry 10
config file not created, retry 11
config file not created, retry 12
config file not created, retry 13
config file not created, retry 14
config file not created, retry 15
config file not created, retry 16
config file not created, retry 17
config file not created, retry 18
config file not created, retry 19
config file not created, retry 20
config file not created, retry 21
config file not created, retry 22
config file not created, retry 23
config file not created, retry 24
config file not created, retry 25
config file not created, retry 26
config file not created, retry 27
config file not created, retry 28
config file not created, retry 29
config file not created, retry 30
config file not created, retry 31
timeout: config file not created

the scheduler pod

/usr/local/bin/docker-entrypoint.sh: line 68: /home/frappe/frappe-bench/sites/apps.txt: Permission denied
config file not created, retry 1
config file not created, retry 2
config file not created, retry 3
config file not created, retry 4
config file not created, retry 5
config file not created, retry 6
config file not created, retry 7
config file not created, retry 8
config file not created, retry 9
config file not created, retry 10
config file not created, retry 11
config file not created, retry 12
config file not created, retry 13
config file not created, retry 14
config file not created, retry 15
config file not created, retry 16
config file not created, retry 17
config file not created, retry 18
config file not created, retry 19
config file not created, retry 20
config file not created, retry 21
config file not created, retry 22
config file not created, retry 23
config file not created, retry 24
config file not created, retry 25
config file not created, retry 26
config file not created, retry 27
config file not created, retry 28
config file not created, retry 29
config file not created, retry 30
config file not created, retry 31
timeout: config file not created

the socketio pod:

config file not created, retry 1
config file not created, retry 2
config file not created, retry 3
config file not created, retry 4
config file not created, retry 5
config file not created, retry 6
config file not created, retry 7
config file not created, retry 8
config file not created, retry 9
config file not created, retry 10
config file not created, retry 11
config file not created, retry 12
config file not created, retry 13
config file not created, retry 14
config file not created, retry 15
config file not created, retry 16
config file not created, retry 17
config file not created, retry 18
config file not created, retry 19
config file not created, retry 20
config file not created, retry 21
config file not created, retry 22
config file not created, retry 23
config file not created, retry 24
config file not created, retry 25
config file not created, retry 26
config file not created, retry 27
config file not created, retry 28
config file not created, retry 29
config file not created, retry 30
config file not created, retry 31
timeout: config file not created

My values.yaml file:

mariadbHost: mariadb
dbRootPassword: super_secret_password
persistence:
  worker:
    enabled: true
    storageClass: longhorn
  logs:
    storageClass: longhorn
    enabled: true
pythonImage:
  tag: version-13
socketIOImage:
  tag: version-13

I also tried to install erpnext with only mariadbhost and persistence.storageclass values.

I guess I simply forgot a simple step, but I am trying to get this working for a couple of days now.
I tried installing different versions of erpnext with the same result, too.

How to run aribtary bench commands?

How do I run arbitary bench commands using the kubernetes method:

ie.

bench get-app --branch master tailpos-sync https://github.com/bailabs/tailpos-sync.git
bench --site jeeves install-app tailpos_sync

Chart Version independent of ERPNext Version

Keep chart version independent of erpnext version

Chart 0.1.0 can be change in image, erpnext 12.5.0
Chart 0.1.1 can be change in image, erpnext 12.7.1
...
Chart 1.0.0 can be change in kubernetes resource without any change in images.

volumePermissions flag is broken

Description of the issue

Using the volumePermissions.enabled=true breaks erpnext/templates/deployment-erpnext.yaml line 34

> helm template erpnext-pipe --namespace default frappe/erpnext --set mariadbHost=mari-mariadb.default.svc.cluster.local --set persistence.worker.storageClass=standard-
rwx --set persistence.logs.storageClass=standard-rwx --set volumePermissions.enabled=true

Error: YAML parse error on erpnext/templates/deployment-erpnext.yaml: error converting YAML to JSON: yaml: line 34: did not find expected key
helm.go:88: [debug] error converting YAML to JSON: yaml: line 34: did not find expected key
YAML parse error on erpnext/templates/deployment-erpnext.yaml

It breaks because the securityContext ends up like

      securityContext:
        {}
        capabilities:
          add: ["CAP_CHOWN"]

The solution would be to merge the result of

{{- toYaml .Values.securityContext | nindent 12 }}

with

capabilities:
  add: ["CAP_CHOWN"]

API for app

Hi,
Can you help me with following thing?

I need get all site name from current app, for example.
It's need API or something else?
Thanks!

'Password Expired' Error

Description of the issue

Helm deployment is not working properly. I followed all steps described on the website.
The 'scheduler' deployment and all 'workers' fail to start.

Steps to reproduce the issue

  1. install chart via helm
  2. wait for a couple of seconds

Expected result

pods should start up

Stacktrace / full error message if available

error message in scheduler and worker pods.

You are required to change your password immediately (password expired)
Changing password for frappe.
Current password: su: Authentication token manipulation error

Add an option to deploy mariadb alongside the curren setup

Is your feature request related to a problem? Please describe.
The chart doesn't has no option for a "builtin" database.
I know setting up another mariadb deployment isn't that hard but it's a quality of life/dev matter.
Personally I think a helmchart should supply you with everything you need to use the tool/whatever.

Describe the solution you'd like
The option to provision a mariadb deployment alongside the other erpnext deployments.
Most other charts I've used had a "builtin database" option or sth simmilar that was set to true by default.

Describe alternatives you've considered
Well I don't think there are any real alternatives, but I'm open for suggestions.

Additional context
The pain point was: I wanted to try erpnext -> I saw the helmchart -> I deployed the helmchart -> I missed the db was missing (and the pods weren't too happy about that).
Stuff like this can easily keep people from trying out (and maybe deciding to use) this project.

ERROR 1062 (23000) after add-example-site-job.yaml

Hello,
I install erpnext app in k8s by custom-values.yaml (helm install erpnext_app - frappe/erpnext -f custom-values.yaml)
where Images build from https://github.com/frappe/frappe_docker folder build
and when I use develop Branch erpnext_app good installed, but if i use Branch v11* I have next problem -

Attempt 1 to connect to mariadb-1593949947.frappe-mariadb.svc.cluster.local:3306
Attempt 1 to connect to base-erpnext-redis-queue:12000
Attempt 1 to connect to base-erpnext-redis-cache:13000
Attempt 1 to connect to base-erpnext-redis-socketio:11000
Connections OK
Created user 36c29e3206c1d751
Created database 36c29e3206c1d751
Granted privileges to user 36c29e3206c1d751 and database 36c29e3206c1d751
Starting database import...
Imported from database /home/frappe/frappe-bench/apps/frappe/frappe/data/Framework.sql
Installing frappe...

Something went wrong:
return code: 1
stdout:
b''
stderr:
b"ERROR 1062 (23000) at line 1: Duplicate entry '%-36c29e3206c1d751' for key 'PRIMARY'\n"

Can you help me?
Is v11* branch (frappe + erpnext) is supported for installed by helm?
thx

add new site job failed

While executing add new site job it is failing with the error
touch: cannot touch '/var/www/html/sites/.build': No such file or directory

Scaling out the scheduler

In the docs section under what can be scaled out :

It is unsure whether scheduler can be scaled out. It is set to replica: 1 by default.

As a learning curve i want to understand why we cant scale it when we can scale out the workers. Since i am taking this as my practical concept building i matched the contents of yaml for worker-d, worker-l and worker-s and found the scheduler chart is somewhat similar. Further more they both call the args which run the imported function from frappe.

Thanks!

Discover kustomize + skaffold + nix-shell

This issue is about knowledge sharing. It is not any actionable suggestion or a specific request, other than the invitation to ponder about it.

In the recent weeks I've been tweaking a git template to manage different development environments easily throughout the team.

Goals:

  • 100% reproducible k8s-dev environment
  • all relevant tooling packaged in the environment (k3d, skaffold, etc.) "no need to setup minikube by hand"
  • best practice base folder structure to manage different k8s environments (base, staging, dev, prod)

Please find attached the tar of the current state of the (private) repo.

chore.k8s-master.tar.gz

To test it:

  1. unpack
  2. have nix installed curl -L https://nixos.org/nix/install | sh
    • if you already have nix installed, make sure to update the channel nix-channel --update, kubespy is only on recent unstable channel, after it was merged a few days ago.
  3. cd chore.k8s
  4. nix-shell -> after building some patched command versions, you'll be dropped into a shell with the following extra tools:
 104   │ pkgs.mkShell {
 105   │   buildInputs = [
 106   │     commitizenPython
 107   │     container-structure-test
 108   │     kube-score
 109   │     # pkgs.delta - not packaged (yet)
 110   │     pkgs.dive
 111   │     pkgs.docker
 112   │     pkgs.docker-compose
 113   │     pkgs.docker-slim
 114   │     pkgs.drone-cli
 115   │     pkgs.fd
 116   │     pkgs.fluxctl
 117   │     pkgs.git
 118   │     pkgs.git-town
 119   │     pkgs.just
 120   │     pkgs.kompose
 121   │     # pkgs.kube3d
 122   │     kube3d # v3.0.0
 123   │     # pkgs.kubebox - not yet merged
 124   │     pkgs.kubectl
 125   │     pkgs.kubernetes-helm
 126   │     pkgs.kubespy
 127   │     pkgs.kubeval
 128   │     pkgs.kustomize
 129   │     pkgs.lazydocker
 130   │     pkgs.ripgrep
 131   │     pkgs.scc
 132   │     # pkgs.skaffold
 133   │     skaffold # patched fork for k3d v3.0.0
 134   │   ];

Just to highlight a few:

  • dive -> insights into docker images (for auditing & optimization)
  • fluxctl -> cli for fluxcd, gitops for k8s
  • git-town -> better git flows for teams
  • just -> a better make
  • k3d "kube3d" -> launch a quick k3s cluster in docker containers (cave: no pv support!)
  • kubespy -> see resources evolving on the command line
  • kubebox -> k8s TUI
  • skaffold -> goole's framework for manageing k8s projects (from dev to deployment)

The ./k8s folder structure is modelled after the official kustomize/kubectl docs on best practices on application management through gitops.

Feel free to ask if you have any questions.

Disclaimer: I have certain interest in this: I'd like to reach out to the communities from which we adopt software and share my findings about best practices, so that this and similar devops use cases are transparent and discoverable. Over time: mind share.

automated tests

  • Install docker, k3d, kubectl, helm
k3d cluster create devcluster \
  --api-port 127.0.0.1:6443 \
  -p 80:80@loadbalancer \
  -p 443:443@loadbalancer \
  --k3s-server-arg "--no-deploy=traefik"
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.44.0/deploy/static/provider/cloud/deploy.yaml

is it safe to have several replicas of scheduler ?

Hello there,

I don't know if this is the best place to ask this, but I'm wondering if it is safe to run the Scheduler in several replicas, thinking if any job or scheduler job can be ran twice (which is a behavior that is not wanted). Is there any mechanism to prevent this?.

Thanks

Can not create new site

Description of the issue

I am not able to create a new site via a job.

Context information (for bug reports)

Kubernetes cluster v1.18.0, erpnext helm chart v1.0.3

Steps to reproduce the issue

  1. fresh helm install
  2. creating site job

Observed result

the job fails and the site is not created.

Expected result

Job should succeed and site should be created.

Stacktrace / full error message if available

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/commands/new.py", line 84, in <module>
    main()
  File "/home/frappe/frappe-bench/commands/new.py", line 49, in main
    reinstall=False,
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 67, in _new_site
    make_site_dirs()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 267, in make_site_dirs
    os.makedirs(dir_path)
  File "/opt/bitnami/python/lib/python3.7/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/bitnami/python/lib/python3.7/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/opt/bitnami/python/lib/python3.7/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: './erp.example.com'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.