example #5

Supports: None
Add to new model


This charm bundle provides an example configuration and usage of my charms. It is not intended to install a specific set of applications but will be kept up to date with my stable charm releases. I do not intened for this to be a focused install of any specific application nor to exercise the options of all charms. This is simply one working configuration which serves as an example for those learning Juju as well as simple testing and a quick way to kick the tires on any charm I'm writting.

Currently included applications * HAProxy * Sabnzbd * Couchpotato * Sonarr * Salt-master * Salt-minion


To deploy:

juju deploy bundle.yaml

To deploy directly from the charm store:

juju deploy cs:~chris.sanders/bundle/example

Monitoring the deploy

While the deploy is running you can watch what juju is doing in another terminal window. If you run the following two commands in their own terminals you can see what juju is doing.

watch -c juju status --color
juju debug-log

What will be deployed

  • Five machines
  • Six applications (listed above)
  • Five units, each with a subordinate

Relations will be established between several of the applications to allow them to register with each other, use reverse proxy, and add salt-minions to each unit.

Accessing Units

After the deploy you can access units directly or via HAProxy. You can find the IP address of each unit listed in juju status as well as the ports it is exposing.


HAProxy has stats available at http://:9000/ha-stats with a username/password of 'admin'. See the HAProxy charm for configuring.

Sabnzbd, Couchpotato, and Sonarr can be accessed via reverse proxy as well. Each is located at http:///[sabnzbd|couchpotato|sonarr]. The sonarr charm is not setting up urlbase to access via the haproxy relation yet and will have to be set manually before it can be accessed this way. After setting the urlbase restart sonnar and it will be available via haproxy.

Using Saltstack

After the deploy you can juju ssh to the salt-master unit and configure your pillar and salt formulas in /srv

juju ssh salt-master/0
cd /srv

Note the standard ubuntu user will be configured with RSA keys for pushing and pulling your repository. Salt requires you run commands as root, when executing be sure to use sudo. Ex:

/srv/salt$ sudo salt '*' state.apply

It is a good idea to save your salt states and push them into a repository. The salt-master charm accepts configurations that will restore your repository from a git repository when doing a new install. For more information see the charm salt-master.

LXD does not allow network mounts by default, you will have to configure your LXD profile if you want to do this. There are security implications you should be sure you want to allow your containers this level of access to your host. If you want to enable mounts on your default profile before you deploy run the following.

lxc profile set default raw.apparmor "mount fstype=nfs,cifs"
lxc profile set default security.privileged true

Scale out Usage

None of these charms are intended for individual scale out today.


If scaling or reinstall frequently it is useful to setup an apt-proxy to expedite your installs. If you are running on LXD you can run the proxy on your host machine and configure juju to use it for all models on a controller.

# Install a local proxy
apt install squid-deb-proxy

Then after creating your juju controller (with the bootstrap command) but before creating a model (with add-model) run this. Using your bridge address from lxdbr0. The default port is 8000, and will only need to be changed if you change your squid proxy configuration.

juju model-defaults apt-http-proxy=[lxdbr0-IP]:8000

Known Limitations and Issues

This bundle is not intended for long term use

  • salt-master registers it's IP with minion's. If the IP changes the minions will no longer be able to reach the master. The charm allows you to set a MAC or advertise fqdn instead for long term use.

Contact Information

Bundle configuration

Embed this bundle

Add this card to your website by copying the code below. Learn more.