3

I do have a simple elixir app running on one node, exrm is doing his job properly by upgrading/downgrading it when needed.

I decided recently to create two nodes (it will be on two separates machines but i want to test it first on localhost)

So i read the following Chris McCord article

https://dockyard.com/blog/2016/01/28/running-elixir-and-phoenix-projects-on-a-cluster-of-nodes

and i have now two nodes,

n1@127.0.0.1

and

n2@127.0.0.1

with the following added to mix config

config :kernel,
  sync_nodes_optional: [:"n1@127.0.0.1", :"n2@127.0.0.1"],
  sync_nodes_timeout: 10000

I was used to do the following

mix release
ssh targethost mkdir deploy/releases/x.x.x
scp rel/sequence/releases/x.x.x/appname.tar.gz targethost:deploy/releases/x.x.x
ssh targethost ~/deploy/bin/appname upgrade x.x.x

May someone guide me on what to do to deploy upgrade/downgrade both nodes?

Kind regards,

Pierre

Nathan
  • 8,093
  • 8
  • 50
  • 76
Tanc
  • 667
  • 3
  • 6
  • 25

1 Answers1

0

Exrm is a tool for packaging, but what you wanna is a tool for deploying.

You should modified the nodename in vm.args during deploying. I use fabfile to do this.

Or maybe you want it: deploying-elixir-applications-with-edeliver

keroro520
  • 459
  • 4
  • 12