Stuff I'm Up To

Technical Ramblings

Docker IP Address Error — October 2, 2020

Docker IP Address Error

ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

We have a staging environment that runs a lot of container sets for customer testing and recently I went to add a new container set ad got the above error.

On my own system I saw this kind of issue when I ran out of IP pool space because it overlapped with the VPN I was using. I solved it by creating another docker network and using an override to add it to my container set. I didn’t want to do the same here, but testing it out by adding the network revealed I was out of IP pool space.

Continue reading
Installing Ansible AWX — September 14, 2020

Installing Ansible AWX

Starting to look at a nice front end for Ansible and found a few quirks with the process that need to be taken care of.

The actual installation of AWX needs Ansible installing on the system you’re installing from. As I’m installing from localhost to localhost this means I need Ansible installed locally. Sounds obvious, but it’s not in the prerequisites. You need to install, docker, docker-compose, the docker-compose python module AND ansible.

Continue reading
FreeRADIUS and Docker — July 7, 2020

FreeRADIUS and Docker

Today I built a FreeRADIUS server within a Docker container set using docker-compose. As we only have a small number of users on the WiFi system it was setup only as a simple SSID with WPA-PSK that gradually gets spread to every man and his dog.

Fortunately it only acts as a Guest network and provides internet access – but the next step is to have a proper corporate SSID with secure LAN access. For this we want 802.1X and a RADIUS server to provide integration between wireless and LDAP.

Continue reading
Jitsi + Asterisk = Jigasi — April 15, 2020
Asterisk and PostgreSQL — April 12, 2020

Asterisk and PostgreSQL

I started out wanting a real-time database connection to our existing LDAP server. This went well, but involved importing a schema into the LDAP cn=config and mapping the data into Asterisk.

It then became apparent that the effort involved in linking Asterisk to LDAP didn’t really produce the key result that I was after. My whole reason for linking Asterisk to LDAP was to share authentication credentials from our users for their SIP devices. After I’d deployed it I discovered that Asterisk would store it’s credentials in different fields and what’s worse is that the password could only be plain-text or an MD5 hash.

If our users must use a separate credential for logging into a SIP device, then using LDAP is no longer of interest to me. We may as well use a database – enter PostgreSQL.

Continue reading
Asterisk PBX v17 Docker — March 14, 2020

Asterisk PBX v17 Docker

In light of the possibility of many people needing to work from home the boss wanted to upgrade the phone system to bring in some fixes and new features for home working.

I’ve no experience of Asterisk and I’m not really a phone person, but he asked me to get a replacement system using the latest v17 release. I noticed there are v16 images available, but he was insistent upon v17. That meant building from source.

It’s a week of firsts as up until now I haven’t built a multi-stage Docker image either.

Continue reading
Docker and OpenVPN — February 23, 2020

Docker and OpenVPN

I’m using a vpn based on OpenVPN and when I try to fire up a docker-compose set of containers it fails with:

ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

A quick session of Duck-jitsu and I found: https://github.com/docker/for-linux/issues/418#issuecomment-491323611

A few simple steps sorted it out for me. Create docker network and use an override to tell compose to use it.

$ docker network create localdev --subnet 10.0.1.0/24

docker-compose.override.yml

version: '3'
networks:
  default:
    external:
      name: localdev

This does mean I’ll have to add it into all my local projects that get pushed upstream, but I can add it to .gitignore to prevent it being included.

LAMP Container Set — February 22, 2020
Docker on Ubuntu eoan —

Docker on Ubuntu eoan

The installation on eoan fails with a missing dependency for containerd.io not having an install candidate.

Fix

Edit your /etc/apt/sources.list file and change the eoan version to disco. Or remove the line and re-add it using:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   disco \
   stable"

It may still fail to install with an error docker.service Failed with result 'start-limit-hit'. A reboot soon sorted it out followed by a call to apt install.

$ apt install -f

Docker OpenLDAP — February 15, 2020

Docker OpenLDAP

The LDAP instance in our environment is pretty ancient and has served well for many, many years. But there’s one key feature we’d like to see added to our schema – memberOf.

The current group membership is based on memberUID and is a bit clunky by modern standards. Time to upgrade.

This time we’re going to run it in a container. Making it more mobile and resilient. The image we chose osixia/openldap has a lot of pulls and looks a good candidate to use.

Continue reading
Lsyncd and Docker — January 29, 2020
Filesystem Synchronisation — January 28, 2020