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

Update docs #241

Merged
merged 8 commits into from
Oct 7, 2024
Merged
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
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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.
# Wordpress Operator

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.
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.

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 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 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 @@ -26,7 +26,7 @@ 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](Contribute)
- [Contribute](https://github.com/canonical/wordpress-k8s-operator/blob/main/CONTRIBUTING.md)

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

Expand Down
4 changes: 3 additions & 1 deletion docs/reference/actions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Actions

See [Actions](https://charmhub.io/wordpress-k8s/actions).
See [Actions](https://charmhub.io/wordpress-k8s/actions).

> Read more about actions in the Juju docs: [Action](https://juju.is/docs/juju/action)
4 changes: 3 additions & 1 deletion docs/reference/configurations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Configurations

See [Configure](https://charmhub.io/wordpress-k8s/configure).
See [Configurations](https://charmhub.io/wordpress-k8s/configure).

> Read more about configurations in the Juju docs: [Configuration](https://juju.is/docs/juju/configuration)
32 changes: 25 additions & 7 deletions docs/reference/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ 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 relate command: `juju relate wordpress-k8s nginx-ingress-integrator`
Example ingress integrate command:
```
juju integrate wordpress-k8s nginx-ingress-integrator
```

### metrics-endpoint

Expand All @@ -24,7 +27,10 @@ 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 relate command: `juju relate wordpress-k8s prometheus-k8s`
Metrics-endpoint integrate command:
```
juju integrate wordpress-k8s prometheus-k8s
```

### logging

Expand All @@ -35,7 +41,10 @@ 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 relate command: `juju relate wordpress-k8s loki-k8s`
Logging-endpoint integrate command:
```
juju integrate wordpress-k8s loki-k8s
```

### grafana-dashboard

Expand All @@ -48,16 +57,25 @@ 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 relate command: `juju relate grafana-k8s:grafana-source prometheus-k8s:grafana-source`
Grafana-dashboard relate command: `juju relate wordpress-k8s grafana-dashboard`
Grafana-Prometheus integrate command:
```
juju integrate grafana-k8s:grafana-source prometheus-k8s:grafana-source
```
Grafana-dashboard integrate command:
```
juju integrate 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 relate command: juju relate wordpress-k8s:database mysql-k8s:database
Example database integrate command:
```
juju integrate wordpress-k8s:database mysql-k8s:database
```
1 change: 1 addition & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ def _stop_server(self) -> None:
def _run_cli(
self,
cmd: List[str],
*,
user: Union[str, None] = None,
group: Union[str, None] = None,
working_dir: Union[str, None] = None,
Expand Down
8 changes: 5 additions & 3 deletions tests/unit/wordpress_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ def __init__(self, wordpress_database_mock: WordpressDatabaseMock) -> None:
"""
self._wordpress_database_mock = wordpress_database_mock

def connect(self, host: str, port: int, database: str, user: str, password: str, charset: str):
def connect(
self, *, host: str, port: int, database: str, user: str, password: str, charset: str
):
"""Mock method for :meth:`mysql.connector.connect`.

Raises:
Expand Down Expand Up @@ -362,7 +364,7 @@ def __init__(
self._fail_wp_update_database = False

def exec(
self, cmd, user=None, group=None, working_dir=None, combine_stderr=None, timeout=None
self, cmd, *, user=None, group=None, working_dir=None, combine_stderr=None, timeout=None
):
"""Mock method for :meth:`ops.charm.model.Container.exec`.

Expand All @@ -384,7 +386,7 @@ def pull(self, path: str) -> typing.IO[str]:
"""Mock method for :meth:`ops.charm.model.Container.pull`."""
return io.StringIO(self.fs[path])

def push(self, path: str, source: str, user=None, group=None, permissions=None) -> None:
def push(self, path: str, source: str, *, user=None, group=None, permissions=None) -> None:
"""Mock method for :meth:`ops.charm.model.Container.push`."""
self.fs[path] = source

Expand Down
Loading