Skip to content

Commit

Permalink
Merge branch 'main' into ref-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nrobinaubertin authored Oct 18, 2023
2 parents 4341682 + e278aff commit 278b67b
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/explanation/charm-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/how-to/configure-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/how-to/configure-hostname.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ Test the ingress by sending a GET request to the service with `Host` headers.

```
curl -H "Host: <desired-hostname>" http://<ingress-svc-ip>
```
```
2 changes: 1 addition & 1 deletion docs/how-to/configure-s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/how-to/configure-saml.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/how-to/configure-smtp.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
2 changes: 1 addition & 1 deletion docs/how-to/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion docs/how-to/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
16 changes: 7 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)</br> Get started - a hands-on introduction to using the Charmed Discourse operator for new users </br> | [How-to guides](/t/discourse-k8s-docs-how-to-configure-the-container/12141) </br> Step-by-step guides covering key operations and common tasks |
| [Reference](/t/discourse-k8s-docs-integrations/12155) </br> Technical information - specifications, APIs, architecture | [Explanation](/t/discourse-k8s-docs-charm-architecture/12139) </br> 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.
Expand All @@ -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)</br> Get started - a hands-on introduction to using the Charmed Discourse operator for new users </br> | [How-to guides](https://charmhub.io/discourse-k8s/docs/container-configuration) </br> Step-by-step guides covering key operations and common tasks |
| [Reference](https://charmhub.io/discourse-k8s/actions) </br> Technical information - specifications, APIs, architecture | [Explanation](https://charmhub.io/discourse-k8s/docs/explanation-charm-architecture) </br> Concepts - discussion and clarification of key topics |
2 changes: 1 addition & 1 deletion docs/reference/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion docs/tutorial/getting-started.md → docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 protected] 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 protected] password=somepwd --wait` and it will be registered and validated.
6 changes: 5 additions & 1 deletion lib/charms/data_platform_libs/v0/data_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 278b67b

Please sign in to comment.