<div><div dir="auto">Piping in since I'm not seeing our deployment procedure mentioned here (I may have missed emails cause Gmail seems to dislike this ML server). </div></div><div dir="auto"><br></div><div dir="auto">We push a git tag following semver (a plug-in that'd do something like Helm does: automatic decision on which part of major minor patch to bump would be interesting). </div><div dir="auto">This triggers GitlabCI jobs that runs tests and builds docker images at the same time (so QA/hitfixes don't have to wait for tests, cause skipping tests isn't easy). </div><div dir="auto">Docker images are built in stages. The release tarball is unpacked into the base OTP image and weights ~40MB compressed.</div><div dir="auto">It's nice to keep this size small so kubernetes can pull it quick. </div><div dir="auto">We always keep at least two instances running in prod behind the load balancer so we can deploy progressively. </div><div dir="auto"><br></div><div dir="auto">This only handles 20 requests second though. </div><div dir="auto">Tagging is a manual action. </div><div dir="auto">We don't use relups and in fact I've never worked at a company that did. </div><div dir="auto">It seems canary deployments are enough most of the time. Easier than thinking of the state changes a relup involves. </div><div dir="auto">In this perspective I think that the "embedded mode" should be the default mode of development. It'd help catch things earlier and maybe allow for more aggressive optimisations. </div><div dir="auto">Also we're running elixir. </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed 17 Apr 2019 at 22:42, Sölvi Páll Ásgeirsson <<a href="mailto:solvip@gmail.com">solvip@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">We do a couple of things:<div>- package some apps as RPMs for running as metal</div><div>- package things as docker containers to be scheduled by ECS</div><div><br></div><div>Generally, we just use ‘rebar3 as prod release’ and copy the resulting release into the package.  For RPMs, we use fpm.<br><br>I suspect it gets little attention because it’s extremely simple to make a prod ready release<br><br><div id="m_-8904284756390582968AppleMailSignature" dir="ltr">Sent from my iPhone</div></div></div><div dir="auto"><div><div dir="ltr"><br>On 17 Apr 2019, at 00:15, Lloyd R. Prentice <<a href="mailto:lloyd@writersglen.com" target="_blank">lloyd@writersglen.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr">Hi Dieter,<div><br></div><div>Really helpful!  </div><div><br></div><div>From my poking around, Erlang deployment gets too little attention on the web or in the literature— particularly in this age of cloud deployment, containers, and distributed systems. So thanks again for your nuts-and-bolts overview.</div><div><br></div><div>I’d love to read how others have brought Erlang apps and websites into production and lessons learned.</div><div><br></div><div>Best wishes, </div><div><br></div><div>Lloyd</div><div><br><br><div id="m_-8904284756390582968AppleMailSignature" dir="ltr">Sent from my iPad</div><div dir="ltr"><br>On Apr 16, 2019, at 4:24 PM, Dieter Schön <<a href="mailto:dieter@schoen.or.at" target="_blank">dieter@schoen.or.at</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr">
  
    
  
  
    <p>Hi Lloyd,</p>
    <p>this week I am not in the office, so I can just try to do a brain
      dump.</p>
    <p>The installation was quite simple, I installed a plain Ubuntu
      desktop,</p>
    <p>and then extracted the erlang tar file into /opt. This is done by
      one or two shell scripts.</p>
    <p><br>
    </p>
    <p>The erlang app is started on demand by another application, which
      is launched by the <br>
    </p>
    <p>operator.</p>
    <p>So I do not have to deal with systemd (which I also do not like
      very much) or the like.</p>
    <p>My application could run as a server, but in the current use case
      there is no need for that.</p>
    <p><br>
    </p>
    <p>For the footprint of the docker container I will have to come
      back next week.</p>
    <p>I really have no idea how big it is. In former times I have used
      VirtualBoxes with snapshots</p>
    <p>for similar tasks, but if the focus is quite narrow, a docker
      container is far more easier and quicker</p>
    <p>than a complete VM.</p>
    <p><br>
    </p>
    <p>Regards,</p>
    <p>Dieter</p>
    <p><br>
    </p>
    <div class="m_-8904284756390582968moz-cite-prefix">On 16.04.19 21:54,
      <a class="m_-8904284756390582968moz-txt-link-abbreviated" href="mailto:lloyd@writersglen.com" target="_blank">lloyd@writersglen.com</a> wrote:<br>
    </div>
    <blockquote type="cite">
      
      <font size="2" face="arial">
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt">Hi Dieter,</p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt">Many thanks for sharing your
          experience.</p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt">Could you please outline
          your installation procedure?  Also, the size of your Docker
          application image (RAM footprint) ? I've been considering LXC
          containers, but I'd like to test with Docker.</p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt">All the best,</p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt">Lloyd</p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt"> </p>
        <p style="margin:0;padding:0;font-family:arial;font-size:10pt">-----Original Message-----<br>
          From: "Dieter Schön" <a class="m_-8904284756390582968moz-txt-link-rfc2396E" href="mailto:dieter@schoen.or.at" target="_blank"><dieter@schoen.or.at></a><br>
          Sent: Tuesday, April 16, 2019 3:46pm<br>
          To: "Erlang-Questions Questions"
          <a class="m_-8904284756390582968moz-txt-link-rfc2396E" href="mailto:erlang-questions@erlang.org" target="_blank"><erlang-questions@erlang.org></a><br>
          Subject: Re: [erlang-questions] How do you go to production?<br>
          <br>
        </p>
        <div id="m_-8904284756390582968SafeStyles1555444185">
          <div style="font-family:Tahoma;font-size:16px;direction:ltr"><br>
            Hi,
            <div>here is a case from the other end of the spectrum. </div>
            <div>I developed a protocol converter for a satellite test
              system, it is installed on 2 (in words: two)  PCs.</div>
            <div>For development, I used one application and rebar3.
              Production is just "rebar3 as prod tar" (From a labelled
              git commit).</div>
            <div>Testing was done on the two PCs, where I used one as
              the system under test and the other as test harness/data
              generator.<br>
              I was also using wireshark and other third party tools, to
              prevent incestuous behaviour.</div>
            <div>To test the installation procedure I used docker, which
              was really nice. I had a blank machine in two seconds, </div>
            <div>where I could load and execute the installation script
              from the host. I had turnaround cycles from several
              seconds.</div>
            <div>What else.. the application is quite small. It fits
              into one erlang application. Apart from it, the release
              only contains the observer and sasl.</div>
            <div>Unit testing was done in EUnit.</div>
            <br>
            <div>This was my first project where I used erlang, and the
              learning curve was quite gentle. </div>
            <div>Kind regards,</div>
            <div>Dieter</div>
            <div><br>
              <div>Am So., Apr. 14, 2019 11:20
                schrieb Max Lapshin <a class="m_-8904284756390582968moz-txt-link-rfc2396E" href="mailto:max.lapshin@gmail.com" target="_blank"><max.lapshin@gmail.com></a>:</div>
              <blockquote>
                <div>
                  <div>
                    <div dir="ltr">
                      <div dir="ltr">Hi.
                        <div>I'm developing Flussonic for almost 10
                          years and we have some practices for
                          packaging, deploying, running, maintainig that
                          are not well known, however they are rather
                          good for us.</div>
                        <div>It is interesting how do other people solve
                          this.</div>
                        <div>At first, we do not use releases. It is
                          because when we have started our long path,
                          using of releases was not very easy.  Couple
                          of days ago I've tested it with rebar3 and it
                          is really easier to use. Perhaps we would use
                          releases today.</div>
                        <div>Next: we use our own fpm script replacement
                          for packaging. I can boast that it seems to be
                          the only existing implementation of rpm
                          outside of original library, however I'd
                          better never pass this path again. I've
                          written it in pre-docker era and frankly
                          speaking it is a traumatic experience.
                          However, we are using it for debian and it is
                          really convenient:</div>
                        <div><a rel="external" href="https://github.com/flussonic/epm" target="_blank">https://github.com/flussonic/epm</a></div>
                        <div>Some time ago we have switched to systemd.
                          I personally consider systemd a very badly
                          designed thing that was created without any
                          discussions with existing system
                          adminstrators. For example, systemd doesn't
                          offer config validation before launch. Another
                          brilliant idea is to offer libsystemd for
                          linking into application. Unknown library with
                          unknown quality. What can go wrong if you link
                          it into your erlang or java application?</div>
                        <div>Sorry, but no. We have systemd.erl:  <a rel="external" href="https://gist.github.com/maxlapshin/01773f0fca706acdcb4acb77d91d78bb" target="_blank">https://gist.github.com/maxlapshin/01773f0fca706acdcb4acb77d91d78bb</a></div>
                        <div>
                          <div>Use Type=notify in  youdaemon.service</div>
                        </div>
                        <div>After you manage to launch your erlang
                          daemon, you need to collect statistics. We had
                          to add some more linux-related tools to fetch:
                          cpu usage, disk I/O usage, system ram usage
                          (swap, etc), per-interface network statistics,
                          udp errors count, nvidia card usage, etc. </div>
                        <div>If this is worthy outsource, I think we can
                          extract it. </div>
                        <div>Our os_stat library is linked with our
                          in-erlang pulsedb library. We try to maintain
                          as less dependencies as possible, so we
                          collect all ticks from monitoring tools inside
                          erlang library pulsedb:  <a rel="external" href="https://github.com/pulsedb/pulsedb" target="_blank">https://github.com/pulsedb/pulsedb</a> 
                           (maybe should update public branch)</div>
                        <div>It can save several thousands metrics with
                          one tick per 1-3 seconds.</div>
                        <div>Support is an important part of our
                          business, because customers cannot just launch
                          software, they often need help.  We have many
                          people in support staff and I do not want to
                          manage their own public ssh keys on customer's
                          servers. So we have written an ssh proxy:
                          system that login to customer server with one
                          private key and allow support guy to use his
                          own key:  <a rel="external" href="https://github.com/flussonic/ssh-proxy" target="_blank">https://github.com/flussonic/ssh-proxy</a></div>
                        <div>All these things are rather useless for
                          development and many of them are not required
                          for in-house development, however it is hard
                          to live without them when you sell software.</div>
                        <div>What is your experience with such things
                          that standard erlang lacks?</div>
                      </div>
                    </div>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>
        </div>
      </font>
      <br>
      <fieldset class="m_-8904284756390582968mimeAttachmentHeader"></fieldset>
      <pre class="m_-8904284756390582968moz-quote-pre">_______________________________________________
erlang-questions mailing list
<a class="m_-8904284756390582968moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a class="m_-8904284756390582968moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
  

</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></div></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><br></div><div>Cheers,</div><div>-- </div><div>Pierre Fenoll</div></div><div><br></div></div></div>