Maybe it will be helpful for someone
-
sudo microk8s kubectl create namespace frappe-pg
-
sudo microk8s helm repo add frappe https://helm.erpnext.com
-
Configure custom-values.yaml
sudo nano custom-values.yaml
--------------
persistence:
worker:
enabled: true
# existingClaim: ""
size: 8Gi
storageClass: "microk8s-hostpath"
--------------
mariadb:
enabled: false
--------------
postgresql:
enabled: true
# host: ""
image:
tag: 14.11.0-debian-11-r13
auth:
username: "postgres"
postgresPassword: "changeit"
primary:
service:
ports:
postgresql: 5432
-----------------
-
sudo microk8s helm upgrade --install frappe-bench -n frappe-pg -f custom-values.yaml frappe/erpnext
-
Wait some time for install 5-10 minutes
-
Delete failed job “frappe-bench-erpnext-conf-bench…” if needed
-
sudo microk8s helm template frappe-bench -n frappe-pg frappe/erpnext -f custom-values.yaml -s templates/job-configure-bench.yaml > configure-bench-job.yaml
-
configure bench job:
sudo nano configure-bench-job.yaml
------------------
env:
- name: DB_HOST
value: frappe-bench-postgresql
- name: DB_PORT
value: "5432"
-------------------
-
Install bench. Create Job
sudo microk8s kubectl apply -n frappe-pg -f configure-bench-job.yaml -
Enable site for installation:
sudo nano custom-values.yaml
------------------
createSite:
enabled: true
forceCreate: true
siteName: "192.168.1.76" #ip of microk8s host
adminPassword: "changeit"
installApps:
- "frappe"
dbType: "postgres"
backoffLimit: 0
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
------------------
-
sudo microk8s helm template frappe-bench -n frappe-pg frappe/erpnext -f custom-values.yaml -s templates/job-create-site.yaml > create-new-site-job.yaml
-
Configure new-site job:
sudo nano create-new-site-job.yaml
------------------
args:
- >
bench new-site $(SITE_NAME)
--db-type=$(DB_TYPE)
--db-host=$(DB_HOST)
--db-port=$(DB_PORT)
--admin-password=$(ADMIN_PASSWORD)
--db-root-username=$(DB_ROOT_USER)
--db-root-password=$(DB_ROOT_PASSWORD)
--install-app=frappe
--force
;rm -f currentsite.txt
env:
- name: "SITE_NAME"
value: "192.168.1.76"
- name: "DB_TYPE"
value: postgres
- name: "DB_HOST"
value: frappe-bench-postgresql
- name: "DB_PORT"
value: "5432"
- name: "DB_ROOT_USER"
value: "postgres"
- name: "DB_ROOT_PASSWORD"
value: "changeit"
- name: "ADMIN_PASSWORD"
value: "changeit"
----------------------
-
Create Job
sudo microk8s kubectl apply -n frappe-pg -f create-new-site-job.yaml -
Port forwarding on host machine:
sudo microk8s kubectl port-forward -n frappe-pg service/frappe-bench-erpnext 18080:8080 --address 0.0.0.0 -
Login in frappe:
http://192.168.1.76:18080