These are chat archives for nlf/dlite

31st
Oct 2016
Arne Jørgensen
@arnested
Oct 31 2016 13:16
Finally got around to summing up my DNS thoughts in an issue: nlf/dlite#210
Joel Baranick
@kadaan
Oct 31 2016 15:05
@nlf Seems like on my Sierra install, after installing dlite, the /var/run/docker.sock doesn't get created. It didn't get created until I manually ran sudo dlite daemon.
Joel Baranick
@kadaan
Oct 31 2016 15:35
Also, host->container communication doesn't work unless I run sudo route -n add 172.18.0.0/16 local.docker
Nathan LaFreniere
@nlf
Oct 31 2016 15:36
currently container routing only works for the default bridge interface, if you're using, for example, docker-compose it creates a new bridge network with a different subnet
i have some code i'm testing to handle that
you shouldn't have to be running the daemon manually though, is /Library/LaunchDaemons/local.dlite.plist being created?
Joel Baranick
@kadaan
Oct 31 2016 15:36
The above fixed it for me for now.
Mads Høgstedt Danquah
@danquah
Oct 31 2016 15:36
(using docker-compose with a v2 configuration-file that is)
Joel Baranick
@kadaan
Oct 31 2016 15:37
Yes, /Library/LaunchDaemons/local.dlite.plist is created.
And it was running, but no docker.sock was created.
Nathan LaFreniere
@nlf
Oct 31 2016 15:37
did you run dlite start?
the daemon running doesn't actually start the vm
Joel Baranick
@kadaan
Oct 31 2016 15:37
At least, not until I manually ran sudo dlite daemon.
Nathan LaFreniere
@nlf
Oct 31 2016 15:37
although now that i think about it, the socket should be there earlier anyway..
i'll take a look. i'm working on adding a bunch more logging, so there will be a new beta soon that will help debug issues like this
Joel Baranick
@kadaan
Oct 31 2016 15:38
Yes, I downloaded Beta8 and put in in /usr/local/bin, ran chmod +x /usr/local/bin/dlite, ran dlite init, and then dlite start.
At that point, there was no docker.sock. The /etc/exports file looks good.
Nathan LaFreniere
@nlf
Oct 31 2016 15:39
did the output of dlite start show that the vm was started?
Joel Baranick
@kadaan
Oct 31 2016 15:39
Yes
And dlite status reported that all was good too.
Nathan LaFreniere
@nlf
Oct 31 2016 15:39
and i'm assuming no docker commands worked, since the socket file didn't exist
Joel Baranick
@kadaan
Oct 31 2016 15:39
Correct.
Nathan LaFreniere
@nlf
Oct 31 2016 15:40
ok, that's good information
Joel Baranick
@kadaan
Oct 31 2016 15:40
Not unless I did eval DOCKER_HOST=${dlite ip}:2053, or something like that.
Or until I discovered that the docker.sock was missing.
BTW, the lack of docs makes this really hard. I understand that the previous docs were for a previous version, but some of the info is still applicable.
So, now I have network communication, but DNS is not working.
Nathan LaFreniere
@nlf
Oct 31 2016 15:41
i know, documentation is being written
dns won't work because the routing didn't work
Joel Baranick
@kadaan
Oct 31 2016 15:42
Totally not the most fun job...
But routing is working now.
Nathan LaFreniere
@nlf
Oct 31 2016 15:42
your containers aren't on the default bridge network
which is all the dns resolver was aware of
Joel Baranick
@kadaan
Oct 31 2016 15:42
Ahhhh.
Nathan LaFreniere
@nlf
Oct 31 2016 15:42
as i said, i'm working on testing some fixes for that
Joel Baranick
@kadaan
Oct 31 2016 15:42
k
So maybe I need a interim change to my docker-compose file.
Nathan LaFreniere
@nlf
Oct 31 2016 15:43
that would probably simplify things for you, yeah. there's an open issue describing some workarounds
nlf/dlite#208
i have code written to support docker-compose v2 configurations, i'm just still doing some local testing before i commit to it and release a new beta since there are a lot of changes involved
Joel Baranick
@kadaan
Oct 31 2016 15:44
No problem.
Nathan LaFreniere
@nlf
Oct 31 2016 15:45
the next beta will have that fix in place, and a lot more logging which should help debug things like why the docker.sock file didn't get created for you
Mads Høgstedt Danquah
@danquah
Oct 31 2016 15:45
yay for logging!
Joel Baranick
@kadaan
Oct 31 2016 15:46
Yay!!!
Nathan LaFreniere
@nlf
Oct 31 2016 15:47
i'm also working on lots of changes to how the cli works to make it more flexible
Joel Baranick
@kadaan
Oct 31 2016 15:47
Nice!
Nathan LaFreniere
@nlf
Oct 31 2016 15:48
and to make that silly spinner thing more reliable, i don't know if it's happened to anyone else but it sometimes prints text in completely the wrong spot :grimacing:
Joel Baranick
@kadaan
Oct 31 2016 15:48
I haven't seen that.
Nathan LaFreniere
@nlf
Oct 31 2016 15:48
i imagine i only see it because i run dlite init ~20 times a day
Joel Baranick
@kadaan
Oct 31 2016 15:48
Probably
With docker-compose v1 format, we can't do volumes, can we?
Seems like we need to do the other solution then: network_mode: bridge
Nathan LaFreniere
@nlf
Oct 31 2016 15:49
i'm honestly not sure, i don't use compose very much. maybe @danquah can answer? (if he's around)
Joel Baranick
@kadaan
Oct 31 2016 15:51
Okay. Confirmed what was posted.
If you are using v2 syntax, just add network_mode: bridge to each service and the dlite networking works.
You guys have any suggestions for a dlite compatible UI (menubar hopefully)?
Nathan LaFreniere
@nlf
Oct 31 2016 15:56
i've thought about writing one for basic management of the vm
Mads Høgstedt Danquah
@danquah
Oct 31 2016 15:56
correct - you can't do named volumes in v1 - but network_mode: bridge should fix a v2 config
Joel Baranick
@kadaan
Oct 31 2016 15:57
There is one based on electron, but it doesn't work with dlite.
Nathan LaFreniere
@nlf
Oct 31 2016 15:57
i wouldn't be making a docker ui though, just one for dlite itself
Joel Baranick
@kadaan
Oct 31 2016 15:57
Ahhhh
I see.
Nathan LaFreniere
@nlf
Oct 31 2016 15:57
i can definitely look at menubar-docker and see if i can patch it to make it dlite friendly
Joel Baranick
@kadaan
Oct 31 2016 15:58
That would probably be fine. As it is nice to be able to see if the dlite host is running and stop it easily.
Nathan LaFreniere
@nlf
Oct 31 2016 15:59
ah, ok. yeah it doesn't work out of the box because it uses docker-machine to find vms
i'll see what i can do
Joel Baranick
@kadaan
Oct 31 2016 15:59
Cool. Maybe it will jumpstart you on an easy solution.
Nathan LaFreniere
@nlf
Oct 31 2016 16:00
what kind of features do you look for in something like this? just listing what containers exist with some kind of notation as to what's running and what's stopped?
are there any actions you want to perform on the containers from the menubar besides stop/start?
Joel Baranick
@kadaan
Oct 31 2016 16:00
Not personally.
Nathan LaFreniere
@nlf
Oct 31 2016 16:00
something that basic i can manage
Joel Baranick
@kadaan
Oct 31 2016 16:01
All I'm really looking for is whether the dlite host is running, stop and start it, see what containers are running, stop and start them.
Nathan LaFreniere
@nlf
Oct 31 2016 16:01
would be kind of nice to have an optional menu bar ui. would also make it a lot easier to do things like start the vm on login
Joel Baranick
@kadaan
Oct 31 2016 16:01
But I would be fin with: "whether the dlite host is running, stop and start it,"
If you didn't want to have the container stuff.
Nathan LaFreniere
@nlf
Oct 31 2016 16:02
i already have code to list containers, so it would just be a matter of figuring out how to render that list :)
not a huge amount of extra work
Joel Baranick
@kadaan
Oct 31 2016 16:02
Cool!
Nathan LaFreniere
@nlf
Oct 31 2016 16:02
that's a good suggestion. something i had been thinking about in the back of my mind for a while now
Joel Baranick
@kadaan
Oct 31 2016 16:18
Thanks!