Hello Everyone,
As i have distracted from other works recently i took this long to dive again in this topic. After some digging i came across Github repo of VeryStrongFingers for deploying ERPNext locally using k3s. https://github.com/VeryStrongFingers/erpnext-k3s/tree/VeryStrongFingers-patch-1.
Some steps has been missed but somehow i picked the flow, but unfortunately i am struck at create-site job. It will be really helpful for me if anyone here can give your guidance. I am really hitting a wall after few steps.
To Make it easier, let me share my manifests and commands below:
docker volume create erpnext-persistence
k3d cluster create strong-erpnext --volume erpnext-persistence:/opt/local-path-provisioner
log:
WARN[0000] No node filter specified
INFO[0000] Prep: Network
INFO[0000] Re-using existing network 'k3d-strong-erpnext' (c587f13f6d1439d76f32231210c976e46c2be09f9613bbf110dcbc2f69860a8b)
INFO[0000] Created image volume k3d-strong-erpnext-images
INFO[0000] Starting new tools node...
INFO[0000] Starting node 'k3d-strong-erpnext-tools'
INFO[0001] Creating node 'k3d-strong-erpnext-server-0'
INFO[0001] Creating LoadBalancer 'k3d-strong-erpnext-serverlb'
INFO[0001] Using the k3d-tools node to gather environment information
INFO[0001] Starting new tools node...
INFO[0002] Starting node 'k3d-strong-erpnext-tools'
INFO[0003] Starting cluster 'strong-erpnext'
INFO[0003] Starting servers...
INFO[0003] Starting node 'k3d-strong-erpnext-server-0'
INFO[0007] All agents already running.
INFO[0007] Starting helpers...
INFO[0007] Starting node 'k3d-strong-erpnext-serverlb'
INFO[0014] Injecting records for hostAliases (incl. host.k3d.internal) and for 3 network members into CoreDNS configmap...
INFO[0016] Cluster 'strong-erpnext' created successfully!
INFO[0016] You can now use it like this:
kubectl cluster-info
- kubectl config use-context k3d-strong-erpnext
- kubectl create ns mariadb
- kubectl create ns erpnext
- kubectl apply --namespace erpnext -f ./pvc.yaml
pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: erpnext
name: erpnext-worker
namespace: erpnext
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
storageClassName: local-path
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: erpnext
name: erpnext-logs
namespace: erpnext
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
storageClassName: local-path
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: erpnext
name: erpnext-pvc
namespace: erpnext
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
storageClassName: local-path
- kubectl apply --namespace erpnext -f ./erpnext-db-secret.yaml
erpnext-db-secret.yaml
apiVersion: v1
data:
password: ************************
kind: Secret
metadata:
name: mariadb-root-password
namespace: erpnext
type: Opaque
- helm install mariadb --namespace mariadb bitnami/mariadb --version 11.0.10 -f ./maria-db-values.yaml --wait
maria-db-values.yaml
auth:
rootPassword: "someSecurePassword"
primary:
configuration: |-
[mysqld]
character-set-client-handshake=FALSE
skip-name-resolve
explicit_defaults_for_timestamp
basedir=/opt/bitnami/mariadb
plugin_dir=/opt/bitnami/mariadb/plugin
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
tmpdir=/opt/bitnami/mariadb/tmp
max_allowed_packet=16M
bind-address=0.0.0.0
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
log-error=/opt/bitnami/mariadb/logs/mysqld.log
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
[client]
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
default-character-set=utf8mb4
plugin_dir=/opt/bitnami/mariadb/plugin
[manager]
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
- helm install erpnext --namespace erpnext frappe/erpnext --version 6.0.95 -f ./erpnext-values.yaml --wait
erpnext-values.yaml
replicaCount: 1
mariadbHost: "mariadb.mariadb.svc.cluster.local"
persistence:
worker:
enabled: true
existingClaim: "erpnext-worker"
storageClass: "local-path"
logs:
enabled: true
existingClaim: "erpnext-logs"
storageClass: "local-path"
- kubectl get pods -n erpnext
NAME READY STATUS RESTARTS AGE
erpnext-conf-bench-20241015171732-nwv8k 0/1 Completed 0 2m27s
erpnext-gunicorn-8457f57678-vr45c 1/1 Running 0 2m27s
erpnext-mariadb-0 1/1 Running 0 2m27s
erpnext-nginx-59f7f99746-dsdd7 1/1 Running 0 2m27s
erpnext-redis-cache-master-0 1/1 Running 0 2m27s
erpnext-redis-queue-master-0 1/1 Running 0 2m27s
erpnext-redis-socketio-master-0 1/1 Running 0 2m27s
erpnext-scheduler-79cc74cfd7-frpgl 1/1 Running 1 (67s ago) 2m27s
erpnext-socketio-6c88698f9d-bzgg7 1/1 Running 2 (66s ago) 2m27s
erpnext-worker-d-dd8d568fd-vzkzn 1/1 Running 2 (66s ago) 2m27s
erpnext-worker-l-6f658f9856-99x89 1/1 Running 2 (66s ago) 2m27s
erpnext-worker-s-5d6485477b-hq9lw 1/1 Running 2 (66s ago) 2m27s
- kubectl apply --namespace erpnext -f ./create-site-job.yaml
create-site-job.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: create-erp-site
namespace: erpnext
spec:
backoffLimit: 0
template:
spec:
securityContext:
supplementalGroups: [1000]
containers:
- name: create-site
image: frappe/erpnext-worker:v12.17.0
args: ["new"]
imagePullPolicy: IfNotPresent
volumeMounts:
- name: sites-dir
mountPath: /home/frappe/frappe-bench/sites
env:
- name: "SITE_NAME"
value: "localhost"
- name: "DB_ROOT_USER"
value: root
- name: "MYSQL_ROOT_PASSWORD"
valueFrom:
secretKeyRef:
key: password
name: mariadb-root-password
- name: "ADMIN_PASSWORD"
value: "bigchungus"
- name: "INSTALL_APPS"
value: "erpnext"
securityContext:
runAsUser: 1000 # Use the appropriate user ID
runAsGroup: 1000 # Use the appropriate group ID
restartPolicy: Never
volumes:
- name: sites-dir
persistentVolumeClaim:
claimName: erpnext-pvc
readOnly: false
- kubectl get pods -n erpnext
NAME READY STATUS RESTARTS AGE
create-erp-site-gxt47 0/1 ContainerCreating 0 4s
erpnext-conf-bench-20241015171732-nwv8k 0/1 Completed 0 10m
erpnext-gunicorn-8457f57678-vr45c 1/1 Running 0 10m
erpnext-mariadb-0 1/1 Running 0 10m
erpnext-nginx-59f7f99746-dsdd7 1/1 Running 0 10m
erpnext-redis-cache-master-0 1/1 Running 0 10m
erpnext-redis-queue-master-0 1/1 Running 0 10m
erpnext-redis-socketio-master-0 1/1 Running 0 10m
erpnext-scheduler-79cc74cfd7-frpgl 1/1 Running 1 (8m43s ago) 10m
erpnext-socketio-6c88698f9d-bzgg7 1/1 Running 2 (8m42s ago) 10m
erpnext-worker-d-dd8d568fd-vzkzn 1/1 Running 2 (8m42s ago) 10m
erpnext-worker-l-6f658f9856-99x89 1/1 Running 2 (8m42s ago) 10m
erpnext-worker-s-5d6485477b-hq9lw 1/1 Running 2 (8m42s ago) 10m
- kubectl logs --namespace erpnext -f job/create-erp-site
While here i am getting the log as i mentioned previously.
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
Thanks in advance! bye!