Assumptions: the charm name is fluentd
Register an account on launchpad, if you don't already have one. You'll need the name later in the process.
- Create a launchpad branch of the deployable charm
[~/charms/layers/fluentd] $ charm build| params = { | |
| 'kubeconfig': kubeconfig, | |
| 'server': server, | |
| 'certificate-authority': ca, | |
| 'enbed-tls': 'false', | |
| } | |
| cmd = ['kubectl', 'config', 'set-cluster'] + ['{}={}'.format(k, v) for k, v in params.items()] | 
| series: xenial | |
| services: | |
| "kubernetes-master": | |
| charm: "cs:~lazypower/kubernetes-master-3" | |
| num_units: 1 | |
| annotations: | |
| "gui-x": "288" | |
| "gui-y": "432" | |
| etcd: | |
| charm: "cs:~lazypower/etcd-23" | 
| series: trusty | |
| services: | |
| "oai-hss": | |
| charm: "cs:~marcoceppi/trusty/oai-hss-0" | |
| num_units: 1 | |
| annotations: | |
| "gui-x": "1457.9127197265625" | |
| "gui-y": "416.4136657714844" | |
| to: | |
| - "kvm:1" | 
| #!/usr/bin/env python3 | |
| import sys | |
| sys.path.append('lib') | |
| from charms.reactive import main | |
| from charms.reactive import set_state | |
| from charmhelpers.core.hookenv import action_fail | |
| """ | |
| `set_state` only works here because it's flushed to disk inside the `main()` | 
| requires: | |
| - 'interface:juju-info' | 
| machines=$(juju status --format json | python -c "import sys; import json; f = json.loads(sys.stdin.read()); print('\n'.join(f.get('machines', {}).keys()))") | |
| for MACHINE_ID in $machines; do | |
| echo "Machine $MACHINE_ID" | |
| juju run --machine=$MACHINE_ID 'sudo initctl list | grep juju | xargs sudo status' | |
| done | 
| Format: http://dep.debian.net/deps/dep5/ | |
| Files: *.yaml | |
| Copyright: Copyright 2016, Canonical Ltd., All Rights Reserved. | |
| License: Beer | |
| Files: lib/charms/layer/options.py Makefile | |
| Copyright: Copyright 2016, Canonical Ltd., All Rights Reserved. | |
| License: LGPL | 
| @when('leadership.is_leader') | |
| def add_leader_config(): | |
| render_master_config() | |
| @when_not('leadership.is_leader') | |
| def add_slave_config(): | |
| render_slave_config() | |
| @when('leadership.is_leader') | 
The Juju core team have been diligently ramping up to Juju 2.0. As a result they have been steadily releasing new alphas and betas of juju for testing and feedback. However, for some that's not quite fast enough! If you're looking to try out, or contribute to juju, odds are you're going to want to compile from source. This article aims to cover how to do this and manage all the versions of juju you have floating around your system - compiled versions of juju, stable version of juju, and the released development versions.
Install golang on your favorite (Ubuntu)* operating system
sudo apt-get install golang-go git-core mercurial bzr