20:54 PM
zas
then we can query consul to get for example ports for the service
2016-08-16 22901, 2016
20:55 PM
zas
example: usually we run a container exposing ports, not using the -P option which maps a random port
2016-08-16 22919, 2016
20:55 PM
Gentlecat
right
2016-08-16 22902, 2016
20:56 PM
zas
with consul and registrator, we can just use -P
2016-08-16 22914, 2016
20:56 PM
zas
and query consul to get the service ports
2016-08-16 22933, 2016
20:56 PM
zas
but the main point (for us) is to autogenerate config files
2016-08-16 22943, 2016
20:56 PM
zas
ie. for nginx reverse proxy
2016-08-16 22906, 2016
20:57 PM
zas
currently if we add a mbs server, we have to add it manually in nginx conf on gateways
2016-08-16 22928, 2016
20:57 PM
Gentlecat
ok, I think I'm starting to understand it now
2016-08-16 22945, 2016
20:57 PM
zas
with consul-template (which queries consul and generate text files), we can just tell : look for services tagged mbs and add them
2016-08-16 22904, 2016
20:58 PM
zas
this is a way to automatically add services
2016-08-16 22905, 2016
20:58 PM
Gentlecat
basically services register themselves so that they can be exposed on a gateway, correct?
2016-08-16 22911, 2016
20:58 PM
zas
yes
2016-08-16 22912, 2016
20:58 PM
Gentlecat
ok
2016-08-16 22916, 2016
20:58 PM
zas
or anywhere
2016-08-16 22936, 2016
20:58 PM
Gentlecat
another example than
2016-08-16 22945, 2016
20:58 PM
zas
let me find a link, so you can test
2016-08-16 22912, 2016
20:59 PM
Gentlecat
let's say we have MBS setup and other services need to access MusicBrainz DB
2016-08-16 22921, 2016
20:59 PM
zas
2016-08-16 22932, 2016
20:59 PM
Gentlecat
can they access the same MBS container?
2016-08-16 22937, 2016
20:59 PM
zas
check the video at the end (note: replace fig with docker-compose)
2016-08-16 22908, 2016
21:00 PM
zas
we "tag" the container as mbsdb for example
2016-08-16 22915, 2016
21:00 PM
Gentlecat
yeah, I have a tab with that open. is next on my list :)
2016-08-16 22916, 2016
21:00 PM
zas
it registers on start/stop etc
2016-08-16 22934, 2016
21:00 PM
Gentlecat
ok
2016-08-16 22956, 2016
21:00 PM
zas
if we stop it on one server, and starts another one with the same tag, mbs servers confs can be updated to use the new one
2016-08-16 22909, 2016
21:01 PM
zas
(this case isn't the best example)
2016-08-16 22920, 2016
21:01 PM
Gentlecat
so from the app side what do we need to do?
2016-08-16 22940, 2016
21:01 PM
Gentlecat
configure notifications for consul that an instance is running?
2016-08-16 22945, 2016
21:01 PM
zas
query consul by a mean and adapt
2016-08-16 22902, 2016
21:02 PM
zas
in fact, it is event driver
2016-08-16 22909, 2016
21:02 PM
zas
driven
2016-08-16 22917, 2016
21:02 PM
dylan has quit
2016-08-16 22920, 2016
21:02 PM
zas
have a look at the vid
2016-08-16 22927, 2016
21:02 PM
zas
you'll understand very well ;)
2016-08-16 22928, 2016
21:03 PM
zas
consul-template is able to react to such event (ie. container is started), regenerate config file from template, and HUP nginx
2016-08-16 22955, 2016
21:03 PM
zas
but it can be used for anything else
2016-08-16 22938, 2016
21:04 PM
zas
consul itself doesn't depend on docker at all (though it can be run in a docker container)
2016-08-16 22922, 2016
21:05 PM
zas
in fact we could have used that since ages, but with docker it is even more powerful, especially combined with docker swarm
2016-08-16 22950, 2016
21:05 PM
zas
adding a mbs server: run a new container, done...
2016-08-16 22954, 2016
21:06 PM
zas
that said, there are alternatives to consul ie. etcd
2016-08-16 22924, 2016
21:07 PM
zas
but consul looks mature enough, has features for HA, and is well documented
2016-08-16 22933, 2016
21:43 PM
diana_olhovyk_ has quit
2016-08-16 22939, 2016
21:43 PM
diana_olhovyk joined the channel
2016-08-16 22914, 2016
21:51 PM
Gazooo joined the channel
2016-08-16 22950, 2016
21:53 PM
diana_olhovyk has quit
2016-08-16 22919, 2016
21:54 PM
diana_olhovyk joined the channel
2016-08-16 22902, 2016
22:08 PM
diana_olhovyk___ joined the channel
2016-08-16 22908, 2016
22:08 PM
Gazooo
ruaok: giving your musicbrainz-vm repo another go from fresh, will let you know how it goes
2016-08-16 22948, 2016
22:08 PM
diana_olhovyk has quit
2016-08-16 22925, 2016
22:18 PM
yeeeargh has quit
2016-08-16 22952, 2016
22:18 PM
regagain has quit
2016-08-16 22957, 2016
22:18 PM
Gentlecat
zas: do you have any examples/articles which mention how the registration from the app is supposed to be set up?
2016-08-16 22924, 2016
22:19 PM
Gentlecat
2016-08-16 22909, 2016
22:22 PM
zas
when using registrator, you can pass env vars to tag the service
2016-08-16 22908, 2016
22:23 PM
zas
2016-08-16 22918, 2016
22:24 PM
zas
2016-08-16 22909, 2016
22:34 PM
zas
Does it help ?
2016-08-16 22903, 2016
22:39 PM
diana_olhovyk___ has quit
2016-08-16 22926, 2016
22:43 PM
m1e1w1 joined the channel
2016-08-16 22930, 2016
22:44 PM
Gentlecat
yeah, reading
2016-08-16 22900, 2016
22:45 PM
m1e1w1
tried to use vagrant-VM and musicbrainz-VM builds, spent 2 days trying to get them to work, both wont allow me to connect to them; both don't seem to allow headphones to search them for info.
2016-08-16 22901, 2016
22:47 PM
Freso
m1e1w1: I don't know what vagrant-vm is, but the musicbrainz-vm "image" Just Works™ for me, FWIW.
2016-08-16 22943, 2016
22:48 PM
m1e1w1
i have the image that musicbrainz hosts, i set it up; but i can't connect to it.
2016-08-16 22946, 2016
22:49 PM
Freso
2016-08-16 22954, 2016
22:49 PM
Freso
Did you follow the instructions?
2016-08-16 22919, 2016
22:50 PM
Freso
What platform are you on?
2016-08-16 22939, 2016
22:52 PM
m1e1w1
2016-08-16 22902, 2016
23:18 PM
Nyanko-sensei joined the channel
2016-08-16 22902, 2016
23:18 PM
D4RK-PH0ENiX has quit
2016-08-16 22957, 2016
23:26 PM
ariscop joined the channel