Merge ~mthaddon/charm-k8s-discourse/+git/charm-k8s-discourse:end-user into charm-k8s-discourse:master

Proposed by Tom Haddon
Status: Merged
Approved by: Tom Haddon
Approved revision: 2a8748eb54369e211afb4111f308a57224bca11d
Merged at revision: cc4553c41673554e0885620c0213d20989c99e69
Proposed branch: ~mthaddon/charm-k8s-discourse/+git/charm-k8s-discourse:end-user
Merge into: charm-k8s-discourse:master
Diff against target: 126 lines (+21/-78)
2 files modified
README.md (+15/-75)
metadata.yaml (+6/-3)
Reviewer Review Type Date Requested Status
Laurent Sesquès Approve
Canonical IS Reviewers Pending
Review via email: mp+395296@code.launchpad.net

Commit message

Update README and relevant metadata.yaml fields to be more end-user focused

Description of the change

Update README and relevant metadata.yaml fields to be more end-user focused

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Laurent Sesquès (sajoupa) :
review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision cc4553c41673554e0885620c0213d20989c99e69

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/README.md b/README.md
index 0167267..aaacc47 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,20 @@
1# Discourse Charm1# Discourse Operator
22
3## Overview3A juju charm deploying and managing Discourse on Kubernetes, configurable to
4use a PostgreSQL backend.
45
5This charm deploys the Discourse discussion forum. Discourse is the 100% open6## Overview
6source discussion platform built for the next decade of the Internet. Use it
7as a mailing list, discussion forum, long-form chat room, and more!
87
9This is a k8s workload charm and can only be deployed to to a Juju k8s8Supported features include SAML authentication, scaling to multiple pods and the
10cloud, attached to a controller using `juju add-k8s`.9storage of files and images in S3. This charm also offers seamless Discourse
10version upgrades, initiated by switching to an image with a newer version of
11Discourse than the one currently deployed.
1112
12## Usage13## Usage
1314
15For details on using Kubernetes with Juju [see here](https://juju.is/docs/kubernetes), and for
16details on using Juju with MicroK8s for easy local testing [see here](https://juju.is/docs/microk8s-cloud).
17
14To get started with a test environment, first deploy Redis in an IaaS model:18To get started with a test environment, first deploy Redis in an IaaS model:
1519
16 juju deploy cs:~redis-charmers/redis # Note the deployed IP as ${REDIS_IP}20 juju deploy cs:~redis-charmers/redis # Note the deployed IP as ${REDIS_IP}
@@ -28,72 +32,8 @@ as follows:
28 juju add-relation discourse postgresql:db-admin32 juju add-relation discourse postgresql:db-admin
29 juju expose discourse33 juju expose discourse
3034
31### Static content and uploads35Once the deployment is completed and the "discourse" workload state in `juju
3236status` has changed to "active" you can visit http://{$discourse_ip}:3000 in a
33Discourse supports post uploads. When using this charm you need to make 37browser and log in to your Discourse instance.
34use of the S3 storage option built in to discourse for file uploads.
35
36You do this by accessing the Files option in the discourse settings
37web admin panel. Enter your S3 options here and check the 'enable s3
38uploads' option. This will push any uploads made into the S3 system and
39will serve them from there as well, eliminating the need for any persistent
40local storage.
41
42### Developing
43
44Notes for deploying a test setup locally using MicroK8s:
45
46 sudo snap install juju --classic
47 sudo snap install juju-wait --classic
48 sudo snap install microk8s --classic
49 sudo snap alias microk8s.kubectl kubectl
50 sudo snap install charmcraft
51 git clone https://git.launchpad.net/charm-k8s-discourse
52 cd charm-k8s-discourse
53 make discourse.charm
54
55 microk8s.reset # Warning! Clean slate!
56 microk8s.enable dns dashboard registry storage
57 microk8s.status --wait-ready
58 microk8s.config | juju add-k8s myk8s --client
59
60 # Build your Discourse image
61 make build-image
62 docker push localhost:32000/discourse
63
64 juju bootstrap myk8s
65 juju add-model discourse-test
66 juju deploy ./discourse.charm --config discourse_image=localhost:32000/discourse:latest discourse
67 juju wait
68 juju status
69
70The charm will not function without a database, so you will need to
71deploy `cs:postgresql` somewhere. You will also need a Redis application
72to connect to, such as `cs:~redis-charmers/redis`.
73
74If PostgreSQL is deployed in the same model you plan to use for
75Discourse, simply use `juju relate discourse postgresql:db-admin`. (This
76deployment style is recommended for testing purposes only.)
77
78Cross-model relations are also supported. Create a suitable model on
79a different cloud, for example, LXD or OpenStack.
80
81 juju switch database
82 juju deploy cs:postgresql
83 juju deploy cs:~redis-charmers/redis # Use the IP address for the `redis_host` config option to discourse
84 juju offer postgresql:db-admin
85
86In most k8s deployments, traffic to external services from worker pods
87will be SNATed by some part of the infrastructure. You will need to
88know what the source addresses or address range is for the next step.
89
90 juju switch discourse-test
91 juju find-offers # note down offer URL; example used below:
92 juju relate discourse admin/database.postgresql --via 10.9.8.0/24
93
94(In the case of PostgreSQL, `--via` is needed so that the charm can
95configure `pga_hba.conf` to let the k8s pods connect to the database.)
96
97## Testing
9838
99Just run `make test`.39For further details, [see here](https://charmhub.io/discourse/docs).
diff --git a/metadata.yaml b/metadata.yaml
index 4c3e926..82e1aa8 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -1,6 +1,9 @@
1name: "discourse"1name: discourse
2summary: "Discourse for juju-k8s operator framework"2summary: Discourse is the 100% open source discussion platform built for the next decade of the Internet.
3description: "Discourse bundled for juju-k8s deployment"3description: |
4 Discourse is the 100% open source discussion platform built for the next decade of the Internet.
5 Use it as a mailing list, discussion forum, long-form chat room and more!
6 https://www.discourse.org
4docs: https://discourse.charmhub.io/t/discourse-documentation-overview/37737docs: https://discourse.charmhub.io/t/discourse-documentation-overview/3773
5maintainers:8maintainers:
6 - Jay Kuri <jay.kuri@canonical.com>9 - Jay Kuri <jay.kuri@canonical.com>

Subscribers

People subscribed via source and target branches