Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[discourse-gatekeeper] Migrate charm docs #252

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/explanation/lifecycle-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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

Expand All @@ -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.
4 changes: 2 additions & 2 deletions docs/explanation/oci-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 3 additions & 3 deletions docs/explanation/relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
4 changes: 2 additions & 2 deletions docs/how-to/configure-hostname.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ nginx-ingress-integrator/0* active idle <nginx-ingress-integrator-ip>
wordpress-k8s/0* active idle <wordpress-k8s-ip>
```

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: <desired-hostname>" http://<nginx-ingress-integrator-service-ip>
```
```
6 changes: 3 additions & 3 deletions docs/how-to/configure-initial-settings.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -22,4 +22,4 @@ WordPress(`http://<wordpress-unit-ip>/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).
4 changes: 3 additions & 1 deletion docs/how-to/configure-object-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```
Expand Down Expand Up @@ -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 <path-to-yaml>)"
```
```
6 changes: 3 additions & 3 deletions docs/how-to/enable-waf.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -47,4 +47,4 @@ Annotations: nginx.ingress.kubernetes.io/enable-modsecurity: true
Events: <none>
```

Note the `nginx.ingress.kubernetes.io/enable-modsecurity: true` annotation.
Note the `nginx.ingress.kubernetes.io/enable-modsecurity: true` annotation.
10 changes: 5 additions & 5 deletions docs/how-to/integrate-with-cos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

```
Expand All @@ -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://<grafana-unit-ip>:3000`. Navigate to
You can now log into the grafana dashboard by visiting `http://<grafana-unit-ip>:3000`. Navigate to
`http://<grafana-unit-ip>:3000/dashboards` and access the WordPress dashboard named Wordpress Operator
Overview.
Overview.
37 changes: 0 additions & 37 deletions docs/how-to/redeploy.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/how-to/retrieve-initial-credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Run the following command to get the initial admin password that can be used to
`http://<wordpress-unit-ip>/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:
Expand All @@ -20,5 +20,5 @@ unit-wordpress-k8s-0:

You can use the password to login to the admin account in `http://<wordpress-unit-ip>/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.
4 changes: 2 additions & 2 deletions docs/how-to/rotate-secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
20 changes: 0 additions & 20 deletions docs/how-to/upgrade-wordpress-charm.md

This file was deleted.

14 changes: 7 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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

Expand Down Expand Up @@ -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)
4 changes: 1 addition & 3 deletions docs/reference/actions.md
Original file line number Diff line number Diff line change
@@ -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).
4 changes: 1 addition & 3 deletions docs/reference/configurations.md
Original file line number Diff line number Diff line change
@@ -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).
23 changes: 0 additions & 23 deletions docs/reference/external-access.md

This file was deleted.

32 changes: 7 additions & 25 deletions docs/reference/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand All @@ -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
Loading