Source for deployment: Helm wordpress 19.2.0 · bitnami/bitnami (artifacthub.io)
Trying to follow KISS and best practices. This deployment path seemed very well maintained and mature, but I am lacking some key components of the design that are not allowing me to successfully deploy.
One key criteria is to deploy where I can “build a website” within “dev” (deployment / namespace ), where I learn how updates to “dev” are synced on merge to “prod” (main branch within SCM).
Issues:
# Deploy command snip: helm upgrade --install ${APP_NAME} bitnami/wordpress --version 19.0.6 --set "wordpressPassword=${wordpressPassword},global.storageClass=${storageClass},mariadb.auth.password=${mariadb_password},mariadb.auth.rootPassword=${mariadb_rootPassword},ingress.annotations=${cilium_annotations},ingress.annotations=${service_annotations},networkPolicy.ingress.namespaceSelector=${NAMESPACE},meta.helm.sh/release-namespace=${NAMESPACE},containerSecurityContext.runAsUser=${container_runas_user},podSecurityContext.fsGroup=${container_runas_user}" --create-namespace --namespace $NAMESPACE
# kubernetes deploy result
~$ kubectl get pods -A
NAMESPACE wordpress-7dcf6b6ff6-v594s 0/1 CrashLoopBackOff 217 (3m23s ago) 21h
NAMESPACE wordpress-mariadb-0 0/1 CrashLoopBackOff 261 (98s ago) 21h
~$ kubectl logs wordpress-mariadb-0 -n NAMESPACE
mariadb 16:29:28.65 INFO ==>
mariadb 16:29:28.65 INFO ==> Welcome to the Bitnami mariadb container
mariadb 16:29:28.65 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
mariadb 16:29:28.65 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
mariadb 16:29:28.65 INFO ==>
mariadb 16:29:28.66 INFO ==> ** Starting MariaDB setup **
mariadb 16:29:28.68 INFO ==> Validating settings in MYSQL_*/MARIADB_* env vars
mariadb 16:29:28.68 INFO ==> Initializing mariadb database
mkdir: cannot create directory '/bitnami/mariadb': Stale file handle
$ kubectl get pvc -n NAMESPACE
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
wordpress Bound pvc-e06d1875-7b89-47f1-a683-2d5d9f721553 10Gi RWO nfs-md0-container-sc 23h
data-wordpress-mariadb-0 Bound pvc-4246bca0-65db-44ec-8dba-5357e6c4b76c 8Gi RWO nfs-md0-container-sc 23h
So it is deploying pods. And I am passing it variables that it set for passwords, namespace, and even define storage up front so I can later backup, re-attach etc..
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-wordpress-mariadb-0
namespace: NAMESPACE
labels:
app.kubernetes.io/component: primary # pulled from baseline deploy bitnami/wp deploy
app.kubernetes.io/instance: wordpress # pulled from baseline deploy bitnami/wp deploy
app.kubernetes.io/name: mariadb # pulled from baseline deploy bitnami/wp deploy
spec:
accessModes:
- ReadWriteOnce
storageClassName: nfs-md0-container-sc
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: wp-pv-dev
namespace: NAMESPACE
spec:
accessModes:
- ReadWriteOnce
storageClassName: nfs-md0-container-sc
resources:
requests:
storage: 10Gi
I pulled labels and pvc names from deployment and input into PVC and Storage class deploy. But I think wp helm expects some other permissions or tagging so it can finish attaching with permissions.
Reason I am trying to pre-allocate the pv, is so I can 1) call it on re-deploy, and as such not loose website content and work 2) backup and also later on attach backup volume for more production like workflow 3) Learn how to do content merging where promotion to prod will necessitate data and content from dev to be applied to live prod
Ask:
Thanks
]]>Thanks
]]>But now the problem is I cannot add content as it says Unable to write to directory. I have no idea how to get permissions and enable writing to folder wp-content someone please help.
I am also unable to upload theme files :/
Please help ASAP
I have managed to work out how to update the pdf links and have downloaded FileZilla to upload etc but I can’t for the life of me work out how to edit the on site text! I thought I had it figured out by (don’t laugh) right clicking and going to ‘inspect element’ on what I wanted to change, going through until I found the text I wanted to edit and right clicking to ‘edit text’. I also tried editing it as an html, but have since figured that this must be a chrome option and doesn’t have any long term effect on the content of the website
The site is hosted by Helm, and I am an absolute beginner in this so please keep answers a straightforward as possible!! Sorry for being such a noob, and any help is very much appreciated!
]]>I had a domain with Go Daddy and joined Streamline.net for a free trial. While with them I uploaded WP and somehow did it twice, so it was a bit messy and I could not work out how to delete what I needed to. I was not sure about how to edit the PHP file and save it and I did not get much help from the web host so I cancelled. Now I am trying someone else and I know the guy but he is hosting it at cost for me so I don’t want to bother him too much. I went to go daddy and updated the nameservers (4) and when I click on www.colinproctor.co.uk I get “create configuration file but don’t know what to enter and even if I do, will this all work. The other thing is, well, I will just paste the relavent part of the email I sent below:
************************************************************************
Hi john, I have wasted my whole day looking at the Helm back office and not getting anywhere.
Sorry to keep bothering you but I am just at a standstill.
My questions are:
* Will Helm work with WordPress?
* When I try to add MySL 5 it says “There are no databases of this type available” am I doing something wrong?
* I read something about WordPress needing a Linux system to work, is this right?
* When I try to add a database it says “Unable to add database as it already exists. Please enter a new database name and try again”
* When I go to www.colinproctor.co.uk I get a “create configuration file” message (when you download WordPress there is a file called wp-config.samples.php or similar which you have to open, edit with the permissions and save as wp-config.php – deleting the old file.
* Originally I signed up with Streamline.net and these files are left over from that I think. I actually uploaded too many and messed it up a bit so would like to delete everything and start again but don’t know how to go about it.
* It all looks so simple on the WordPress site – I have my heart set on a WordPress blog as it’s the best. If it won’t work with this server I will have to cancel which I really don’t want to do.
***********************************************************************
Can anyone help? I am new to blogs but really want a WP one.
Colin
]]>