1 Much more information on these topics can be found at www.erlware.org
3 Downloading Dependencies
4 ========================
6 OTP Base requires a few erlang packages in order to run correctly. To get these applications we use Erlware Faxien which can be downloaded from 'http://code.google.com/p/faxien' and use it to install the required packages.
8 1. Bootstrap Faxien with the appropriate bootstrapper from the download site.
10 2. Install the 'erl' release package with 'faxien install' to provide an Erlang shell on your system. To do this run:
11 - 'sudo /usr/local/erlware/bin/faxien install erl'
13 3. Install the following apps with 'faxien install-app'.
14 - 'sudo /usr/local/erlware/bin/faxien install-app fslib'
15 - 'sudo /usr/local/erlware/bin/faxien install-app gas'
16 - 'sudo /usr/local/erlware/bin/faxien install-app eunit'
17 *Tip* The Faxien release itself uses all the apps listed above so instead of installing them all separately you can save time by simply using the upgrade command to upgrade the existing versions to the latest greatest. Do this as follows: 'sudo /usr/local/erlware/bin/faxien upgrade-all-apps'
19 at this point you should be ready to go.
24 To build, type make, it should all work from there. Applications are built under the 'lib' dir and releases under the 'release' directory.
26 Creating a new application
27 ==========================
29 A new application can be created by using the tools/application_generation utility.
30 This utility will create a basic OTP application framework under the lib directory
32 usage: application_generation <app-name> <prefix>
34 Appname is the name of the application that you would like to create. The prefix is
35 usually the first letter of each word in the appname. This prefix is to avoid name
36 clashes between applications included in a release (Erlang does not have packages).
38 example usage: application_generation my_app ma
44 Creating a new release
45 ======================
47 A release is the OTP packaging structure that binds together a number of applications, configuration, and startup scripts to create a standalone Erlang service. To create a new release from which to run your application(s) you can use the tools/release_generation script.
49 usage: release_generation <release-name>
50 example usage: release_generation test
52 The example above will create a release called test under release/test
57 Your release should contain all that you need to run your application. You have only to edit your .rel.src file to add to it the applications you have developed over in the lib side. If your application depends on any applications that are supplied outside of your otp-base build tree you can always install them with faxien and then add them to your .rel.src file as well.
59 To run a release there are two options: The first is local. A local version can be found in the release/<release-name>/local directory which is added by the make process. This should be used during development to run your release interactively via an Erlang shell. To run a release in local mode cd into the "local" directory and run <release-name>.sh.
61 In the case where you want to create a production ready release on one machine and then deploy it on multiple identical machines you may create a production package with 'make pacakge'. To do this run 'make package' from the release/<release-name> directory. This will create a directory '<release-name>-<release-vsn>. This this directory can be tarred up and the tar can be shipped to its destination and installed with faxien. This directory may also be published to a repo for remote installation on another box via faxien. See the docs for faxien at erlware.org for more details on this.