{"id":18156203,"url":"https://github.com/epfl-si/wp-operator","last_synced_at":"2025-05-05T21:47:34.410Z","repository":{"id":259031201,"uuid":"876135788","full_name":"epfl-si/wp-operator","owner":"epfl-si","description":"EPFL's WordPress Operator","archived":false,"fork":false,"pushed_at":"2025-03-25T16:24:38.000Z","size":3007,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-31T00:05:02.550Z","etag":null,"topics":["k8s","kubernetes-operator","wordpress","wordpress-kubernetes"],"latest_commit_sha":null,"homepage":"https://www.epfl.ch","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epfl-si.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-21T13:10:04.000Z","updated_at":"2025-03-25T16:24:42.000Z","dependencies_parsed_at":"2024-11-01T17:24:13.589Z","dependency_job_id":"3c6c9570-a970-439c-ad69-1c8c67b2d4e9","html_url":"https://github.com/epfl-si/wp-operator","commit_stats":null,"previous_names":["epfl-si/wp-operator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-si%2Fwp-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-si%2Fwp-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-si%2Fwp-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-si%2Fwp-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epfl-si","download_url":"https://codeload.github.com/epfl-si/wp-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582619,"owners_count":21771697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["k8s","kubernetes-operator","wordpress","wordpress-kubernetes"],"created_at":"2024-11-02T05:05:43.828Z","updated_at":"2025-05-05T21:47:34.390Z","avatar_url":"https://github.com/epfl-si.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EPFL Kubernetes WordPress Operator\n\n![EPFL WordPress Operator Logo](https://github.com/epfl-si/wp-operator/blob/main/images/EPFL-WP-Operator-logo-small.png?raw=true)\n\nThis is the code for the Kubernetes WordPress Operator used at [EPFL].\n\nWe ([ISAS-FSD]) are managing roughly 1,000 WordPress sites, all consolidated\nunder one domain, \u003chttps://www.epfl.ch\u003e.\n\nWhile we would be happy for you to give it a try, this is not an Operator that\nyou can use \"off-the-shelf\" within your cluster. First, it needs a fine-tuned\nWordPress image that contains all the plugins your users are allowed to use.\nThen, you have to understand that the secrets needed by \"wp-config.php\" are\nmanaged within the Nginx configuration to be passed to PHP-FPM as FastCGI\nparameters (`fastcgi_param` directive). A homemade entrypoint takes care of the\nloading of the WordPress framework without a proper `wp-config.php`, so what\nwe can serve 1 to many WordPress sites using the very same image. Last but not\nleast, you will need to dive into some PHP scripts that manage the installation\n/ configuration of the site, themes and plugins through options in the site's\ndatabase.\n\nThis operator is built with [Kopf (Kubernetes Operators Framework)] and rely on\nthe [MariaDB Operator].\n\nA `make up` command in our development environment ([wp-dev]) should clone\neverything needed to get started, including this repo and [wp-ops], which\ncontains Ansible configuration as code. The operator is meant to deploy the\n[WordPressSite](./WordPressSite-crd.yaml) Custom Resource Definition by itself.\n\n\n## Setup\n\n### Locally\n\nTo make it work on your device, follow these steps:\n\n1. Make sure you have Python3 installed\n1. Install all the dependencies using `pip install -r requirements.txt`\n1. If outside the EPFL network, check additional steps\n1. Run the operator using `make operator`\n1. Run unit tests using `make test`\n\n#### Additional steps\n\nWhenever outside the EPFL network, you will need to:\n\n1. Install [KubeVPN]\n1. Connect the VPN to your cluster using `kubevpn connect`\n1. If you are on Linux → make sure to run these commands:\n    ```bash\n    resolvectl dns utun0 $(kubectl get -n kube-system \\\n    service/rke2-coredns-rke2-coredns \\\n    -o jsonpath='{$.spec.clusterIP}')\n    NAMESPACE=wordpress-test\n    resolvectl domain utun0 $NAMESPACE.svc.cluster.local \\\n    svc.cluster.local cluster.local\n    ```\n1. Quickly check that your VPN is _connected_ using `kubevpn status`\n\n### In a Pod\n\nThis repository contains the [Dockerfile](./Dockerfile) and an example\n([operator.yaml](./operator.yaml)) to deploy it in a cluster.\n\nJust run  `make` for help. Otherwise, use:\n  - `make image` to build a new (latest) image\n  - `make delete` (when needed) to remove previously installed operator\n  - `make deploy` to apply the new operator\n\nWhen in a development process, use `WP_OPERATOR_IMAGE_TAG=2024-000 make delete\nimage deploy` to have a rapid cycle.\n\nPlease note that our deployment is done by Ansible, so dive into [wp-ops] to\nfind the latest version.\n\n\n## Contributing\n\nIf you want to contribute to this repository, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n[EPFL]: https://www.epfl.ch\n[ISAS-FSD]: https://go.epfl.ch/isas-fsd\n[Kopf (Kubernetes Operators Framework)]: https://kopf.readthedocs.io\n[MariaDB Operator]: https://github.com/mariadb-operator/mariadb-operator\n[wp-dev]: https://github.com/epfl-si/wp-dev\n[wp-ops]: https://github.com/epfl-si/wp-ops\n[KubeVPN]: https://www.kubevpn.cn/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepfl-si%2Fwp-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepfl-si%2Fwp-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepfl-si%2Fwp-operator/lists"}