<div dir="ltr"><div><div>> Hey everyone,<br>> <br>> <br>> <br>> <br>> I’ve recently built a few applications that handle high volume message passing and all communicate with each other using Erlang’s ssl distribution. I’m working on deploying these to multiple servers - right now I am just using rebar3 release and creating a zipped tar of the release directory, moving it to a new box, and changing the some vm.args and sys.config options on the new machines. This doesn’t seem totally intuitive though… it take far longer than I feel like it should. <br>> <br>> <br>> <br>> <br>> I’ve read about Docker and Kubernetes, and those seem promising, but our IT guys aren’t ready to move to containers and are using static nodes right now. <br>> <br>> <br>> <br>> <br>> So, what is the best way to quickly distribute your erlang binaries and configure the enviornment? Have a quick script to do it automatically? Is the answer just containerize with Docker and wait a few months for the IT team to catch up with it? Or is there some other option out there?<br>> <br>> <br>> <br>> <br>> Thanks for your help!<br></div><br></div>Please take a look at Enot (<a href="https://github.com/comtihon/enot">https://github.com/comtihon/enot</a>), this is actually I've created it for.<br><div><div>It can help you with both deployment and environment variables handling.<br><br></div><div>For deployment - just add install steps you perform to enot's config (here is an example <a href="https://github.com/comtihon/example_service">https://github.com/comtihon/example_service</a>) and you will be able to install and run it on another linux machine with `enot install you/yourservice`. If your service is private (not open sourced) - you should run your enot auto builder first, to store enot packages there (<a href="https://github.com/comtihon/enot_auto_builder">https://github.com/comtihon/enot_auto_builder</a>). <br><br></div><div>For templating - you can use environment variables  in app.src, relx.conf or vm.args:<br><br><pre><code>{env, [
                {% if MAGIC_GREETING is defined %}
                  {greeting, "{{ MAGIC_GREETING }}"}
                {% else %}
                  {greeting, "hello world!" }
                {% endif %}
              ]}</code></pre>or:<br><pre><code>{% if app.git_branch == 'master' %}
            {log, info}
        {% else %}
            {log, debug}
        {% endif %}</code></pre>or:<br><pre><code>{% if hostname in prod_hosts %}
                {database, [
                        {host, "prod_db"},
                        {password, "super_secure_password"},
                        {pool_size, 400}
                ]}
        {% elif hostname in stage_hosts %}
                {database, [
                        {host, "staging_db"},
                        {password, "other_secure_password"},
                        {pool_size, 200}
                ]}</code></pre><pre><code>        {% else %}
                {database, [
                        {host, "dev_host"},
                        {password, "dev_password"},
                        {pool_size, 10}
                ]}</code></pre><pre><code>{% endif %}</code></pre>Regards<br></div></div></div>