TL;DR - I can’t get AnsibleContainer to build a FutureGateway stack. Maybe documenting my descent into insanity will help me get out of it.
Every now and again, has the feeling of just being stuck. There seems to be no trodden path leading to the point in which one finds oneself, no direction in or out - one has the distinct impression of waking up from something like a dream and realising that one has no idea how one arrived.
“Was I drunk ? “, “Was there some kind of party ? “, “Who won ? “… although futile, one chases the tumbleweed of thoughts in the hope of finding out where to make the next step.
Well, at that point, any step is the right step ! So, here goes1…
Get me out of here
I’ve been working on this damn problem for over a year now, and it seems utterly ridiculous that I can’t bring it to a conclusion. “What problem ?”, I hear you ask (or is that the hallucinations talking ?).
- Started this blog post
- Deleted all dist packages of ansible-container
- Deleted all docker images and containers
- Re-installed ansible-container with pip (now gives 0.9.1)
ansible-container build- got the errors below (root not in passwd file)
- Fixed that by pulling down the image first.
Next ? re-run the build part and identify the next error.
- Ensure that we are using a debian-based conductor
- Run the build again (encounter “unreachable/authentication” problem below)
- Found out where to include the
MySQL-pythonpackage to allow the
/usr/local/lib/python2.7/dist-packages/container/docker/templates/conductor-dockerfile.j2, so that’s good !
Change user in the db role
- Check out
ansible-containerfrom git again.
- When I change the base image of the
mysqlto the same as the conductor image, this problem disappears
- ok, playbook seems to work ok, but only using CEntOS as base image
Oh yeah that makes perfect sense… Except no it frikkin doesn’t ! What’s the point of having to have a homogenous cluster of base images ? I’m getting too old for this
Try to make the mysql server on CEntOSTerrible idea - way too much work already done by others.
centos/mysql-56-centos7- let’s try that
- Use it on the command line with
docker run -d -e MYSQL_ROOT_PASSWORD=password -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=fgapiserver centos/mysql-57-centos7- that seems to create the db.
- Nope, that doesn’t seem to get the db started : “msg”: “unable to find /var/lib/mysql/.my.cnf. Exception message: (2002, "Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)")”
- Aaaand, nowhere is the frikkin Dockerfile documented for this image
current mood : "raining icepicks..."— bruce becker (@brusisceddu) May 29, 2017
- Ok, wait docker inspect has my back2 - but adding the entrypoint doesn’t actually give me a working db to access.
- At this point… I’m pretty much losing hope that AnsibleContainer can do this. Let’s go read the example again.
- Ok, wordpress example (which is pre-0.9.1 however) says basically “start
mysqld_safein the background and tune
dbaccording to normal Ansible procedure.”
current mood 'tightrope walking in two ton shoes...'— bruce becker (@brusisceddu) May 29, 2017
Maybe it’s time to go back to the “Ansible playbook against docker endpoint” strategy. Sigh, it feels like a defeat at this point…
What am I even building ?
Look, call me unreasonable, but it seems reasonable to me to be able to define a topology and configuration a-la 12 factor, and then have AnsibleContainer whip me up the images. The idea of “take this base application image (mysql, apache, java) and apply the following configuration to them respectively” just doesn’t seem to be really that practical. I’ve spent the last 3 days hacking away at this, and I’m no closer than when I started.
So I’m going to switch tack and try the old-school way.
- I kept getting the error on building the db container :
- Now, I get an error with authentication issues ?
Summary of issues encountered
|root user not in image||
||base image was missing and didn’t get pulled down|
|Authentication or permission error||