From here, I’m unable to connect the dots. I know I need to get the image into a repo (it’ll be going into an AWS ECR repo). What needs to be done to deploy the custom worker image during
site creation? I found a thread (https://github.com/frappe/helm/issues/50) that gets close to what I need but I’m not clear on the next step.
Thanks in advance.
Edit: It appears that pointing the ‘create new site’ job to my custom erpnext-worker image (which lives in an ECR repo) is all that’s needed. I’d test it but am back to chasing a db demon that I thought I’d conquered (mariadb/rds - db gets created but erpnext gets access denied when connecting to it - yes, I’m using rds_db).
If someone can validate that I’m on the right path with the custom image piece, it would be appreciated.
Is the nginx image necessary? I’m using the erpnext helm chart and an aws load-balancer on the front-end. I don’t have any ‘nginx’ containers running so don’t think I need it but it’s always best to check.
I created a fresh helm deployment using the erpnext helm chart . I created custom nginx and worker images, I mounted the worker image to make sure that my app was in there. It is. I edited the create-new-site job template, spec.template.spec.containers->create-site-> image to point to my private repository. I then applied the create-new-site job template.
The job ran successfully, site was created but no sign of my app. I tried manually installing through bench but it doesn’t know anything about the custom app.
Just to make sure I’m not overlooking the obvious, does the deployment need to be created using the custom images or is it okay to use them just for new site deployment? I should mention also that I would try creating with ‘bench new-site’ but there doesn’t seem to be an option to specify the image.
I created a new deployment using pythonImage and nginxImage parameters. The deployment went fine and the app is installed. Funny enough, the app does some theme hackery which doesn’t seem to be sticking in the kubernetes environment. Off to work on that now…
I think my remaining issue is down to customizations that normally occur as part of a bench build. You can’t do a build in the docker environment…no yarn…I’m sure this is intentional. I’m not sure how to achieve the same effect, though.
ARG on line 3 ensures that correct image is pulled during build of nginx image.
If there is no ARG then frappe/erpnext-nginx:latest or frappe/frappe-nginx:latest will be pulled on line 19 of your nginx Dockerfile
Well, that fixed the missing assets issue. Thanks again. Now I’m able to deploy a site in kubernetes and most everything is working fine. My app updates splash_image via hooks.py. I’ve confirmed that the assets are present in the image. Something in prepare_production.sh most be overwriting the modification. Maybe this is by design (that’s a separate discussion ).
Currently digging to see how splash_image is called.
Once a new site has been created using custom erpnext and worker images, how does this impact helm upgrades? If upgrading from chart 3.2.35 to 3.2.40…but the custom images were built against v13.15.1 code (from 3.2.35)…is there a process to be followed to avoid conflict?