Open jbonnett92 opened 5 years ago
+1
+1 (Willing to contribute on this)
Sorry, but I'm totally unexperienced with Kubernetes. What is missing?
At the moment there is only Docker support, which is not sufficient if you want to integrate the CMS in a managed containerised environment, i.e. Kubernetes. Integrating in CI/CD pipelines would also require a bit of additional work.
For example:
/install
endpoint before you can login. If Kubernetes schedules a pod running the container, it should be ready for usage once it's running. All initialisation should be done without requiring to call an endpoint.ConfigMap
containing all allowed configurations, and read those in the code. You also want to allow (some) changes at run-time.Secret
Most of these "missing" things can be implemented by anyone that wants to set it up in Kubernetes, but it would be more convenient to have it wrapped in a package. Ideally a Helm chart for Cockpit would exist here: https://github.com/helm/charts/tree/master/stable
I'd love to help on this as well!
www.codefresh.com is the ticket for CI/CD. It's a really awesome CI/CD platform built specifically to take advantage of containers and the native entities in Kubernetes.
At the moment there is only Docker support, which is not sufficient if you want to integrate the CMS in a managed containerised environment, i.e. Kubernetes.
Yeah this is definitely true.
Integrating in CI/CD pipelines would also require a bit of additional work.
This isn't completely true, you should check out Codefresh, it would really save you some time.
This does not require CI/CD but rather a template YAML file made for integrating Kubernetes
It's "just" a matter of providing a sane default config.php
that reads everything from environment variables, and of course, removing the requirement to hit /install
(there should be a way to either provide the admin password for the bootstrap, or you auto-generate a safe one during startup)
With this in place, writing a helm chart and/or a kustomization.yaml
is possible.
I would also like to help with this! I'm lacking the PHP expertise to make it happen, but I tried on my own for a bit.
Maybe it would also make sense to add capabilities to load parts of the config from files to avoid leaking secrets to the environment variables
As I'm aware, this CMS uses filesystem for first read the collections and just then access the DB Driver (mongo for example) to really read the content, but that's not the only problem.
When using Kubernetes, you should not rely on the disk, since you can kill/restart/(not being able to use replicas) and you are going to loose everything on the disk itself.
Since Cockpit uses Flysystem, you can mount a Google Storage Bucket for replace the filesystem disk usage, anyway all those "$this->helpers('fs') in Collections" won't work.
Either you mount a persistent volume to store collections, or you provide a possibility to configure a different adapter for Flysystem so you can target a cloud-native store (like a AWS S3, Google Cloud Storage, Azure Blob...)
Persistent Volume / Persistent Volume Claim would be vendor agnostic...
This should then be split into two specific tickets: 1) allow to configure the config.php
through the environment and 2) remove requirement to need to visit /install
, perhaps by adding another configuration flag in config.php
?
Hey! So in case anyone is still looking for Cockpit Kubernetes support, I've put out a couple of PRs.
The Helm Chart ~PR is here: https://github.com/agentejo/cockpit/pull/1361~ is now in a dedicated repo: https://github.com/beasteers/cockpit-helm
and the admin autoinstall version is here: https://github.com/agentejo/cockpit/pull/1257. I also pushed up this branch as a docker image beasteers/cockpit:autoinstall
I know the core devs are busy and it takes a long time to get things merged so I'll try and keep on top of things. Also, I'm happy to take contributions cuz it works but it's definitely not complete yet!
Please can you add Kubernetes support?