[erlang-questions] Erlang/OTP Embedded Systems in Solaris 10

Serge Aleynikov saleyn@REDACTED
Tue Aug 7 14:05:43 CEST 2007


I also think it would be quite helpful for the Erlang development 
community to have such tutorials for both Solaris and Linux.

We also always followed embedded systems installation approach for 
deploying Erlang/OTP projects.  In terms of installation, in our case it 
turned out to be more convenient to have subdirectories under the home 
directory of the user account (such as "otpuser") for different embedded 
systems.  We would normally create different user accounts for 
production/qa/dev environments (otpuser, otpuserqa, otpuserdev) that 
would have installation configured for a corresponding environment 
(actually all configuration files would be pulled and cached from some 
centralized place over HTTP using inets, so that local installation 
would only need to explicitly specify the environment type, and 
system/release/host/node would be auto-inferred).

Here's a typical layout for a project consisting of two embedded systems 
("SystemA" and "SystemB"):

otpuser
   |
   +-- SystemA
   |      +-- bin             - For user binaries and scripts
   |      +-- lib             - Erlang apps
   |      |    +-- app1-X.Y
   |      |    +-- app2-X.Y
   |      +-- erts-X.Y.Z      - Run-time system
   |      +-- releases
   |      |    +-- 1.0        - Release specific config/boot stuff
   |      +-- var/log         - Log files
   |      +-- var/mnesia      - Mnesia files
   |      +-- tmp             - Volatile data
   |      +-- sbin            - SysV startup and other scripts
   +-- SystemB
   |      +-- bin
   |      +-- lib
   |      |    +-- app1-X.Y
   |      |    +-- app2-X.Y
   |      +-- erts-X.Y.Z
   |      +-- releases
   |      |    +-- 1.0
   |      +-- var/log
   |      +-- var/mnesia
   |      +-- tmp
   |      +-- sbin
   +-- SystemC
        ...

with this approach it is possible to run different projects 
independently using the same operational guidelines.  Also upgrading 
becomes easier as the systems are completely independent.

Serge

Vance Shipley wrote:
> For many years now I have been following the Embedded Systems
> User's Guide for installing Erlang/OTP on servers which will
> run applications in a production environment.  I have refined
> the procedures documented there over the years but in general
> I follow the recommendations with an "otpuser" account with
> the "otp" group and installing in that user's home directory.  
> 
> I have over the years rewriten the S75otp.system rc script
> but it still calls the start script provided by OTP.  I have
> added a stop script and made other subtle improvements.
> 
> The Embedded Systems User's Guide hasn't changed in all that
> time.  This can be seen in this statement:
> 
>    "Several of the procedures described below require expert
>     knowledge of the Solaris 2 operating system."
>                      ^^^^^^^^^
> 
> Since everything I am doing these days is on Solaris 10 I have
> reached the point where I want to make some fundamental changes.
> Solaris 10 has introduced the Service Management Facility (SMF)
> which replaces init with advanced functionality for managing
> services as collections of processes with dependencies and 
> making sure they keep running.  While SMF has replaced init it
> does support legacy rc scripts however without the extended
> functionality.
> 
> I have started to build the service bundles which are XML files
> describing the dependencies, start up methods, etc.  This
> could be simple enough but I started to wonder about things 
> like whether I should start epmd from SMF and should I assume
> the role of the OTP start script and possible run_erl.
> 
> I'd like to ask for any experiences or suggestions before I 
> go too far.  Ultimately I would like to see a new version of
> the Embedded Systems User's Guide for Solaris.  I'll be happy
> to write it if I have support for it.
> 
> For a while now I have also been packaging new Erlang/OTP releases
> into Solaris packages which can be installed with pkgadd(1M) to
> create running embedded systems.  I was planning to document
> this as well, possibly in a trapexit howto.
> 
> 	-Vance
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 




More information about the erlang-questions mailing list