1 Much more information on these topics can be found at www.erlware.org
3 # Downloading Dependencies
5 OTP Base requires a few erlang packages in order to run correctly. To get
6 these applications we use Erlware Faxien which can be downloaded from
7 'http://code.google.com/p/faxien' and use it to install the required packages.
9 1. Bootstrap Faxien with the appropriate bootstrapper from the download site.
11 2. Use faxien install to install the erl release which provides the Erlang
12 shell and the erlc compiler.
13 * `sudo /usr/local/erlware/bin/faxien install erl`
15 3. Install the following apps with 'faxien install-app'.
16 * `sudo /usr/local/erlware/bin/faxien install-app fslib`
17 * `sudo /usr/local/erlware/bin/faxien install-app gas`
18 * `sudo /usr/local/erlware/bin/faxien install-app eunit`
19 * Tip The Faxien release itself uses all the apps listed above so
20 instead of installing them all separately you can save time by simply
21 using the upgrade command to upgrade the existing versions to the
22 latest greatest. Do this as follows: `sudo /usr/local/erlware/bin/faxien upgrade-all-apps`
24 at this point you should be ready to go.
28 To build, type make, it should all work from there. Applications are built
29 under the 'lib' dir and releases under the 'release' directory.
31 # Creating a new application
33 A new application can be created by using the `tools/application_generation`
34 utility. This utility will create a basic OTP application framework under the
37 usage: application_generation <app-name> <prefix>
39 Appname is the name of the application that you would like to create. The
40 prefix is usually the first letter of each word in the appname. This prefix is
41 to avoid name clashes between applications included in a release (Erlang has a
44 example usage: application_generation my_app ma
50 # Creating a new release
52 A release is the OTP packaging structure that binds together a number of
53 applications, configuration, and startup scripts to create a standalone
54 Erlang service. To create a new release from which to run your application(s)
55 you can use the tools/release_generation script.
57 usage: release_generation <release-name>
58 example usage: release_generation test
60 The example above will create a release called test under release/test
64 Your release should contain all that you need to run your application.
65 You have only to edit your .rel.src file to add to it the applications you
66 have developed over in the lib side. If your application depends on any
67 applications that are supplied outside of your otp-base build tree you can
68 always install them with faxien and then add them to your .rel.src file as well.
70 To run a release there are two options: The first is local. A local version
71 can be found in the `release/<release-name>/local` directory which is added by
72 the make process. This should be used during development to run your release
73 interactively via an Erlang shell. To run a release in local mode cd into the
74 "local" directory and run `<release-name>.sh`.
76 In the case where you want to create a production ready release on one machine
77 and then deploy it on multiple identical machines with faxien you may create
78 a production package with `make package`. To do this run make package from the
79 `release/<release-name>` directory. This will create a directory
80 `<release-name>-<release-vsn>`. This this directory can be tarred up and the
81 tar can be shipped to its destination and installed with faxien. This
82 directory may also be published to a repo for remote installation on another
83 box via faxien. See the docs for faxien at erlware.org for more details on this.
85 Finally, if you simply want to build and install your application locally all in
86 go run: `make install`.