Open oubiwann opened 9 years ago
I've had some problems with relx
(it's not actually building on my machine right now), so progress here is a little bit slow (balancing with other exciting tasks, too ;-))
Turned out my rebar
was too old; I've just build relx
using the latest rebar release.
@oubiwann I'm currently using relx
to generate my releases and tarballs. The process can be quite simple:
1) Ensure you have the proper dependencies specified. In your relx.conf
:
{release, {your-app, "0.0.1"}, [lfe, sasl, logjam, lager, ..., your-app]}.
{extended_start_script, true}.
{overlay, [{template, "lfe.config", "lfe.config"}]}.
{vm_args, "./etc/vm.args"}.
I put my configs under your-app/etc
and I trust logjam
to create my your-app/logs
directory, I just need to make sure lfe.config
is on the correct place in order to correctly start the application.
2) Generate the release:
$ relx release
3) And release tarball aswell:
$ relx tar
That's it, now you can upload your release (should be on $PWD/_rel/your-app/your-app-0.0.1.tar.gz
). On production systems I'm able to attach and run an LFE shell like a normal relx
release:
$ your-app/bin/your-app start
$ your-app/bin/your-app attach
...
> lfe_shell:start().
I'm not sure if I'm missing something but until now everything has been working fine.
A quick question: does this create a completely stand-alone release which contains everything including the erlang VM? I am not relx knowledgeable. A follow-on question would be: how do I create an LFE release containing all the LFE applications I want but uses the existing erlang system?
Robert
On 11 February 2015 at 14:46, Ricardo Lanziano notifications@github.com wrote:
@oubiwann https://github.com/oubiwann I'm currently using relx to generate my releases and tarballs. The process can be quite simple:
1) Ensure you have the proper dependencies specified. In your relx.conf:
{release, {your-app, "0.0.1"}, [lfe, sasl, logjam, lager, ..., your-app]}. {extended_start_script, true}. {overlay, [{template, "lfe.config", "lfe.config"}]}. {vm_args, "./etc/vm.args"}.
I put my configs under your-app/etc and I trust logjam to create my your-app/logs directory, I just need to make sure lfe.config is on the correct place in order to correctly start the application.
2) Generate the release:
$ relx release
3) And release tarball aswell:
$ relx tar
That's it, now you can upload your release (should be on $PWD/_rel/your-app/your-app-0.0.1.tar.gz). On production systems I'm able to attach and run an LFE shell like a normal relx release:
$ your-app/bin/your-app start $ your-app/bin/your-app attach ...
lfe_shell:start().
I'm not sure if I'm missing something but until now everything has been working fine.
— Reply to this email directly or view it on GitHub https://github.com/lfe/lfetool/issues/162#issuecomment-73882743.
@rvirding According to the documentation, by default relx
will include local ERTS but one can specify the contrary on the relx.conf
as:
{include_erts, false}.
This will create a release without the local ERTS but with the required libraries for running the LFE application (including LFE).
Introduction
There have been several discussions in emails, mail lists, bugs, PRs, at conferences, etc., about:
Robert has been considering ways in which LFE might support a "core" set of libraries that would be part of a standard install of LFE. lfetool has recently been updated with bootstrapping capabilities which will allow it to use more and more native LFE code (as opposed to bash), leading to a gradual rewrite in LFE. Both of these efforts have been considering the use of configuration files and standard locations for LFE libraries.
As we approach a 1.0 release for LFE and as lfetool prepares to incorporate more LFE into its growing code base, it's time to lay out a clear plan and define some standards for both of these as well as for the wider LFE community so that new and old users alike are aware of the preferred (and supported!) way of working with LFE in development and production environments.
This Ticket
This ticket will be a living document that attempts to work out a standard approach and development plan for these features. This ticket will very likely spawn many other new tickets in LFE, lfetool, and other tools/projects/libraries. These will be linked here.
This ticket will also keep track of tasks lists and TODO items.
Foundation
Use Cases
Conceptual Categorization of Tasks
code:paths
Robert's Ideas on LFE Installation
@rvirding recently distilled his thoughts on this topic in an email, which I will present here for continued reference:
Planning
Todo Items
relx
and see what the workflows for an LFE project look likeERL_LIBS
wrangling of lfetool and use Erlang releases instead(code:add_pathsa <dirs>)
)~/.lfe/deps/*
)