<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div data-crea="font-wrapper" style="font-family: Tahoma; font-size:
16px; direction: ltr"><br>
Hi,
<div><br>
</div>
<div>here is a case from the other end of the spectrum. <br>
</div>
<div>I developed a protocol converter for a satellite test system,
it is installed on 2 (in words: two) PCs.</div>
<div><br>
</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><br>
</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><br>
</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><br>
</div>
<div>This was my first project where I used erlang, and the
learning curve was quite gentle. </div>
<div><br>
</div>
<div>Kind regards,</div>
<div>Dieter</div>
<div><br>
<div data-anchor="reply-title">Am So., Apr. 14, 2019 11:20
schrieb Max Lapshin <a class="moz-txt-link-rfc2396E" href="mailto:max.lapshin@gmail.com"><max.lapshin@gmail.com></a>:</div>
<blockquote>
<div>
<div>
<div dir="ltr">
<div dir="ltr">Hi.
<div><br>
</div>
<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><br>
</div>
<div>It is interesting how do other people solve this.</div>
<div><br>
</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><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</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 href="https://github.com/flussonic/epm"
target="_blank" tabindex="-1" rel="external"
style="cursor: pointer;">https://github.com/flussonic/epm</a><br>
</div>
<div><br>
</div>
<div><br>
</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><br>
</div>
<div>Sorry, but no. We have systemd.erl: <a
href="https://gist.github.com/maxlapshin/01773f0fca706acdcb4acb77d91d78bb"
target="_blank" tabindex="-1" rel="external"
style="cursor: pointer;">https://gist.github.com/maxlapshin/01773f0fca706acdcb4acb77d91d78bb</a></div>
<div><br>
</div>
<div>
<div>Use Type=notify in youdaemon.service</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</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><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</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
href="https://github.com/pulsedb/pulsedb"
target="_blank" tabindex="-1" rel="external"
style="cursor: pointer;">https://github.com/pulsedb/pulsedb</a>
(maybe should update public branch)</div>
<div><br>
</div>
<div>It can save several thousands metrics with one
tick per 1-3 seconds.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</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
href="https://github.com/flussonic/ssh-proxy"
target="_blank" tabindex="-1" rel="external"
style="cursor: pointer;">https://github.com/flussonic/ssh-proxy</a></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</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>
</body>
</html>