Code Monkey home page Code Monkey logo

distillery-umbrella-test's People

Contributors

bitwalker avatar raksonibs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

distillery-umbrella-test's Issues

not working with current exrm

I just cloned and ran

mix deps.get
mix deps.compile
mix release --verbosity=verbose

and it gave me

===> Provider (resolve_release) failed with: {error,
                                                     {rlx_prv_release,
                                                      {failed_solve,
                                                       {unreachable_package,
                                                        app_one}}}}
==> Failed to build release. Please fix any errors and try again.

Is there a way to release all apps independently ?

In this example, let's suppose I want to release all applications separately.
is there a way to configure a release so that :

mix release

has the same meaning as

mix release --name app_one
mix release --name app_two

Currently, if I remove the ย default_release: :master_app clause, then mix release will only release app_one. (Not sure it is the expected behavior.)

master_app's schema.ex file does not automatically contain merged mappings/translations

I looked at the master_app and the apps/master_app/config/config.exs already contains the settings for app_one and app_two. I assume this is manually added instead of auto generated by exrm, as there isn't any indication that stated master_app is generated by exrm.

Removing the two lines in master_app/config/config.exs,

config :app_one, port: 8090
config :app_two, port: 8091

makes the master_app unable to boot both app_one and app_two, because their respective port configurations becomes unable. Inspecting the generated files master_app.schema.exs and master_app.conf show that they are empty.

It seems that exrm's integration with conform isn't merging in the configurations from the app_one and app_two apps as suggested in the README.md.

Conform.effective doesn't work for exrm (v0.19.6)

After upgrading to the latest exrm v0.19.6, I couldn't get conform to parse the configuration. I'm getting the following exception, which can be replicated in this umbrella test project, with the mix.exs updated to the latest exrm.

