Merge ~jk0ne/charm-k8s-discourse/+git/charm-k8s-discourse:master into charm-k8s-discourse:master

Proposed by Jay Kuri
Status: Merged
Approved by: Tom Haddon
Approved revision: b07e944954a621333f38f9bfd792a2ed9cf7da8d
Merged at revision: a5ef3d4ed786b2eb953e2fd7c26b3cfc4ce1fc32
Proposed branch: ~jk0ne/charm-k8s-discourse/+git/charm-k8s-discourse:master
Merge into: charm-k8s-discourse:master
Diff against target: 102 lines (+82/-9)
1 file modified
README.md (+82/-9)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Discourse Charm Maintainers Pending
Review via email: mp+392731@code.launchpad.net

Commit message

Update Readme.md with useful content.

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
Tom Haddon (mthaddon) wrote :

Lgtm, thx

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

Change successfully merged at revision a5ef3d4ed786b2eb953e2fd7c26b3cfc4ce1fc32

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 7463e80..fcaa8ea 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,88 @@
1# Discourse k8s charm1# Discourse Charm
2
3A juju operator charm for a Kubernetes deployment of Discourse.
42
5## Overview3## Overview
64
7This is a k8s charm and can only be deployed to a k8s cloud via5This charm deploys the Discourse discussion forum. Discourse is the 100% open
8juju that has been attached to a k8s cloud.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!
8
9This is a k8s workload charm and can only be deployed to to a Juju k8s
10cloud, attached to a controller using `juju add-k8s`.
11
12## Usage
13
14See config option descriptions in config.yaml.
15
16After deploying this charm, you will need to create a relation to a PostgreSQL
17database to provide backend storage for Discourse. You will also need to
18deploy Redis and set your configuration to point to it.
19
20### Static content and uploads
21
22Discourse supports post uploads. When using this charm you need to make
23use of the S3 storage option built in to discourse for file uploads.
24
25You do this by accessing the Files option in the discourse settings
26web admin panel. Enter your S3 options here and check the 'enable s3
27uploads' option. This will push any uploads made into the S3 system and
28will serve them from there as well, eliminating the need for any persistent
29local storage.
30
31### Developing
32
33Notes for deploying a test setup locally using microk8s:
34
35 sudo snap install juju --classic
36 sudo snap install juju-wait --classic
37 sudo snap install microk8s --classic
38 sudo snap alias microk8s.kubectl kubectl
39 sudo snap install charmcraft
40 git clone https://git.launchpad.net/charm-k8s-discourse
41 cd charm-k8s-discourse
42 make discourse.charm
43
44 microk8s.reset # Warning! Clean slate!
45 microk8s.enable dns dashboard registry storage
46 microk8s.status --wait-ready
47 microk8s.config | juju add-k8s myk8s --client
48
49 # Build your Discourse image
50 make build-image
51 docker push localhost:32000/discourse
52
53 juju bootstrap myk8s
54 juju add-model discourse-test
55 juju deploy ./discourse.charm --config discourse_image=localhost:32000/discourse:latest discourse
56 juju wait
57 juju status
58
59The charm will not function without a database, so you will need to
60deploy `cs:postgresql` somewhere. You will also need a redis application
61to connect to, such as `cs:~redis-charmers/redis`.
62
63If postgresql is deployed in the same model you plan to use for
64discourse, simply use `juju relate discourse postgresql:db`. (This
65deployment style is recommended for testing purposes only.)
66
67Cross-model relations are also supported. Create a suitable model on
68a different cloud, for example, LXD or OpenStack.
69
70 juju switch database
71 juju deploy cs:postgresql
72 juju deploy cs:~redis-charmers/redis # Use the IP address for the `redis_host` config option to discourse
73 juju offer postgresql:db
74
75In most k8s deployments, traffic to external services from worker pods
76will be SNATed by some part of the infrastructure. You will need to
77know what the source addresses or address range is for the next step.
78
79 juju switch discourse-test
80 juju find-offers # note down offer URL; example used below:
81 juju relate discourse admin/database.postgresql --via 10.9.8.0/24
982
10To deploy this charm, run:83(In the case of postgresql, `--via` is needed so that the charm can
84configure `pga_hba.conf` to let the k8s pods connect to the database.)
1185
12 charmcraft build86## Testing
13 juju deploy discourse.charm
1487
15... More to come...88Just run `make test`.

Subscribers

People subscribed via source and target branches