diff --git a/docs/explanation/lifecycle-events.md b/docs/explanation/lifecycle-events.md index 8e864ff7..20eded6f 100644 --- a/docs/explanation/lifecycle-events.md +++ b/docs/explanation/lifecycle-events.md @@ -21,7 +21,7 @@ uploaded content from the WordPress user. ### leader_elected -This event is fired when Juju elects a leader unit among the replica peers. Wordpress-k8s charm +This event is fired when juju elects a leader unit among the replica peers. Wordpress-k8s charm then responds by setting up secrets and sharing them with peers through peer relation databag if not already set. @@ -34,14 +34,14 @@ state and the desired state. See the list of ### wordpress_pebble_ready When this event is fired, wordpress-k8s charm installs, configures and starts Apache server for -WordPress through Pebble if the storage is available. Configurations that are set dynamically +WordPress through pebble if the storage is available. Configurations that are set dynamically include database connection and secrets used by the WordPress application. Dynamic configurations -are modified in `wp-config.php` file and the changes are pushed through Pebble. +are modified in `wp-config.php` file and the changes are pushed through pebble. ### apache_prometheus_exporter_pebble_ready This event signals that the `apache_prometheus_exporter` container is ready in the pod. Apache -prometheus exporter service is then started through Pebble. +prometheus exporter service is then started through pebble. ### wordpress-replica_relation_changed @@ -54,5 +54,5 @@ installed themes and plugins with the incoming list of themes and plugins. ### upgrade-charm -The `upgrade-charm` event is fired on the upgrade charm command `juju refresh wordpress-k8s`. The command sets up -secrets in peer-relation databag for upgraded deployment of WordPress if it was not already set. +Upgrade charm event is fired on the upgrade charm command `juju refresh wordpress-k8s`. Sets up +secrets in peer-relation databag for upgraded deployment of WordPress if not already set. \ No newline at end of file diff --git a/docs/explanation/oci-image.md b/docs/explanation/oci-image.md index 4138ece6..5e6470b2 100644 --- a/docs/explanation/oci-image.md +++ b/docs/explanation/oci-image.md @@ -13,9 +13,9 @@ happen during database relation changed, database relation joined or database co events. To facilitate the WordPress installation process, [WordPress CLI](https://make.wordpress.org/cli/handbook/guides/installing/) is embedded in the OCI -image during the build step. The latest CLI php archive file from source is used. +image during build step. The latest CLI php archive file from source is used. Currently, WordPress version 5.9.3 is used alongside Ubuntu 20.04 base image. The Ubuntu base image hasn't yet been upgraded to 22.04 due to an unsupported php version 8 for `wordpress-launchpad-integration` plugin (supported php version 7). All other plugins and themes use -the latest stable version by default, downloaded from the source. +the latest stable version by default, downloaded from the source. \ No newline at end of file diff --git a/docs/explanation/relations.md b/docs/explanation/relations.md index da01036c..a82abd14 100644 --- a/docs/explanation/relations.md +++ b/docs/explanation/relations.md @@ -35,8 +35,8 @@ more about COS [here](https://charmhub.io/topics/canonical-observability-stack). ### logging Logging relation is a part of the COS integration to enhance logging observability. The -wordpress-k8s charm satisfies the `loki_push_api` by integrating promtail that pushes apache logs to -Loki. Requires the [loki-k8s](https://charmhub.io/loki-k8s) charm. Learn more about COS +wordpress-k8s charm satisfies the loki_push_api by integrating promtail that pushes apache logs to +Loki. Requires [loki-k8s](https://charmhub.io/loki-k8s) charm. Learn more about COS [here](https://charmhub.io/topics/canonical-observability-stack). ### grafana-dashboard @@ -45,4 +45,4 @@ Grafana-dashboard is a part of the COS integration to enhance observability. Thi a pre-made dashboard used for monitoring Apache server hosting WordPress. The wordpress-k8s charm satisfies the `grafana_dashboard` interface by providing the pre-made dashboard template to the Grafana relation data bag under the "dashboards" key. Requires Prometheus datasource to be already -integrated with Grafana. +integrated with Grafana. \ No newline at end of file diff --git a/docs/how-to/configure-hostname.md b/docs/how-to/configure-hostname.md index 5fa54a53..a95e1259 100644 --- a/docs/how-to/configure-hostname.md +++ b/docs/how-to/configure-hostname.md @@ -36,10 +36,10 @@ nginx-ingress-integrator/0* active idle wordpress-k8s/0* active idle ``` -Note the Service IP(s) next to nginx-ingress-integrator charm’s Status output. +Note the Service IP(s): next to nginx-ingress-integrator charm’s Status output. Test the ingress by sending a GET request to the service with `Host` headers. ``` curl -H "Host: " http:// -``` +``` \ No newline at end of file diff --git a/docs/how-to/configure-initial-settings.md b/docs/how-to/configure-initial-settings.md index 3212577b..242eb01b 100644 --- a/docs/how-to/configure-initial-settings.md +++ b/docs/how-to/configure-initial-settings.md @@ -1,6 +1,6 @@ -# How to configure initial settings +# How to configure initial settings\* -> **NOTE** This only works when setting up WordPress initially, before database relation setup. Changing the +\*This only works when setting up WordPress initially, before database relation setup. Changing the value afterwards has no effect. By providing configuration value for `initial_settings` at deployment, you can tweak a few @@ -22,4 +22,4 @@ WordPress(`http:///wp-admin/options-general.php`). You can also pass in the wordpress-k8s `configuration.yaml` file with the parameters above. See how to pass in a configuration file in the -[juju documentation](https://juju.is/docs/olm/manage-applications#heading--configure-an-application-during-deployment). +[juju documentation](https://juju.is/docs/olm/manage-applications#heading--configure-an-application-during-deployment). \ No newline at end of file diff --git a/docs/how-to/configure-object-storage.md b/docs/how-to/configure-object-storage.md index 63d90265..ccfec4a2 100644 --- a/docs/how-to/configure-object-storage.md +++ b/docs/how-to/configure-object-storage.md @@ -16,6 +16,8 @@ installation. Source `openrc` and load the credentials by running source openrc && printenv | grep OS_ ``` +You should be able to see + The contents of the command above should look something similar to the following. ``` @@ -59,4 +61,4 @@ You can then configure wordpress-k8s charm using the yaml contents above. ``` juju config wordpress-k8s wp_plugin_openstack-objectstorage_config="$(cat )" -``` +``` \ No newline at end of file diff --git a/docs/how-to/enable-waf.md b/docs/how-to/enable-waf.md index f08b0224..d3f38a01 100644 --- a/docs/how-to/enable-waf.md +++ b/docs/how-to/enable-waf.md @@ -12,9 +12,9 @@ juju deploy nginx-ingress-integrator juju relate wordpress-k8s nginx-ingress-integrator ``` -### Enable Modsecurity 3.0 WAF +### Enable Modsecurity 3.0 WAF\* -> **NOTE** This feature is only available for +\*This feature is only available for [nginx-ingress-integrator](https://charmhub.io/nginx-ingress-integrator) charm. The modsecurity WAF is enabled by default. @@ -47,4 +47,4 @@ Annotations: nginx.ingress.kubernetes.io/enable-modsecurity: true Events: ``` -Note the `nginx.ingress.kubernetes.io/enable-modsecurity: true` annotation. +Note the `nginx.ingress.kubernetes.io/enable-modsecurity: true` annotation. \ No newline at end of file diff --git a/docs/how-to/integrate-with-cos.md b/docs/how-to/integrate-with-cos.md index e5a390d2..4f4e872c 100644 --- a/docs/how-to/integrate-with-cos.md +++ b/docs/how-to/integrate-with-cos.md @@ -24,7 +24,7 @@ juju relate wordpress-k8s loki-k8s ### grafana-k8s -In order for the Grafana dashboard to function properly, Grafana should be able to connect to +In order for the Grafana dashboard to function properly, grafana should be able to connect to Prometheus and Loki as its datasource. Deploy and relate prometheus-k8s and lok-k8s charm with [grafana-k8s](https://charmhub.io/grafana-k8s) charm through `grafana-source` relation. @@ -37,7 +37,7 @@ juju relate prometheus-k8s:grafana-source grafana-k8s:grafana-source juju relate loki-k8s:grafana-source grafana-k8s:grafana-source ``` -Then, wordpress-k8s charm can be related with Grafana using the `grafana-dashboard` relation with +Then, wordpress-k8s charm can be related with grafana using the `grafana-dashboard` relation with `grafana_dashboard` interface. ``` @@ -48,9 +48,9 @@ To access the Grafana dashboard for wordpress-k8s charm, run the following comma credentials for admin access. ``` -juju run grafana-k8s/0 get-admin-password +juju run-action grafana-k8s/0 get-admin-password --wait ``` -You can now log into the Grafana dashboard by visiting `http://:3000`. Navigate to +You can now log into the grafana dashboard by visiting `http://:3000`. Navigate to `http://:3000/dashboards` and access the WordPress dashboard named Wordpress Operator -Overview. +Overview. \ No newline at end of file diff --git a/docs/how-to/redeploy.md b/docs/how-to/redeploy.md deleted file mode 100644 index c44abae2..00000000 --- a/docs/how-to/redeploy.md +++ /dev/null @@ -1,37 +0,0 @@ -# How to Redeploy - -This guide provides the necessary steps for migrating an existing WordPress -instance to a new charm instance. - -## Migrate Database - -Follow the instructions -in [the mysql charm migration guide](https://charmhub.io/mysql/docs/h-migrate-cluster-via-restore) -to migrate the content of the WordPress MySQL database. - -## Migrate Media Files - -### Media Files Stored in Kubernetes Storage - -If your media files are stored in Kubernetes -storage (`wp_plugin_openstack-objectstorage_config` is not configured), use the -following steps to migrate your files: - -1. Use the `juju scp` command to transfer files from - the `/var/www/html/wp-content/uploads` directory of the old `wordpress` - container to a local directory. -2. Use the `juju scp` command again to copy these files from the local - directory to the `/var/www/html/wp-content/uploads` directory in the new - WordPress charm instance's `wordpress` container. - -### Media Files Stored in Object Storage - -If your media files are stored in object storage and -the `wp_plugin_openstack-objectstorage_config` is not configured, you have two -options: - -1. Provide the new WordPress charm instance with the same credentials and - connection information for the object storage. This allows the new instance - to automatically access the existing files. -2. Use tools like [rclone](https://rclone.org) to copy files from the old - storage bucket to a new bucket for the new deployment. \ No newline at end of file diff --git a/docs/how-to/retrieve-initial-credentials.md b/docs/how-to/retrieve-initial-credentials.md index a935b1ae..17adc753 100644 --- a/docs/how-to/retrieve-initial-credentials.md +++ b/docs/how-to/retrieve-initial-credentials.md @@ -4,7 +4,7 @@ Run the following command to get the initial admin password that can be used to `http:///wp-login.php`. ``` -juju run wordpress-k8s/0 get-initial-password +juju run-action wordpress-k8s/0 get-initial-password --wait ``` The output of the action should look something similar to the following: @@ -20,5 +20,5 @@ unit-wordpress-k8s-0: You can use the password to login to the admin account in `http:///wp-admin.php`. -> **NOTE** If the `admin_password` value was passed in the `initial_settings` configuration, the -password from the action is invalid. +Note that if `admin_password` value has been passed in the `initial_settings` configuration, the +password from the action is invalid. \ No newline at end of file diff --git a/docs/how-to/rotate-secrets.md b/docs/how-to/rotate-secrets.md index f69c6542..7ef0b630 100644 --- a/docs/how-to/rotate-secrets.md +++ b/docs/how-to/rotate-secrets.md @@ -3,7 +3,7 @@ To securely update all the WordPress secrets, run the following action. ``` -juju run wordpress-k8s/0 rotate-wordpress-secrets +juju run-action wordpress-k8s/0 rotate-wordpress-secrets –wait ``` -This action will force users to be logged out. All sessions and cookies will be invalidated. +This action will force users to be logged out. All sessions and cookies will be invalidated. \ No newline at end of file diff --git a/docs/how-to/upgrade-wordpress-charm.md b/docs/how-to/upgrade-wordpress-charm.md deleted file mode 100644 index ca5e140e..00000000 --- a/docs/how-to/upgrade-wordpress-charm.md +++ /dev/null @@ -1,20 +0,0 @@ -# How to upgrade WordPress Charm - -Before updating the Charm you need to backup the database using MySQL charm's `create-backup` action. - -``` -juju run mysql/leader create-backup -``` -Additional info can be found about backup in [the MySQL documentation](https://charmhub.io/mysql/docs/h-create-and-list-backups) - -Then you can upgrade the WordPress Charm. - -``` -juju refresh wordpress-k8s -``` - -After upgrading the WordPress Charm you need to update the database schema. - -``` -juju run wordpress-k8s/0 update-database -``` diff --git a/docs/index.md b/docs/index.md index 4593196e..10c60898 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,8 +1,8 @@ -# Wordpress Operator - A [Juju](https://juju.is/) [charm](https://juju.is/docs/olm/charmed-operators) deploying and managing WordPress on Kubernetes. [WordPress](https://wordpress.com/) is the world's most popular website builder, and it's free and open-source. -This charm simplifies initial deployment and operations of WordPress on Kubernetes, including scaling the number of instances, integration with SSO, access to OpenStack Swift object storage for redundant file storage, and more. It allows for deployment on many different Kubernetes platforms, from [MicroK8s](https://microk8s.io/) to [Charmed Kubernetes](https://ubuntu.com/kubernetes) to public cloud Kubernetes offerings. +This charm simplifies initial deployment and "day N" operations of WordPress on Kubernetes, including scaling the number of instances, integration with SSO, access to OpenStack Swift object storage for redundant file storage, and more. It allows for deployment on many different Kubernetes platforms, from [MicroK8s](https://microk8s.io/) to [Charmed Kubernetes](https://ubuntu.com/kubernetes) to public cloud Kubernetes offerings. + +As such, the charm makes it easy for those looking to take control of their own content management system whilst keeping operations simple and gives them the freedom to deploy on the Kubernetes platform of their choice. This charm will make operating WordPress simple and straightforward for DevOps or SRE teams through Juju's clean interface. It will allow easy deployment into multiple environments to test changes and support scaling out for enterprise deployments. @@ -25,10 +25,10 @@ The WordPress Operator is a member of the Ubuntu family. It's an open-source pro - [Code of conduct](https://ubuntu.com/community/code-of-conduct) - [Get support](https://discourse.charmhub.io/) -- [Join our online chat](https://matrix.to/#/#charmhub-charmdev:ubuntu.com) -- [Contribute](https://github.com/canonical/wordpress-k8s-operator/blob/main/CONTRIBUTING.md) +- [Join our online chat](https://chat.charmhub.io/charmhub/channels/charm-dev) +- [Contribute](Contribute) -Thinking about using the WordPress Operator for your next project? [Get in touch](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)! +Thinking about using the WordPress Operator for your next project? [Get in touch](https://chat.charmhub.io/charmhub/channels/charm-dev)! # Contents @@ -56,4 +56,4 @@ Thinking about using the WordPress Operator for your next project? [Get in touch 1. [Containers](explanation/containers.md) 1. [Lifecycle events](explanation/lifecycle-events.md) 1. [OCI image](explanation/oci-image.md) - 1. [Relations](explanation/relations.md) + 1. [Relations](explanation/relations.md) \ No newline at end of file diff --git a/docs/reference/actions.md b/docs/reference/actions.md index 091a0cbe..87fc65d5 100644 --- a/docs/reference/actions.md +++ b/docs/reference/actions.md @@ -1,5 +1,3 @@ # Actions -See [Actions](https://charmhub.io/wordpress-k8s/actions). - -> Read more about actions in the Juju docs: [Action](https://juju.is/docs/juju/action) +See [Actions](https://charmhub.io/wordpress-k8s/actions). \ No newline at end of file diff --git a/docs/reference/configurations.md b/docs/reference/configurations.md index 904b13e2..cf25229c 100644 --- a/docs/reference/configurations.md +++ b/docs/reference/configurations.md @@ -1,5 +1,3 @@ # Configurations -See [Configurations](https://charmhub.io/wordpress-k8s/configure). - -> Read more about configurations in the Juju docs: [Configuration](https://juju.is/docs/juju/configuration) +See [Configure](https://charmhub.io/wordpress-k8s/configure). \ No newline at end of file diff --git a/docs/reference/external-access.md b/docs/reference/external-access.md deleted file mode 100644 index f3f9c10f..00000000 --- a/docs/reference/external-access.md +++ /dev/null @@ -1,23 +0,0 @@ -# External Access Requirements - -The WordPress charm may need to connect to external services and resources for -certain functionalities. - -## OpenStack Object Storage - -When activated, the WordPress instance will need to connect to configured -OpenStack object storage for uploading and retrieval of media and assets. - -## Akismet Spam Protection Plugin - -The Akismet spam protection plugin, when enabled via the `wp_plugin_akismet_key` -configuration, requires internet access to connect with -the [Akismet API server](https://akismet.com/support/general/connection-issues/). -This connection is essential for verifying and managing spam content. - -## Installing Additional Plugins or Themes - -For the installation of additional plugins or themes, the WordPress instance -must access the main WordPress site to download installation files. Some plugins -or themes might also need internet access to operate correctly after they are -installed. diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md index f201a932..96a420b8 100644 --- a/docs/reference/integrations.md +++ b/docs/reference/integrations.md @@ -11,10 +11,7 @@ charm enables additional `blog_hostname` and `use_nginx_ingress_modesec` configu kubernetes cluster must already have an nginx ingress controller already deployed. Documentation to enable ingress in microk8s can be found [here](https://microk8s.io/docs/addon-ingress). -Example ingress integrate command: -``` -juju integrate wordpress-k8s nginx-ingress-integrator -``` +Example ingress relate command: `juju relate wordpress-k8s nginx-ingress-integrator` ### metrics-endpoint @@ -27,10 +24,7 @@ apache’s `/server-status` route is not exposed and can only be accessed from w Kubernetes pod. The metrics are exposed in the [open metrics format](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#data-model) and will only be scraped by Prometheus once the relation becomes active. For more information about the metrics exposed, please refer to the apache-exporter [documentation](https://github.com/Lusitaniae/apache_exporter#collectors). -Metrics-endpoint integrate command: -``` -juju integrate wordpress-k8s prometheus-k8s -``` +Metrics-endpoint relate command: `juju relate wordpress-k8s prometheus-k8s` ### logging @@ -41,10 +35,7 @@ Logging relation through the `loki_push_api` interface installs and runs promtai contents of local logs found at `/var/log/apache2/access.log` and `/var/log/apache2/error.log` to Loki. This can then be queried through the loki api or easily visualized through Grafana. -Logging-endpoint integrate command: -``` -juju integrate wordpress-k8s loki-k8s -``` +Logging-endpoint relate command: `juju relate wordpress-k8s loki-k8s` ### grafana-dashboard @@ -57,25 +48,16 @@ be found at `/src/grafana_dashboards/wordpress.json`. In Grafana UI, it can be f Operator Overview” under the General section of the dashboard browser (`/dashboards`). Modifications to the dashboard can be made but will not be persisted upon restart/redeployment of the charm. -Grafana-Prometheus integrate command: -``` -juju integrate grafana-k8s:grafana-source prometheus-k8s:grafana-source -``` -Grafana-dashboard integrate command: -``` -juju integrate wordpress-k8s grafana-dashboard -``` +Grafana-Prometheus relate command: `juju relate grafana-k8s:grafana-source prometheus-k8s:grafana-source` +Grafana-dashboard relate command: `juju relate wordpress-k8s grafana-dashboard` ### database: -_Interface_: mysql_client +_Interface_: mysql_client _Supported charms_: [Charmed MySQL](https://charmhub.io/mysql), [Charmed MySQL-K8s](https://charmhub.io/mysql-k8s) Database endpoint can be related to mysql based charms, providing long term storage for wordpress. Database relation connect wordpress-k8s with charms that support the `mysql_client` interface on port 3306 in the database side. -Example database integrate command: -``` -juju integrate wordpress-k8s:database mysql-k8s:database -``` +Example database relate command: juju relate wordpress-k8s:database mysql-k8s:database \ No newline at end of file diff --git a/docs/reference/plugins.md b/docs/reference/plugins.md index 1c816a74..c815c0e2 100644 --- a/docs/reference/plugins.md +++ b/docs/reference/plugins.md @@ -2,7 +2,7 @@ By default, the following WordPress plugins are installed with the latest version during the OCI image build time. If the plugins are installed during runtime with -`juju config wordpress-k8s plugins=`, the plugin will also be installed to its latest +`juju config wordpress-k8s plugins=`, the plugin will also be installed to it's latest version by default and may cause version differences between pods. The wordpress-k8s charm supports multi-unit deployments. Therefore, installing plugins through UI has been disabled and can only be installed through the plugins configuration. Please see @@ -80,4 +80,4 @@ _\*The descriptions of the following plugins are taken from the WordPress plugin - [wp-statistics](https://wordpress.org/plugins/wp-statistics/): GDPR compliant website statistics tool. - [xubuntu-team-members](https://git.launchpad.net/~canonical-sysadmins/wordpress/+git/wp-plugin-xubuntu-team-members): - Adds the role "Xubuntu Team member" + Adds the role "Xubuntu Team member" \ No newline at end of file diff --git a/docs/tutorial.md b/docs/tutorial.md index ec766376..a5f98d55 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -126,4 +126,4 @@ If you used Multipass, to remove the Multipass instance you created for this tut ``` multipass delete --purge my-juju-vm -``` +``` \ No newline at end of file