$ mix conform.new
==> The schema for your project has been placed in config/app_one.schema.exs
==> The schema for your project has been placed in config/app_two.schema.exs
==> The schema for your project has been placed in config/master_app.schema.exs
$ mix conform.configure
==> The .conf file for app_one has been placed in config/app_one.conf
==> The .conf file for app_two has been placed in config/app_two.conf
==> The .conf file for master_app has been placed in config/master_app.conf
$ mix conform.effective
** (Conform.Schema.SchemaError) Invalid schema. Should be a keyword list containing :mappings and :translations keys.
    lib/conform/translate.ex:169: Conform.Translate.to_config/3
    lib/mix/tasks/conform.effective.ex:84: Mix.Tasks.Conform.Effective.do_run/1
    (mix) lib/mix/project.ex:196: Mix.Project.in_project/4
    (elixir) lib/file.ex:1137: File.cd!/2
    lib/mix/tasks/conform.effective.ex:52: anonymous fn/4 in Mix.Tasks.Conform.Effective.run/1
    (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/mix/tasks/conform.effective.ex:51: Mix.Tasks.Conform.Effective.run/1
    (mix) lib/mix/cli.ex:55: Mix.CLI.run_task/2

Here's the mix.lock

%{"bbmustache": {:hex, :bbmustache, "1.0.3"},
  "conform": {:hex, :conform, "0.16.0"},
  "cowboy": {:hex, :cowboy, "1.0.3"},
  "cowlib": {:hex, :cowlib, "1.0.1"},
  "erlware_commons": {:hex, :erlware_commons, "0.15.0"},
  "exrm": {:hex, :exrm, "0.19.6"},
  "getopt": {:hex, :getopt, "0.8.2"},
  "neotoma": {:hex, :neotoma, "1.7.3"},
  "providers": {:hex, :providers, "1.4.1"},
  "ranch": {:hex, :ranch, "1.1.0"},
  "relx": {:hex, :relx, "3.5.0"}}

Problem running under ubuntu

Hi -- I have no problem running this app on my Mac.

However, I want to run a similar setup on an ubuntu box I have, and I'm having problems, so I tried running this via Vagrant.

Here's the Vagrantfile:

Vagrant.configure(2) do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.network "forwarded_port", guest: 8090, host: 8090
  config.vm.network "forwarded_port", guest: 8091, host: 8091

  config.vm.provider "virtualbox" do |vb|
     vb.memory = "2048"
  end

  config.vm.provision "shell", path: "provision_script.sh"
end

And the provision_script.sh:

# provision_script.sh
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
dpkg -i erlang-solutions_1.0_all.deb
apt-get update
apt-get install -y git
apt-get install -y silversearcher-ag
apt-get install -y build-essential
apt-get install -y esl-erlang
apt-get install -y elixir
echo ""
echo "------------------------------------------------------"
echo "Up!"
echo "------------------------------------------------------"
echo ""

I have a script which builds everything:

#!/bin/bash
for i in app_one app_two master_app ; do
  echo "==================================> Cleaing $i"
  cd apps/$i
  mix clean
  mix deps.clean --all
  cd ../..
done

for i in app_one app_two master_app ; do
  echo "==================================> Building $i"
  cd apps/$i
  MIX_ENV=prod mix deps.get
  MIX_ENV=prod mix deps.compile
  MIX_ENV=prod mix compile
  cd ../..
done
MIX_ENV=prod mix release --verbosity=verbose

When this finishes, I can run:

apps/master_app/rel/master_app/bin/master_app console

On the Mac, and it builds and runs fine. When I try to run on the ubuntu box (either the real thing or the Vagrant box), it builds fine, but when I try to run it I get:

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ apps/master_app/rel/master_app/bin/master_app console
Using /vagrant/apps/master_app/rel/master_app/releases/0.0.1/master_app.sh
Exec: /vagrant/apps/master_app/rel/master_app/erts-7.3/bin/erlexec -boot /vagrant/apps/master_app/rel/master_app/releases/0.0.1/master_app -boot_var ERTS_LIB_DIR /vagrant/apps/master_app/rel/master_app/erts-7.3/../lib -env ERL_LIBS /vagrant/apps/master_app/rel/master_app/lib -config /vagrant/apps/master_app/rel/master_app/running-config/sys.config -args_file /vagrant/apps/master_app/rel/master_app/running-config/vm.args -user Elixir.IEx.CLI -extra --no-halt +iex -- console
Root: /vagrant/apps/master_app/rel/master_app
/vagrant/apps/master_app/rel/master_app
/vagrant/apps/master_app/rel/master_app/erts-7.3/bin/erlexec: 1: /vagrant/apps/master_app/rel/master_app/erts-7.3/bin/erlexec: Syntax error: word unexpected (expecting ")")

Thanks!

Master app not pulling in configs from apps under umbrella.

Just tried out the updated version and here's some observations.

  1. [Need clarification] I believe master_app/config/config.exs is supposed to hold configurations that is meant to override the individual apps default configuration values. Thus, app_one and app_two should be given working defaults instead of nil for port. And master_app can override them to different values.
  2. With this in mind, I removed the configs in master_app and restored the defaults in app_one and app_two for testing. Without running conform, executing the release based on master_app, doesn't pick up the port configs in app_one, app_two.
  3. [Need fix] Running conform.new crashes when master_app/config/config.exs doesn't contain any configuration. Adding a single config allows conform.new to execute successfully.
$ mix conform.new
==> ranch (compile)
==> cowlib (compile)
==> cowboy (compile)
==> The schema for your project has been placed in config/app_one.schema.exs
==> The schema for your project has been placed in config/app_two.schema.exs
** (ArgumentError) argument error
    :erlang.byte_size(["[", "extends: ", "[]", ",", "\n ", "import: ", "[]", ",", "\n ", "mappings: ", "[]", ",", "\n ", "transforms: ", "[]", ",", "\n ", "validators: ", "[]", "]"])
    lib/conform/schema.ex:289: Conform.Schema.stringify/2
    lib/conform/schema.ex:268: Conform.Schema.write_quoted/2
    lib/mix/tasks/conform.new.ex:46: Mix.Tasks.Conform.New.do_run/2
    (mix) lib/mix/project.ex:196: Mix.Project.in_project/4
    (elixir) lib/file.ex:1137: File.cd!/2
    lib/mix/tasks/conform.new.ex:20: anonymous fn/3 in Mix.Tasks.Conform.New.run/1
    (elixir) lib/enum.ex:1387: Enum."-reduce/3-lists^foldl/2-0-"/3
  1. [Not working as expected] After executing conform.configure, I checked the master_app.schema.exs, it's not yet picking up the port configs from app_one and app_two automatically. Sure enough, executing the master_app results in a crash from app_one not having a valid port.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.