Skip to content

Commit

Permalink
Update docs (#237)
Browse files Browse the repository at this point in the history
* Update index.md

Updated links from public MM to Matrix

* Update outdated commands in tutorial

Updated the `juju run-action` to `juju run`. I removed the `--wait` flag as it no longer works without an argument; I am not opposed to adding `--wait` back in, but I would need guidance on an appropriate value. 

Updated `juju destroy model` to `juju destroy-model`, changed `--release-storage` to `--destroy-storage` and removed the `-y` flag.

* Update integrate-with-cos.md

Updated `juju run-action` to `juju run` and removed the `--wait` flag as it requires an argument. I'm not opposed to adding `--wait` back in but would need guidance on how long the reader should wait for.

* Capitalise Grafana in integrate-with-cos.md

* Update enable-waf.md

Formatted the notice about the Modsecurity feature availability as a note.

* Update configure-hostname.md

Remove a colon

* Update configure-initial-settings.md

Reformatted the notice about configuring initial settings as a note.

* Update retrieve-initial-credentials.md

Changed `juju run-action` to `juju run` and removed the `--wait` flag. I'm not opposed to adding `--wait` back in but would need guidance on what argument to use. 

Also reformatted the note at the end as a note and modified the grammar slightly.

* Update configure-object-storage.md

Removed an incomplete sentence. If the sentence was necessary, let me know how to complete it.

* Update rotate-secrets.md

Changed `juju run-action` to `juju run` and removed the `-wait` flag. I'm not opposed to adding `--wait` back in but would need guidance on what the argument should be.

* Update plugins.md

it's --> its

* Update lifecycle-events.md

Capitalise Juju and Pebble.

Update the upgrade-charm section to not consist of fragmented sentences.

* Update oci-image.md

Add a word

* Update relations.md

Format `loki_push_api` as code; add a word
  • Loading branch information
erinecon authored Aug 22, 2024
1 parent 026b886 commit f525930
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 40 deletions.
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

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.
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.
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 build step. The latest CLI php archive file from source is used.
image during the 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 [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 the [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

\*This only works when setting up WordPress initially, before database relation setup. Changing the
> **NOTE** 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: 1 addition & 3 deletions docs/how-to/configure-object-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ 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 @@ -61,4 +59,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

\*This feature is only available for
> **NOTE** 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-action grafana-k8s/0 get-admin-password --wait
juju run grafana-k8s/0 get-admin-password
```

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.
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-action wordpress-k8s/0 get-initial-password --wait
juju run wordpress-k8s/0 get-initial-password
```

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 that if `admin_password` value has been passed in the `initial_settings` configuration, the
password from the action is invalid.
> **NOTE** If the `admin_password` value was 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-action wordpress-k8s/0 rotate-wordpress-secrets –wait
juju run wordpress-k8s/0 rotate-wordpress-secrets
```

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.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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://chat.charmhub.io/charmhub/channels/charm-dev)
- [Join our online chat](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)
- [Contribute](Contribute)

Thinking about using the WordPress Operator for your next project? [Get in touch](https://chat.charmhub.io/charmhub/channels/charm-dev)!
Thinking about using the WordPress Operator for your next project? [Get in touch](https://matrix.to/#/#charmhub-charmdev:ubuntu.com)!

# 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: 2 additions & 2 deletions docs/reference/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<plugin-slug>`, the plugin will also be installed to it's latest
`juju config wordpress-k8s plugins=<plugin-slug>`, the plugin will also be installed to its 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
Expand Down Expand Up @@ -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"
6 changes: 3 additions & 3 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ By running the `get-initial-password` action on a wordpress-k8s unit, juju will
admin credentials setup for you. You can use the following command below.

```
juju run-action wordpress-k8s/0 get-initial-password --wait
juju run wordpress-k8s/0 get-initial-password
```

The result should look something similar to the contents below:
Expand All @@ -87,5 +87,5 @@ Congratulations! You have successfully finished the wordpress-k8s tutorial. You
model environment that you’ve created using the following command.

```
juju destroy model wordpress-tutorial -y --release-storage
```
juju destroy-model wordpress-tutorial --destroy-storage
```

0 comments on commit f525930

Please sign in to comment.