Barry Price has proposed merging ~barryprice/charm-k8s-bind/+git/charm-k8s-bind:master into charm-k8s-bind:master.
Commit message: Clean up docs, and explain how to work around the recursion default Requested reviews: Bind Charmers (bind-charmers) For more details, see: https://code.launchpad.net/~barryprice/charm-k8s-bind/+git/charm-k8s-bind/+merge/393440 -- Your team Bind Charmers is requested to review the proposed merge of ~barryprice/charm-k8s-bind/+git/charm-k8s-bind:master into charm-k8s-bind:master.
diff --git a/README.md b/README.md index ff1c869..c0b037d 100644 --- a/README.md +++ b/README.md @@ -20,34 +20,31 @@ See config option descriptions in config.yaml. ## Getting Started -Notes for deploying a test setup locally using microk8s: +Notes for deploying a test setup locally using microk8s, the setup of which is +documented here: https://juju.is/docs/microk8s-cloud - sudo snap install juju --classic - sudo snap install juju-wait --classic - sudo snap install microk8s --classic - sudo snap alias microk8s.kubectl kubectl +``` +juju add-model bind-test +``` - microk8s.reset # Warning! Clean slate! - microk8s.enable dns dashboard registry storage - microk8s.status --wait-ready - microk8s.config | juju add-k8s myk8s --client +1. Either deploy with the default image from Dockerhub: - juju bootstrap myk8s - juju add-model bind-test +``` +juju deploy cs:~bind-charmers/bind +``` +2. Or optionally build your own image locally and deploy with that - #1. Either deploy with the default image from Dockerhub: - juju deploy cs:~bind-charmers/bind +``` +sudo snap install charmcraft +git clone https://git.launchpad.net/charm-k8s-bind +cd charm-k8s-bind +make image-build +docker push localhost:32000/bind +juju deploy cs:~bind-charmers/bind --config bind_image_path=localhost:32000/bind:latest bind - #2. Or optionally build your own image locally and deploy with that - sudo snap install charmcraft - git clone https://git.launchpad.net/charm-k8s-bind - cd charm-k8s-bind - make image-build - docker push localhost:32000/bind - juju deploy cs:~bind-charmers/bind --config bind_image_path=localhost:32000/bind:latest bind - - juju wait - juju status +juju wait +juju status +``` Assuming you're using the image from dockerhub, or an image built locally from this repo without changes, the charm will deploy bind with its stock Ubuntu @@ -58,3 +55,36 @@ DNSSEC is also enabled by default. Custom config can be deployed by setting the `custom_config_repo` option to point to a Git repository containing a valid set of configuration files with which to populate the /etc/bind/ directory within the pod(s). + +Since bind won't allow recursion from external clients by default, to allow +easy testing, I've set up a repo with a copy of the stock config, modified to +allow recursion from all RFC1918 networks: + +https://code.launchpad.net/~barryprice/junk/+git/etc-bind-stock-config-with-all-rfc1918-nets-allowed + +To configure a local microk8s-deployed bind application to use this config, +simply run: + +``` +juju config bind custom_config_repo=https://git.launchpad.net/~barryprice/junk/+git/etc-bind-stock-config-with-all-rfc1918-nets-allowed +``` + +Once the application is ready, you should be able to query the App's IP address +(not the Unit addresses) directly from your local machine: + +``` +$ juju status + +Model Controller Cloud/Region Version SLA Timestamp +bind-test myk8s-localhost myk8s/localhost 2.8.6 unsupported 16:44:30+07:00 + +App Version Status Scale Charm Store Rev OS Address Notes +bind bind:edge active 1 bind jujucharms 2 kubernetes 10.152.183.246 + +Unit Workload Agent Address Ports Message +bind/0* active idle 10.1.25.35 53/TCP,53/UDP Pod configured + +$ dig +short example.com @10.152.183.246 +93.184.216.34 +$ +```
-- Mailing list: https://launchpad.net/~bind-charmers Post to : [email protected] Unsubscribe : https://launchpad.net/~bind-charmers More help : https://help.launchpad.net/ListHelp

