What is CEAN ?

Here is the description of CEAN presented at the 12th Erlang User Conference EUC06-CEAN.pdf. It is:

  • an Erlang distribution system for both applications and Erlang/OTP framework.
  • multi-platform: supports many operating systems and architectures
  • lightweight Erlang: ~4Mb installed size for the minimal system
  • easy to install: self extractable archive, automatic install/uninstall/upgrade using Erlang shell
  • easy to use: don't care about modules dependencies, CEAN handles that for you
  • usefull to create custom Erlang/OTP installation or for installing a minimal Erlang framework

Installation

You can install the CEAN base system (that includes a minimal Erlang system) using two methods:

  • download the self extractable installer (Windows not supported yet), and launch it. Then cean is installed into the current directory, and Erlang/OTP is started. (You can add "-noshell" parameter for erlang shell not being started after installation)
    $ sh ./cean_installer.bin
    
  • download the base archive (available on all platforms), and extract it.
    $ unzip cean_base.zip (on Windows)
    $ tar zxf cean_base.tar.gz (on unix compatible systems)
    $ gunzip cean_base.tar.gz | tar -xf - (if your tar version does not support -z flag)
    

Using a proxy

If you need to run CEAN behind a firewall, you can edit etc/cean.cfg and define the HTTP_PROXY value to your.proxy.server:port.

Usage

Standalone

To start CEAN Erlang/OTP, click on the cean icon (under Windows and MacOS only), or go to the cean directory and launch the start script:

$ ./start.sh
This is equivalent to start CEAN's Erlang:
$ bin/erl

Cluster

A CEAN cluster can be managed by keeping nodes alive. To start a CEAN node, use ceanctl:

$ bin/ceanctl start
This operation must be done on all cluster hosts. To get a shell on a running node, use the shell command:
$ bin/ceanctl shell                    # connects to local node
$ bin/ceanctl shell host2.cluster.net  # connects to given node
You can then add/remove running nodes to the CEAN cluster (nodes must be ssh accessible)
$ bin/ceanctl deploy host1.cluster.net
$ bin/ceanctl start host1.cluster.net
$ bin/ceanctl stop host1.cluster.net
You can install a package, and sync all cluster nodes from the current node
$ bin/ceanctl install mnesia
$ bin/ceanctl sync
Finally you can stop a CEAN node. Note that stopping a node automatically removes it from the cluster.
$ bin/ceanctl stop

Available commands

It is possible to install/upgrade/uninstall your Erlang installation using the Erlang shell. No version control is done, only the lattest version of each package is provided. No need to care about downloading and installing into your OTP library directory, CEAN takes care of everything and installs all dependencies.

  • give some help
    > cean:help().
  • list available packages
    > cean:available().
  • list installed packages
    > cean:installed().
  • check for an installed package (returns true/false)
    > cean:installed(mnesia).
  • search for packages using keywords
    > cean:search("web server").
  • install a package (mnesia as example)
    > cean:install(mnesia).
  • uninstall a package (mnesia as example)
    > cean:uninstall(mnesia).
  • check new versions of installed packages
    > cean:new().
  • upgrade a package (ejabberd as example)
    > cean:upgrade(ejabberd).
  • upgrade the whole distribution
    > cean:upgrade().
  • check installed CEAN version
    > cean:version().