#metabrainz

/

      • zas
        then we can query consul to get for example ports for the service
      • 2016-08-16 22901, 2016

      • zas
        example: usually we run a container exposing ports, not using the -P option which maps a random port
      • 2016-08-16 22919, 2016

      • Gentlecat
        right
      • 2016-08-16 22902, 2016

      • zas
        with consul and registrator, we can just use -P
      • 2016-08-16 22914, 2016

      • zas
        and query consul to get the service ports
      • 2016-08-16 22933, 2016

      • zas
        but the main point (for us) is to autogenerate config files
      • 2016-08-16 22943, 2016

      • zas
        ie. for nginx reverse proxy
      • 2016-08-16 22906, 2016

      • zas
        currently if we add a mbs server, we have to add it manually in nginx conf on gateways
      • 2016-08-16 22928, 2016

      • Gentlecat
        ok, I think I'm starting to understand it now
      • 2016-08-16 22945, 2016

      • 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

      • zas
        this is a way to automatically add services
      • 2016-08-16 22905, 2016

      • Gentlecat
        basically services register themselves so that they can be exposed on a gateway, correct?
      • 2016-08-16 22911, 2016

      • zas
        yes
      • 2016-08-16 22912, 2016

      • Gentlecat
        ok
      • 2016-08-16 22916, 2016

      • zas
        or anywhere
      • 2016-08-16 22936, 2016

      • Gentlecat
        another example than
      • 2016-08-16 22945, 2016

      • zas
        let me find a link, so you can test
      • 2016-08-16 22912, 2016

      • Gentlecat
        let's say we have MBS setup and other services need to access MusicBrainz DB
      • 2016-08-16 22921, 2016

      • zas
      • 2016-08-16 22932, 2016

      • Gentlecat
        can they access the same MBS container?
      • 2016-08-16 22937, 2016

      • zas
        check the video at the end (note: replace fig with docker-compose)
      • 2016-08-16 22908, 2016

      • zas
        we "tag" the container as mbsdb for example
      • 2016-08-16 22915, 2016

      • Gentlecat
        yeah, I have a tab with that open. is next on my list :)
      • 2016-08-16 22916, 2016

      • zas
        it registers on start/stop etc
      • 2016-08-16 22934, 2016

      • Gentlecat
        ok
      • 2016-08-16 22956, 2016

      • 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

      • zas
        (this case isn't the best example)
      • 2016-08-16 22920, 2016

      • Gentlecat
        so from the app side what do we need to do?
      • 2016-08-16 22940, 2016

      • Gentlecat
        configure notifications for consul that an instance is running?
      • 2016-08-16 22945, 2016

      • zas
        query consul by a mean and adapt
      • 2016-08-16 22902, 2016

      • zas
        in fact, it is event driver
      • 2016-08-16 22909, 2016

      • zas
        driven
      • 2016-08-16 22917, 2016

      • dylan has quit
      • 2016-08-16 22920, 2016

      • zas
        have a look at the vid
      • 2016-08-16 22927, 2016

      • zas
        you'll understand very well ;)
      • 2016-08-16 22928, 2016

      • 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

      • zas
        but it can be used for anything else
      • 2016-08-16 22938, 2016

      • zas
        consul itself doesn't depend on docker at all (though it can be run in a docker container)
      • 2016-08-16 22922, 2016

      • 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

      • zas
        adding a mbs server: run a new container, done...
      • 2016-08-16 22954, 2016

      • zas
        that said, there are alternatives to consul ie. etcd
      • 2016-08-16 22924, 2016

      • zas
        but consul looks mature enough, has features for HA, and is well documented
      • 2016-08-16 22933, 2016

      • diana_olhovyk_ has quit
      • 2016-08-16 22939, 2016

      • diana_olhovyk joined the channel
      • 2016-08-16 22914, 2016

      • Gazooo joined the channel
      • 2016-08-16 22950, 2016

      • diana_olhovyk has quit
      • 2016-08-16 22919, 2016

      • diana_olhovyk joined the channel
      • 2016-08-16 22902, 2016

      • diana_olhovyk___ joined the channel
      • 2016-08-16 22908, 2016

      • Gazooo
        ruaok: giving your musicbrainz-vm repo another go from fresh, will let you know how it goes
      • 2016-08-16 22948, 2016

      • diana_olhovyk has quit
      • 2016-08-16 22925, 2016

      • yeeeargh has quit
      • 2016-08-16 22952, 2016

      • regagain has quit
      • 2016-08-16 22957, 2016

      • 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

      • Gentlecat
        this one doesn't provide a lot of detail https://medium.com/@ladislavGazo/easy-routing-and…
      • 2016-08-16 22909, 2016

      • zas
        when using registrator, you can pass env vars to tag the service
      • 2016-08-16 22908, 2016

      • zas
      • 2016-08-16 22918, 2016

      • zas
      • 2016-08-16 22909, 2016

      • zas
        Does it help ?
      • 2016-08-16 22903, 2016

      • diana_olhovyk___ has quit
      • 2016-08-16 22926, 2016

      • m1e1w1 joined the channel
      • 2016-08-16 22930, 2016

      • Gentlecat
        yeah, reading
      • 2016-08-16 22900, 2016

      • 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

      • 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

      • m1e1w1
        i have the image that musicbrainz hosts, i set it up; but i can't connect to it.
      • 2016-08-16 22946, 2016

      • Freso
      • 2016-08-16 22954, 2016

      • Freso
        Did you follow the instructions?
      • 2016-08-16 22919, 2016

      • Freso
        What platform are you on?
      • 2016-08-16 22939, 2016

      • m1e1w1
        https://musicbrainz.org/doc/MusicBrainz_Server/Se… = musicbrainz-vm and https://github.com/metabrainz/musicbrainz-vm = vagrant-vm yes, i have both. tried both; cant connect to both. i'm on windows. i have access to ubuntu windows, ESXI, and virtualbox.
      • 2016-08-16 22902, 2016

      • Nyanko-sensei joined the channel
      • 2016-08-16 22902, 2016

      • D4RK-PH0ENiX has quit
      • 2016-08-16 22957, 2016

      • ariscop joined the channel