Multple Application Management

Ulf Wiger <>
Tue Dec 4 10:33:00 CET 2001


On Mon, 3 Dec 2001, Martin J. Logan wrote:

>Hello,

>I am wondering if anyone can help point me in the correct
>direction for the deployment of multimple applications on one
>node. Currently I manage applications on a per application
>basis i.e they are started individually. I start the runtime
>system pointing it to the script and boot files that I
>genereated for that particular application using systools.

Hmm, there isn't really a short answer for this one, but let's
give it a go.

- Let's say you want to build a system called 'mysystem', which
  is made up of the applications 'a' and 'b'. You would then first
  write a .rel file:

mysystem.rel:

{release,{"mysystem","1.0"},
         {erts,"5.0.2.11"},
         [{kernel,"2.6.3.6"},
          {stdlib,"1.9.4.2"},
          {sasl,"1.9.2"},
          {mnesia,"3.10.3"},
          {a,"0.9"},
          {b,"0.7"}]}.

- You pick a directory under which to install the system, let's
  say /usr/local/lib/mysystem/

- You create a directory for the release files:

/usr/local/lib/mysystem/releases/1.0

(where 1.0 is the system version listed in mysystem.rel)
Copy mysystem.rel into the above directory.

- I will assume that your applications are in the following path:

/usr/local/lib/mysystem/lib/a/ebin
/usr/local/lib/mysystem/lib/b/ebin

- Go to the releases/1.0 directory, start an erlang shell, and
  write:

   systools:make_script(
         "mysystem",
         [{path, ["/usr/local/lib/mysystem/lib/*/ebin"]}]).


This will (if you're lucky) generate a start.script and a
start.boot file.


- You can then start your system using the command:

erl -boot /usr/local/lib/mysystem/releases/1.0/start


There is normally more to it than that, but if you do it in this
way, you can then build on it to add more sophisticated release
handling.

If your applications need to start in a specific order, e.g. 'b'
cannot start until 'a' is started, then you would put the
following attribute in b's .app file:

  {applications, [a]}

Then, systools will make sure that the application start
instructions arrive in the right order, and the application
controller will honor the dependency.

/Uffe

>I want to run two applications on the same box so pointing the
>system to the script and boot files generated for specific apps is not
>feasable. I would like to have all the startup info in one central location
>so that all the apps I woudl like started on a box would come up when I start
>the the run time system. I have messed with the start.script file but this
>requires me to edit it manually which I understand from the docs is not the
>preferred way to go about things. Could someone point me tword the proper way
>to manage somthing like this? What method lies in accordence with the way the
>run time system was designed?
>                Thanks,
>                Martin Logan
>
>

-- 
Ulf Wiger, Senior Specialist,
   / / /   Architecture & Design of Carrier-Class Software
  / / /    Strategic Product & System Management
 / / /     Ericsson Telecom AB, ATM Multiservice Networks




More information about the erlang-questions mailing list