From cd614bac8c950cf60e7e1c02543db9762e62c8b0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:51:21 +0200 Subject: [PATCH] [discourse-gatekeeper] Migrate charm docs (#242) This pull request was autogenerated by discourse-gatekeeper to migrate existing documentation from server to the git repository. --------- Co-authored-by: upload-charms-docs-bot --- docs/how-to/h-enable-monitoring.md | 121 ++++++++++++++++++ .../r-releases-group/r-releases-rev112.md | 52 ++++++++ docs/reference/r-releases-group/r-releases.md | 1 + docs/tutorial/t-enable-security.md | 50 +++++--- 4 files changed, 207 insertions(+), 17 deletions(-) create mode 100644 docs/how-to/h-enable-monitoring.md create mode 100644 docs/reference/r-releases-group/r-releases-rev112.md diff --git a/docs/how-to/h-enable-monitoring.md b/docs/how-to/h-enable-monitoring.md new file mode 100644 index 000000000..9fc162411 --- /dev/null +++ b/docs/how-to/h-enable-monitoring.md @@ -0,0 +1,121 @@ +# Enable monitoring + +> **:information_source: Hint**: Use [Juju 3](/t/5064). Otherwise replace `juju run ...` with `juju run-action --wait ...` and `juju integrate` with `juju relate` for Juju 2.9 + +Enabling monitoring requires that you: + +* [Have a Charmed MySQLRouter K8s deployed](https://charmhub.io/mysql-router/docs/t-deploy-charm?channel=dpe/edge) +* [Deploy cos-lite bundle in a Kubernetes environment](https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s) + +Switch to the COS K8s environment and offer COS interfaces to be cross-model related with Charmed MySQLRouter K8s model: + +```shell +# Switch to the Kubernetes controller, on the COS model +juju switch : + +juju offer grafana:grafana-dashboard +juju offer loki:logging +juju offer prometheus:receive-remote-write +``` + +Switch to the Charmed MySQLRouter K8s model, find offers and consume them: + +```shell +# We are on the Kubernetes controller, on the COS model. Switch the mysqlrouter model +juju switch : + +juju find-offers : # Do not miss the ':' here! +``` + +A similar output should appear, if `k8s` is the k8s controller name and `cos` is the model where cos-lite has been deployed: + +```shell +Store URL Access Interfaces +k8s admin/cos.grafana admin grafana_dashboard:grafana-dashboard +k8s admin/cos.loki admin loki_push_api:logging +k8s admin/cos.prometheus admin prometheus_remote_write:receive-remote-write +``` + +Consume the offers to be reachable in the current model: + +```shell +juju consume k8s:admin/cos.grafana +juju consume k8s:admin/cos.loki +juju consume k8s:admin/cos.prometheus +``` + +Now, deploy ‘[grafana-agent-k8s](https://charmhub.io/grafana-agent-k8s)’ and integrate (relate) it with Charmed MySQLRouter K8s, then later integrate (relate) `grafana-agent-k8s` with the consumed COS offers: + +```shell +juju deploy grafana-agent-k8s --trust + +juju integrate grafana-agent-k8s grafana +juju integrate grafana-agent-k8s loki +juju integrate grafana-agent-k8s prometheus + +juju integrate grafana-agent-k8s mysql-router-k8s:grafana-dashboard +juju integrate grafana-agent-k8s mysql-router-k8s:logging +juju integrate grafana-agent-k8s mysql-router-k8s:metrics-endpoint +``` + +After this is complete, Grafana will show the new dashboards `MySQLRouter Exporter` and allow access for Charmed MySQLRouter K8s logs on Loki. + +An example of `juju status` on Charmed MySQLRouter K8s model: + +```shell +ubuntu@localhost:~$ juju status +Model Controller Cloud/Region Version SLA Timestamp +database k8s microk8s/localhost 3.1.8 unsupported 13:27:08Z + +SAAS Status Store URL +grafana active k8s admin/cos.grafana +loki active k8s admin/cos.loki +prometheus active k8s admin/cos.prometheus + +App Version Status Scale Charm Channel Rev Address Exposed Message +grafana-agent-k8s 0.35.2 active 1 grafana-agent-k8s stable 64 10.152.183.141 no +mysql-k8s 8.0.35-0ubuntu0.22.04.1 active 1 mysql-k8s 8.0/stable 127 10.152.183.105 no +mysql-router-k8s 8.0.36-0ubuntu0.22.04.1 active 1 mysql-router-k8s 8.0/edge 102 10.152.183.92 no +mysql-test-app 0.0.2 active 1 mysql-test-app stable 36 10.152.183.35 no + +Unit Workload Agent Address Ports Message +grafana-agent-k8s/0* active idle 10.1.241.243 +mysql-k8s/0* active idle 10.1.241.239 Primary +mysql-router-k8s/0* active idle 10.1.241.240 +mysql-test-app/0* active idle 10.1.241.241 +``` + +An example of `juju status` on the COS K8s model: + +```shell +ubuntu@localhost:~$ juju status +Model Controller Cloud/Region Version SLA Timestamp +cos k8s microk8s/localhost 3.1.8 unsupported 13:28:02Z + +App Version Status Scale Charm Channel Rev Address Exposed Message +alertmanager 0.27.0 active 1 alertmanager-k8s stable 106 10.152.183.197 no +catalogue active 1 catalogue-k8s stable 33 10.152.183.38 no +grafana 9.5.3 active 1 grafana-k8s stable 106 10.152.183.238 no +loki 2.9.4 active 1 loki-k8s stable 124 10.152.183.84 no +prometheus 2.49.1 active 1 prometheus-k8s stable 171 10.152.183.182 no +traefik 2.10.5 active 1 traefik-k8s stable 174 10.0.0.44 no + +Unit Workload Agent Address Ports Message +alertmanager/0* active idle 10.1.241.222 +catalogue/0* active idle 10.1.241.225 +grafana/0* active idle 10.1.241.228 +loki/0* active idle 10.1.241.226 +prometheus/0* active idle 10.1.241.227 +traefik/0* active idle 10.1.241.221 + +Offer Application Charm Rev Connected Endpoint Interface Role +grafana grafana grafana-k8s 106 2/2 grafana-dashboard grafana_dashboard requirer +loki loki loki-k8s 124 2/2 logging loki_push_api provider +prometheus prometheus prometheus-k8s 171 2/2 receive-remote-write prometheus_remote_write provider +``` + +To connect Grafana WEB interface, follow the COS section “[Browse dashboards](https://charmhub.io/topics/canonical-observability-stack/tutorials/install-microk8s#heading--browse-dashboards)”: + +```shell +juju run grafana/leader get-admin-password --model : +``` \ No newline at end of file diff --git a/docs/reference/r-releases-group/r-releases-rev112.md b/docs/reference/r-releases-group/r-releases-rev112.md new file mode 100644 index 000000000..53a29395e --- /dev/null +++ b/docs/reference/r-releases-group/r-releases-rev112.md @@ -0,0 +1,52 @@ +>Reference > Release Notes > [All revisions](/t/12201) > Revision 112 +# Revision 112 (`8.0/candidate` only) + +TODO: DD, MM, YYYY + +Dear community, + +We'd like to announce that Canonical's newest Charmed MySQL Router K8s operator has been published in the '8.0/stable' [channel](https://charmhub.io/mysql-router-k8s/docs/r-releases?channel=8.0/stable) :tada: + +[note] +If you are jumping over several stable revisions, make sure to check [previous release notes](/t/12201) before upgrading to this revision. +[/note] + +## Features you can start using today + +* New workload version [MySQL Router 8.0.36](https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-36.html) [[PR#209](https://github.com/canonical/mysql-router-k8s-operator/pull/209)] +* [K8s NodePort](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) support [[PR#211](https://github.com/canonical/mysql-router-k8s-operator/pull/211)] +* [Observability with COS](/t/14101) [[PR#210](https://github.com/canonical/mysql-router-k8s-operator/pull/210)] +* Router version displayed in upgrade status [[PR#230](https://github.com/canonical/mysql-router-k8s-operator/pull/230)] +* All the functionality from [previous revisions](/t/12201) + +## Bugfixes + +* Updated charmed-mysql ROCK image to latest version [[PR#237](https://github.com/canonical/mysql-router-k8s-operator/pull/237)] +* Removed redundant upgrade check [[PR#234](https://github.com/canonical/mysql-router-k8s-operator/pull/234)] +* Ported over changes from VM operator related to external connectivity [[PR#225](https://github.com/canonical/mysql-router-k8s-operator/pull/225)] +* Updated `resume-upgrade` action `force` description [[PR#232](https://github.com/canonical/mysql-router-k8s-operator/pull/232)] +* Fixed issue if incompatible upgrade is forced [[PR#231](https://github.com/canonical/mysql-router-k8s-operator/pull/231)] + +Canonical Data issues are now public on both [Jira](https://warthogs.atlassian.net/jira/software/c/projects/DPE/issues/) and [GitHub](https://github.com/canonical/mysql-router-k8s-operator/issues) platforms. +[GitHub Releases](https://github.com/canonical/mysql-router-k8s-operator/releases) provide a detailed list of bugfixes, PRs, and commits for each revision. + +## Inside the charms + +* Charmed MySQL Router K8s ships MySQL Router `8.0.36-0ubuntu0.22.04.1` +* CLI mysql-shell version is `8.0.36+dfsg-0ubuntu0.22.04.1~ppa4` +* The Prometheus `mysql-router-exporter` is `5.0.1-0ubuntu0.22.04.1~ppa1` +* K8s charms based on our [ROCK OCI](https://github.com/canonical/charmed-mysql-rock) (Ubuntu LTS `22.04.4`), snap revision `103` +* Principal charms supports the latest LTS series 22.04 only + +## Technical notes + +* Upgrade (`juju refresh`) is possible from revision 69+ +* Use this operator together with modern operator [Charmed MySQL K8s](https://charmhub.io/mysql-k8s) +* Please check restrictions from [previous release notes](https://charmhub.io/mysql-router-k8s/docs/r-releases) + +## Contact us + +Charmed MySQL Router K8s is an open source project that warmly welcomes community contributions, suggestions, fixes, and constructive feedback. +* Raise software issues or feature requests on [**GitHub**](https://github.com/canonical/mysql-router-k8s-operator/issues) +* Report security issues through [**Launchpad**](https://wiki.ubuntu.com/DebuggingSecurity#How%20to%20File) +* Contact the Canonical Data Platform team through our [Matrix](https://matrix.to/#/#charmhub-data-platform:ubuntu.com) channel. \ No newline at end of file diff --git a/docs/reference/r-releases-group/r-releases.md b/docs/reference/r-releases-group/r-releases.md index 9b9244a9d..37571cd13 100644 --- a/docs/reference/r-releases-group/r-releases.md +++ b/docs/reference/r-releases-group/r-releases.md @@ -2,6 +2,7 @@ Canonical publishes here release notes for production ready revisions available in [CharmHub](https://charmhub.io) [channels](https://juju.is/docs/sdk/channel): +* [revision 112](/t/14074) in `8.0/candidate` (WIP) * [revision 96](/t/13523) in `8.0/stable` * [revision 82](/t/12796) in `8.0/stable` * [revision 69](/t/12202) in `8.0/stable` diff --git a/docs/tutorial/t-enable-security.md b/docs/tutorial/t-enable-security.md index 865f3262d..fa70f8267 100644 --- a/docs/tutorial/t-enable-security.md +++ b/docs/tutorial/t-enable-security.md @@ -1,4 +1,4 @@ ->This is part of the [Charmed MySQL Tutorial](/t/12176). Please refer to this page for more information and the overview of the content. +>This is part of the [Charmed MySQLRouter K8s Tutorial](/t/12176). Please refer to this page for more information and the overview of the content. # Enable encryption with TLS @@ -25,40 +25,56 @@ juju deploy self-signed-certificates --config ca-common-name="Tutorial CA" ``` Wait until `self-signed-certificates` is up and active with `juju status --watch 1s` to monitor the progress. - +```shell +Model Controller Cloud/Region Version SLA Timestamp +database k8s microk8s/localhost 3.1.8 unsupported 12:10:33Z + +App Version Status Scale Charm Channel Rev Address Exposed Message +mysql-k8s 8.0.35-0ubuntu0.22.04.1 active 1 mysql-k8s 8.0/stable 127 10.152.183.101 no +mysql-router-k8s 8.0.36-0ubuntu0.22.04.1 active 1 mysql-router-k8s 8.0/edge 102 10.152.183.92 no +mysql-test-app 0.0.2 active 1 mysql-test-app stable 36 10.152.183.224 no +self-signed-certificates active 1 self-signed-certificates stable 72 10.152.183.114 no + +Unit Workload Agent Address Ports Message +mysql-k8s/0* active idle 10.1.241.252 Primary +mysql-router-k8s/0* active idle 10.1.241.253 +mysql-test-app/0* active idle 10.1.241.254 +self-signed-certificates/0* active idle 10.1.241.255 +``` -To enable TLS on `mysql-router-k8s`, relate the two applications: +To enable TLS on Charmed MySQLRouter K8s, integrate the two applications: ```shell -juju relate mysql-router-k8s self-signed-certificates +juju integrate mysql-router self-signed-certificates ``` -### Check the TLS certificate in use -Use `openssl` to connect to the MySQL through MySQL Router and check the TLS certificate in use: + +### Check the TLS certificate in use: +Use `openssl` to connect to MySQLRouter K8s in the juju machine, and check the TLS certificate in use: ```shell -> openssl s_client -starttls mysql -connect 10.1.84.74:3306 | grep Issuer +ubuntu@localhost:~$ juju ssh mysql-router-k8s/0 "openssl s_client -showcerts -starttls mysql -connect 127.0.0.1:6446 < /dev/null | openssl x509 -text | grep Issuer" ... -depth=1 C = US, CN = Tutorial CA + Issuer: C = US, CN = Tutorial CA ... ``` -Congratulations! Your connection is now using TLS certificate generated by the external application `self-signed-certificates`. +Congratulations! MySQLRouter K8s is now using a TLS certificate generated by the external application `self-signed-certificates`. ## Disable TLS -To remove the external TLS and return to the locally generated one, remove the integration: +To remove the external TLS and return to the locally generated one, unrelate the applications: ```shell -juju remove-relation mysql-router-k8s self-signed-certificates +juju remove-relation mysql-router self-signed-certificates ``` -### Check the TLS certificate in use +### Check the TLS certificate in use: ```shell -> openssl s_client -starttls mysql -connect 10.1.84.74:3306 | grep Issuer +ubuntu@localhost:~$ juju ssh mysql-router-k8s/0 "openssl s_client -showcerts -starttls mysql -connect 127.0.0.1:6446 < /dev/null | openssl x509 -text | grep Issuer" ``` The output should be similar to: ```shell ... -Issuer: CN = MySQL_Server_8.0.31_Auto_Generated_CA_Certificate + Issuer: CN = MySQL_Router_Auto_Generated_CA_Certificate ... ``` -The MySQL Router K8s application reverted to the certificate that was created locally during the MySQL server installation. \ No newline at end of file + + +The Charmed MySQLRouter K8s application reverted to the placeholder certificate that was created locally during the MySQLRouter K8s installation. \ No newline at end of file