Merge ~barryprice/charm-k8s-bind/+git/charm-k8s-bind:master into charm-k8s-bind:master

Proposed by Barry Price
Status: Merged
Approved by: Barry Price
Approved revision: 92a771596733d836533fa5ad3cb3b4f509ab41a2
Merged at revision: ff88d40c76969b3a88509197ef53b890c3dabb46
Proposed branch: ~barryprice/charm-k8s-bind/+git/charm-k8s-bind:master
Merge into: charm-k8s-bind:master
Diff against target: 96 lines (+53/-23)
1 file modified
README.md (+53/-23)
Reviewer Review Type Date Requested Status
Benjamin Allot Approve
Canonical IS Reviewers Pending
Review via email: mp+393440@code.launchpad.net

Commit message

Clean up docs, and explain how to work around the recursion default

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
Benjamin Allot (ballot) wrote :

LGTM.

User gotta read the doc !

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

Change successfully merged at revision ff88d40c76969b3a88509197ef53b890c3dabb46

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index ff1c869..c0b037d 100644
3--- a/README.md
4+++ b/README.md
5@@ -20,34 +20,31 @@ See config option descriptions in config.yaml.
6
7 ## Getting Started
8
9-Notes for deploying a test setup locally using microk8s:
10+Notes for deploying a test setup locally using microk8s, the setup of which is
11+documented here: https://juju.is/docs/microk8s-cloud
12
13- sudo snap install juju --classic
14- sudo snap install juju-wait --classic
15- sudo snap install microk8s --classic
16- sudo snap alias microk8s.kubectl kubectl
17+```
18+juju add-model bind-test
19+```
20
21- microk8s.reset # Warning! Clean slate!
22- microk8s.enable dns dashboard registry storage
23- microk8s.status --wait-ready
24- microk8s.config | juju add-k8s myk8s --client
25+1. Either deploy with the default image from Dockerhub:
26
27- juju bootstrap myk8s
28- juju add-model bind-test
29+```
30+juju deploy cs:~bind-charmers/bind
31+```
32+2. Or optionally build your own image locally and deploy with that
33
34- #1. Either deploy with the default image from Dockerhub:
35- juju deploy cs:~bind-charmers/bind
36+```
37+sudo snap install charmcraft
38+git clone https://git.launchpad.net/charm-k8s-bind
39+cd charm-k8s-bind
40+make image-build
41+docker push localhost:32000/bind
42+juju deploy cs:~bind-charmers/bind --config bind_image_path=localhost:32000/bind:latest bind
43
44- #2. Or optionally build your own image locally and deploy with that
45- sudo snap install charmcraft
46- git clone https://git.launchpad.net/charm-k8s-bind
47- cd charm-k8s-bind
48- make image-build
49- docker push localhost:32000/bind
50- juju deploy cs:~bind-charmers/bind --config bind_image_path=localhost:32000/bind:latest bind
51-
52- juju wait
53- juju status
54+juju wait
55+juju status
56+```
57
58 Assuming you're using the image from dockerhub, or an image built locally from
59 this repo without changes, the charm will deploy bind with its stock Ubuntu
60@@ -58,3 +55,36 @@ DNSSEC is also enabled by default.
61 Custom config can be deployed by setting the `custom_config_repo` option to
62 point to a Git repository containing a valid set of configuration files with
63 which to populate the /etc/bind/ directory within the pod(s).
64+
65+Since bind won't allow recursion from external clients by default, to allow
66+easy testing, I've set up a repo with a copy of the stock config, modified to
67+allow recursion from all RFC1918 networks:
68+
69+https://code.launchpad.net/~barryprice/junk/+git/etc-bind-stock-config-with-all-rfc1918-nets-allowed
70+
71+To configure a local microk8s-deployed bind application to use this config,
72+simply run:
73+
74+```
75+juju config bind custom_config_repo=https://git.launchpad.net/~barryprice/junk/+git/etc-bind-stock-config-with-all-rfc1918-nets-allowed
76+```
77+
78+Once the application is ready, you should be able to query the App's IP address
79+(not the Unit addresses) directly from your local machine:
80+
81+```
82+$ juju status
83+
84+Model Controller Cloud/Region Version SLA Timestamp
85+bind-test myk8s-localhost myk8s/localhost 2.8.6 unsupported 16:44:30+07:00
86+
87+App Version Status Scale Charm Store Rev OS Address Notes
88+bind bind:edge active 1 bind jujucharms 2 kubernetes 10.152.183.246
89+
90+Unit Workload Agent Address Ports Message
91+bind/0* active idle 10.1.25.35 53/TCP,53/UDP Pod configured
92+
93+$ dig +short example.com @10.152.183.246
94+93.184.216.34
95+$
96+```

Subscribers

People subscribed via source and target branches

to all changes: