12 posts were split to a new topic: Need help deploying to RHEL
From Elixir Mix configuration to release configuration - Alchemy 101 Part 2 by @thomas-rc-hutchinson (Erlang Solutions)
The OP needs updating, gatling supports distillery.
I found a bug in exrm for windows deployment, and created a couple of pull requests, both merged - to exrm and relx - so if you are using these, get post 10 June 2017 version. The maintainer of exrm told me that exrm is deprecated in favour of distillery, though as you say, the Phoenix Framework docs still say to use exrm (which is why I was using it.)
Just came across Bootleg, which looks very promising. Will definitely try it out
Nice, added to the wiki
Iām getting a little worried when I look at elixir / phoenix deployment tools. We have such a great base but seem to somehow miss a great opportunity. Let me explain why I think this is:
- The way I understand it, edeliver, gatling and bootleg try to do the exact same thing. To try what capistrano does for the rails developers. Why is this bad? Because we could consolidate our efforts and save a lot of time. Also imagine someone new who has to look through and understand (at least partly) what the differences of these are so that he can decide which one he wants to use.
- Take a look at the following image and decide if you want to get started with a tool that has 12 open PRās, some of them dating back a whole year with no comments from a maintainer?
- Most of the tools recommend to set up 3 hosts to get started (build, stage, production). I did that and got pretty good with ansible while doing that a few times, but this is not what I would recommend a newcomer. Anyone remembers the time when you deployed your first rails app on heroku? This here feels different.
- This might be a different topic, but after reading the discussion here, I still donāt know which is the recommended way to get env. variables into my app. Could we decide on something as a community?
The good news: I think bitwalker is doing a great job with distillery. Itās getting me that archive which I can extract and run.
@joe I can understand the sentiment, but I think the issue is that weāre simply at the stage where no tool is refined enough to solve everyoneās problem elegantly, so many different tools are being created; the resulting competition should produce a natural form of selection which will push the best tools to the top, eventually narrowing us down to just a few solid tools which solve the problem for two different classes of developers/teams, small-medium and large. Itās just too early to expect one tool to dominate and also solve everyoneās problems. Iām of the opinion that weāre unlikely to ever have one tool which works for everyone, but I do hope that we can narrow it down to just a few solid choices. Itās not impossible we could get to one tool, but it remains to be seen how things will shake out.
- They try to do the same thing, but all in different ways. Right now, my personal opinion is that bootleg has the best foundation, but I recall thinking similarly about gatling prior to bootleg showing up, so competition will need to sort them out. Edeliver seems to work for plenty of people, but I have also seen many issues raised on the Distillery tracker which seem to arise from it, so that has tainted my opinion a bit. It is also a very complex shell-based tool, which will be difficult to maintain, I think a primarily Elixir-based tool, with the bare minimum of shell required, is likely to be a better foundation to build on. That said, I very much want to be clear that Edeliver was the first tool which actually did a good job of automating build/deployment in Elixir for those not already using some kind of CI/CD pipeline, and I think the team deserves a lot of credit for that, and certainly some slack.
- Iām not sure if you maintain any open source projects yourself, but speaking from experience, if itās just one or two devs maintaining a project, it can be extremely difficult to keep up with the volume of issues and PRs. In many cases, issues are poorly contextualized or described, information needs to be pulled from the person filing it, PRs are messy or poorly explained, or even just plain broken or buggy. That screenshot is a far cry from terrible. Issues or PRs with no comments of any kind is a bummer, but having been a solo maintainer of both exrm and distillery, I can relate to finding it difficult to make time when you have to do it all in your spare time. I always make the attempt to at least leave some initial comments, but I have certainly left issues lingering for long periods of time if they are low priority. Highlighting that the last commit was 28 days ago doesnāt tell us anything either, because there could be work occurring on local branches which hasnāt been upstreamed, and wonāt be visible. Try to judge based on the merits of the project, and donāt forget many of these projects are things one or two people are maintaining in their spare time at home
- I agree that tooling needs to support simpler use cases, requiring a complex build setup isnāt practical for individual developers deploying stuff to Digital Ocean or something. That said, I think itās not unreasonable for a tool to expect that the majority of teams will have this kind of pipeline, and optimize for it. I think most tools should try to provide a path for using a local Vagrant or Docker instance to act as the build/staging servers, expecting developers to be willing to install one of those seems like a fair expectation. One already has the basics needed via Distillery to stick to the simplest tools, e.g.,
rsync
orscp
+ a simple shell script to automate the deployment if they are not willing to get their hands dirty to set up a basic build/deployment pipeline. The maintainers of such tools have to set some boundaries though, at least until they get enough contributors to support different use cases, otherwise it slows development to a crawl due to fear of breaking support for some cases they donāt use themselves. - The ābestā way of getting environment variables into your app is entirely based on your environment. That could be using
REPLACE_OS_VARS=true
with Distillery using strings like"${SOME_VAR}"
in your config file, then extract and parse the value usingApplication.get_env/3
plus whatever code to post-process the value. You can also skip the first part, and just useSystem.get_env/1
for simple cases. If you need to configure dependencies via environment variables, then you will need to reach for a tool like Conform or something else, which can handle performing configuration prior to boot. This could even be implemented yourself as a script of some kind which is run in apre_configure
hook with Distillery. The bottom line is that it depends what kind of configuration you need to do, and what you need to configure. Phoenix 1.3 is taking the approach which is now generally recommended for libraries, which is providing an init callback which allows you to configure the application before it starts, in whatever way works best for you. Since that is a relatively new approach, there are plenty of libraries which donāt support this, but that will change. For dependencies which you need to configure before boot, but donāt provide some other mechanism, you can useincluded_applications
, adding their top-level supervisor to your applicationās supervisor, and configuring them in your applicationāsstart/2
callback; this is not ideal, but allows you to perform the configuration step in Elixir, using whatever approach you want or need.
I appreciate the kind words about Distillery . Since weāre on the topic, the reason I never tried to solve the problem these other tools are solving, is that I wanted to keep Distillery focused on being a solid foundational layer, so that itās malleable enough to fit any use case, and let other tools build on it. Also, Iām just one guy, so I probably would fail miserably at maintaining all of that on my own
A post was merged into an existing topic: What do you need from a deployment tool?
Providing Mix with the ability to generate OTP releases will be very nice.
Hi. First time post.
I am looking for a good system modeling tool that I can use to design the higher level components of Elixr and then generate the code/configuration/scripts/etc ā¦ for me.
Can you point me in the right direction? Any recommendations?
I could do it myself, but I have so many system components to deal with I really need a good tool with a UI to help me automate as much as possible, but then generate the code so I can customize it.
Thanks in advanceā¦
Cheers,
Richard