From f098103cef81885c88a893c1017b83e422829d9e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 10:01:07 +0200 Subject: [PATCH 1/2] Update charm libraries (#123) * chore: update charm libraries * Rerun CI --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Niels Robin-Aubertin --- lib/charms/data_platform_libs/v0/data_interfaces.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/charms/data_platform_libs/v0/data_interfaces.py b/lib/charms/data_platform_libs/v0/data_interfaces.py index 2624dd4d..9071655a 100644 --- a/lib/charms/data_platform_libs/v0/data_interfaces.py +++ b/lib/charms/data_platform_libs/v0/data_interfaces.py @@ -320,7 +320,7 @@ def _on_topic_requested(self, event: TopicRequestedEvent): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 19 +LIBPATCH = 20 PYDEPS = ["ops>=2.0.0"] @@ -1674,6 +1674,10 @@ def _assign_relation_alias(self, relation_id: int) -> None: if relation: relation.data[self.local_unit].update({"alias": available_aliases[0]}) + # We need to set relation alias also on the application level so, + # it will be accessible in show-unit juju command, executed for a consumer application unit + self.update_relation_data(relation_id, {"alias": available_aliases[0]}) + def _emit_aliased_event(self, event: RelationChangedEvent, event_name: str) -> None: """Emit an aliased event to a particular relation if it has an alias. From e278aff11b9e17342aaa515827e06f043d01acd5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 10:57:46 +0000 Subject: [PATCH 2/2] [upload-charm-docs] Migrate charm docs (#122) * modified: docs/how-to/contribute.md,docs/how-to/configure-container.md,docs/index.md,docs/reference/integrations.md,docs/how-to/configure-s3.md,docs/how-to/configure-smtp.md,docs/how-to/upgrade.md,docs/how-to/configure-saml.md,docs/explanation/charm-architecture.md,docs/tutorial/getting-started.md,docs/how-to/configure-hostname.md * Rerun CI --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Niels Robin-Aubertin Co-authored-by: arturo-seijas <102022572+arturo-seijas@users.noreply.github.com> --- docs/explanation/charm-architecture.md | 2 +- docs/how-to/configure-container.md | 2 +- docs/how-to/configure-hostname.md | 2 +- docs/how-to/configure-s3.md | 2 +- docs/how-to/configure-saml.md | 2 +- docs/how-to/configure-smtp.md | 2 +- docs/how-to/contribute.md | 2 +- docs/how-to/upgrade.md | 2 +- docs/index.md | 16 +++++++--------- docs/reference/integrations.md | 2 +- .../{tutorial/getting-started.md => tutorial.md} | 2 +- 11 files changed, 17 insertions(+), 19 deletions(-) rename docs/{tutorial/getting-started.md => tutorial.md} (99%) diff --git a/docs/explanation/charm-architecture.md b/docs/explanation/charm-architecture.md index c6f2425d..ad48a808 100644 --- a/docs/explanation/charm-architecture.md +++ b/docs/explanation/charm-architecture.md @@ -85,4 +85,4 @@ CharmBase is the base class from which all Charms are formed, defined by [Ops](h See more information in [Charm](https://juju.is/docs/sdk/constructs#heading--charm). -The `__init__` method guarantees that the charm observes all events relevant to its operation and handles them. +The `__init__` method guarantees that the charm observes all events relevant to its operation and handles them. \ No newline at end of file diff --git a/docs/how-to/configure-container.md b/docs/how-to/configure-container.md index 9dc2c817..897721b2 100644 --- a/docs/how-to/configure-container.md +++ b/docs/how-to/configure-container.md @@ -6,4 +6,4 @@ This charm exposes several configurations to tweak the behaviour of discourse. T * The developer mails can be set through [developer_emails](https://charmhub.io/discourse-k8s/configure#developer_emails) * Throttle level protections provided by discourse can be changed via [throttle_level](https://charmhub.io/discourse-k8s/configure#throttle_level) -For a comprehensive list of configuration options check the [configuration reference](https://charmhub.io/discourse-k8s/configure). +For a comprehensive list of configuration options check the [configuration reference](https://charmhub.io/discourse-k8s/configure). \ No newline at end of file diff --git a/docs/how-to/configure-hostname.md b/docs/how-to/configure-hostname.md index e5beefd7..6bba47a8 100644 --- a/docs/how-to/configure-hostname.md +++ b/docs/how-to/configure-hostname.md @@ -46,4 +46,4 @@ 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-s3.md b/docs/how-to/configure-s3.md index 2cfc61fc..2bb3613a 100644 --- a/docs/how-to/configure-s3.md +++ b/docs/how-to/configure-s3.md @@ -16,4 +16,4 @@ To enable S3 to perform backups, you'll need to specify also `s3_backup_bucket`. It is also possible to configure the S3 bucket to act as a content delivery network (CDN) serving the static content directly from the bucket, for that, set `s3_cdn_url`. If you wish to modify the CORS set up, you can do so by changing `s3_install_cors_rule`. -For more details on the configuration options and their default values see the [configuration reference](https://charmhub.io/discourse-k8s/configure). +For more details on the configuration options and their default values see the [configuration reference](https://charmhub.io/discourse-k8s/configure). \ No newline at end of file diff --git a/docs/how-to/configure-saml.md b/docs/how-to/configure-saml.md index 3edee3bd..93a5155f 100644 --- a/docs/how-to/configure-saml.md +++ b/docs/how-to/configure-saml.md @@ -5,4 +5,4 @@ To configure Discourse's SAML integration you'll have to set the following confi The SAML URL needs to be scpecified in `saml_target_url`. If you wish to force the login to go through SAML, enable `force_saml_login`. The groups to be synced from the provider can be defined in `saml_sync_groups` as a comma-separated list of values. -For more details on the configuration options and their default values see the [configuration reference](https://charmhub.io/discourse-k8s/configure). +For more details on the configuration options and their default values see the [configuration reference](https://charmhub.io/discourse-k8s/configure). \ No newline at end of file diff --git a/docs/how-to/configure-smtp.md b/docs/how-to/configure-smtp.md index 8201fec2..968a7f98 100644 --- a/docs/how-to/configure-smtp.md +++ b/docs/how-to/configure-smtp.md @@ -8,4 +8,4 @@ If authentication is needed, `smtp_authentication` will need to be set to the ap If needed, the verification of the SSL certs can be turned on and off with `smtp_openssl_verify_mode`. -For more details on the configuration options and their default values see the [configuration reference](https://charmhub.io/discourse-k8s/configure). +For more details on the configuration options and their default values see the [configuration reference](https://charmhub.io/discourse-k8s/configure). \ No newline at end of file diff --git a/docs/how-to/contribute.md b/docs/how-to/contribute.md index ecf30057..4bbe44bc 100644 --- a/docs/how-to/contribute.md +++ b/docs/how-to/contribute.md @@ -101,4 +101,4 @@ juju deploy ./discourse-k8s_ubuntu-20.04-amd64.charm \ ## Canonical Contributor Agreement -Canonical welcomes contributions to the Discourse Operator. Please check out our [contributor agreement](https://ubuntu.com/legal/contributors) if you're interested in contributing to the solution. +Canonical welcomes contributions to the Discourse Operator. Please check out our [contributor agreement](https://ubuntu.com/legal/contributors) if you're interested in contributing to the solution. \ No newline at end of file diff --git a/docs/how-to/upgrade.md b/docs/how-to/upgrade.md index a65ec8a0..db3793cc 100644 --- a/docs/how-to/upgrade.md +++ b/docs/how-to/upgrade.md @@ -42,4 +42,4 @@ Given that the image is now packed and released as a charm resource, the followi * `image_user` * `image_pass` -You can use a different image than the one deployed by default with the charm using the [attach-resource](https://juju.is/docs/olm/juju-attach-resource) juju command. +You can use a different image than the one deployed by default with the charm using the [attach-resource](https://juju.is/docs/olm/juju-attach-resource) juju command. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 3720f847..e9ea5231 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,3 @@ -# Charmed Discourse k8s documentation - This charm simplifies initial deployment and "day N" operations of Discourse on Kubernetes, such as scaling the number of instances, integration with SSO, access to S3 for redundant file storage and more. It allows for deployment on @@ -9,6 +7,13 @@ offerings. Discourse is an open-source software application used to create customer-friendly and community-friendly discussion platforms, forums, and mailing lists. It's designed to work as a discussion platform for various topics and is widely used by numerous organizations and individuals to build communities, provide customer support, and facilitate conversations. The platform is built with a focus on simplicity, user-friendliness, and responsiveness, making it accessible from both desktops and mobile devices. Discourse provides various moderation and administration tools, enabling community managers to maintain a healthy and constructive environment. +## In this documentation + +| | | +|--|--| +| [Tutorials](/t/discourse-k8s-docs-getting-started/12157)
Get started - a hands-on introduction to using the Charmed Discourse operator for new users
| [How-to guides](/t/discourse-k8s-docs-how-to-configure-the-container/12141)
Step-by-step guides covering key operations and common tasks | +| [Reference](/t/discourse-k8s-docs-integrations/12155)
Technical information - specifications, APIs, architecture | [Explanation](/t/discourse-k8s-docs-charm-architecture/12139)
Concepts - discussion and clarification of key topics | + ## Contributing to this documentation Documentation is an important part of this project, and we take the same open-source approach to the documentation as the code. As such, we welcome community contributions, suggestions and constructive feedback on our documentation. Our documentation is hosted on the [Charmhub forum](https://discourse.charmhub.io/t/discourse-documentation-overview/3773) to enable easy collaboration. Please use the "Help us improve this documentation" links on each documentation page to either directly change something you see that's wrong, ask a question, or make a suggestion about a potential change via the comments section. @@ -25,10 +30,3 @@ fixes and constructive feedback. - [Get support](https://discourse.charmhub.io/) - [Join our online chat](https://chat.charmhub.io/charmhub/channels/charm-dev) - [Contribute](https://charmhub.io/discourse-k8s/docs/how-to-contribute) - -## In this documentation - -| | | -|--|--| -| [Tutorials](https://charmhub.io/discourse-k8s/docs/getting-started)
Get started - a hands-on introduction to using the Charmed Discourse operator for new users
| [How-to guides](https://charmhub.io/discourse-k8s/docs/container-configuration)
Step-by-step guides covering key operations and common tasks | -| [Reference](https://charmhub.io/discourse-k8s/actions)
Technical information - specifications, APIs, architecture | [Explanation](https://charmhub.io/discourse-k8s/docs/explanation-charm-architecture)
Concepts - discussion and clarification of key topics | diff --git a/docs/reference/integrations.md b/docs/reference/integrations.md index a1140ed9..af3aaa87 100644 --- a/docs/reference/integrations.md +++ b/docs/reference/integrations.md @@ -63,4 +63,4 @@ _Supported charms_: [redis-k8s](https://charmhub.io/redis-k8s) Discourse uses Redis to run background tasks (with Sidekiq) and keep the application fast and responsive. It enables real-time updates on the pages and helps in managing data efficiently. Redis also helps Discourse in balancing loads by managing rate limits, making it a crucial part of its system. -Redis integrate commands: `juju integrate discourse-k8s redis-k8s` +Redis integrate commands: `juju integrate discourse-k8s redis-k8s` \ No newline at end of file diff --git a/docs/tutorial/getting-started.md b/docs/tutorial.md similarity index 99% rename from docs/tutorial/getting-started.md rename to docs/tutorial.md index 02cb9a59..e380804d 100644 --- a/docs/tutorial/getting-started.md +++ b/docs/tutorial.md @@ -86,4 +86,4 @@ Discourse will be deployed with `discourse-k8s` as default hostname. In order to After that, visit `http://discourse-k8s` to reach Discourse. -This charm allows you to add a admin user by executing the corresponding action. Instead of interacting with the Discourse UI just run `juju run-action discourse-k8s/0 add-admin-user email=email@example.com password=somepwd --wait` and it will be registered and validated. +This charm allows you to add a admin user by executing the corresponding action. Instead of interacting with the Discourse UI just run `juju run-action discourse-k8s/0 add-admin-user email=email@example.com password=somepwd --wait` and it will be registered and validated. \ No newline at end of file