Skip to content

Commit 16446c2

Browse files
committed
Improve Dependencies section, link to it, move to Advanced
1 parent a471c37 commit 16446c2

File tree

3 files changed

+67
-40
lines changed

3 files changed

+67
-40
lines changed

content/admin/install/source.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ This account needs a HOME directory, because the [Erlang cookie file](../guide/s
171171

172172
### `make`
173173

174-
This gets the erlang depencies and compiles everything, among other tasks:
174+
This manages many tasks:
175175

176-
- Get, update, compile dependencies; clean files
176+
- Download and compile [erlang dependencies](../../developer/repositories.md)
177+
- Compile ejabberd
177178
- [System install](#system-install), uninstall
178179
- Build OTP [production](#production-release) / [development](#production-release) releases
179180
- Development: edoc, [options](../../developer/guide.md#configuration), [translations](../../developer/extending-ejabberd/localization.md), tags
@@ -185,8 +186,6 @@ Get the full task list:
185186
make help
186187
```
187188

188-
*Note*: The required erlang dependencies are downloaded from Internet. Or you can copy `$HOME/.hex/` package cache from another machine.
189-
190189
## Install
191190

192191
There are several ways to install and run ejabberd after it's compiled from source code:

content/developer/repositories.md

Lines changed: 63 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,88 @@
11
# Understanding ejabberd and its dependencies
22

3+
## Overview
4+
35
We wanted to make sure that ejabberd is modular and that parts that can be of interest for other Erlang projects can be reused.
46

57
Not only we are massive open source contributors to Erlang community and ecosystem, but we are also trying to help even more by reviewing your pull requests. Do not hesitate to submit some on any of the many repositories mentioned here.
68

7-
## ejabberd dependencies
9+
ejabberd codebase is split among several repositories, so effectively ejabberd code is much more than what is in its primary repository. And each of those repositories is now a dependency of ejabberd.
10+
11+
## Build tools
12+
13+
The dependencies are managed differently depending on the build tool being used:
14+
15+
* [Elixir Mix](https://hexdocs.pm/mix/Mix.html)
16+
17+
- reads dependencies from file `mix.exs` (package version or git commit):
18+
```elixir
19+
{:fast_tls, ">= 1.1.18"}
20+
{:yconf, git: "https://github.com/processone/yconf",
21+
ref: "9898754f16cbd4585a1c2061d72fa441ecb2e938",
22+
override: true}
23+
```
24+
- downloads package from [hex.pm](https://hex.pm/), or git repository
25+
- caches package in `$HOME/.hex/`
26+
- and compiles in `deps/`
27+
28+
* [Rebar3](https://rebar3.org/)
29+
30+
- reads dependencies from file `rebar.config` (package version or git commit):
31+
```erlang
32+
{fast_tls, "~> 1.1.19", ...}
33+
{yconf, ".*", {git, "https://github.com/processone/yconf",
34+
"9898754f16cbd4585a1c2061d72fa441ecb2e938"}}
35+
```
36+
- downloads package from [hex.pm](https://hex.pm/), or git repository
37+
- caches package in `$HOME/.cache/rebar3/hex/`
38+
- and compiles in `_build/default/lib/`
39+
40+
* [Rebar2](https://github.com/rebar/rebar/wiki)
841

9-
ejabberd code based is split among several repositories so effectively ejabberd code is much more than what is in its primary repository.
42+
- reads dependencies from file `rebar.config` (git tag or git commit):
43+
```erlang
44+
{fast_tls, ..., {git, "https://github.com/processone/fast_tls",
45+
{tag, "1.1.24"}}}
46+
{yconf, ..., {git, "https://github.com/processone/yconf",
47+
"9898754f16cbd4585a1c2061d72fa441ecb2e938"}}
48+
```
49+
- downloads from the corresponding git repository
50+
- does not cache it
51+
- and compiles in `deps/`
1052

11-
### Required dependencies
53+
The dependencies are automatically downloaded from Internet, if not already cached on your machine.
54+
Alternatively, you can copy the cache directory from another machine.
1255

13-
The main ejabberd repository is [processone/ejabberd](https://github.com/processone/ejabberd)
56+
## Mandatory
1457

58+
The main ejabberd repository is [processone/ejabberd](https://github.com/processone/ejabberd).
1559
There is hundreds of forks, but we actively maintain ejabberd to make it the most reliable and up to date version. This is thus your best starting point.
1660

1761
When you build ejabberd yourself, the build chain will download a few Erlang dependencies:
1862

1963
* [processone/cache_tab](https://github.com/processone/cache_tab): Flexible in-memory Erlang caching module.
20-
* [processone/iconv](https://github.com/processone/iconv): Native iconv driver for Erlang. This is use for fast character encoding conversion.
64+
* [processone/fast_tls](https://github.com/processone/fast_tls): Erlang native driver for TLS / SSL. It is build for performance and is more scalable that Erlang SSL driver. If your Erlang server is handling heavy load and is using TLS, we strongly recommend you check / compare with this driver.
2165
* [processone/fast_xml](https://github.com/processone/fast_xml): Fast native Expat based Erlang XML parsing library. XML is the core of XMPP so we needed to provide the fast and more robust XML parsing stack as possible. It means that if you are looking for a great XML parser, reusing p1_xml is probably a great idea.
22-
* [processone/stringprep](https://github.com/processone/stringprep): Fast and efficient Erlang Stringprep native driver. Stringprep is heavily used in XMPP to define encoding rules of various XMPP objects.
2366
* [processone/fast_yaml](https://github.com/processone/fast_yaml): Native Erlang interface to libyaml, for fast robust YAML parsing. This is needed by our new config file format.
24-
* [processone/ezlib](https://github.com/processone/ezlib): Native zlib driver for Erlang. Used for fast / efficient stream compression.
25-
* [processone/fast_tls](https://github.com/processone/fast_tls): Erlang native driver for TLS / SSL. It is build for performance and is more scalable that Erlang SSL driver. If your Erlang server is handling heavy load and is using TLS, we strongly recommend you check / compare with this driver.
26-
* [processone/esip](https://github.com/processone/esip): ProcessOne SIP protocol support to add SIP-based voice capabilities to ejabberd.
27-
* [processone/stun](https://github.com/processone/stun): Implementation of [Session Traversal Utilities for NAT](https://en.wikipedia.org/wiki/STUN). It is used for XMPP and SIP media capabilities, to help client discover their visible IP address and allow them to get in touch through NAT. This is basically useful for voice and file transfers.
67+
* [processone/iconv](https://github.com/processone/iconv): Native iconv driver for Erlang. This is use for fast character encoding conversion.
2868
* [processone/p1_utils](https://github.com/processone/p1_utils): This is extra Erlang modules developed for ejabberd but that can be useful in other Erlang applications.
29-
* [processone/p1_logger](https://github.com/processone/p1_logger): Logger wrapper to allow selecting your preferred logger at build time.
69+
* [processone/stringprep](https://github.com/processone/stringprep): Fast and efficient Erlang Stringprep native driver. Stringprep is heavily used in XMPP to define encoding rules of various XMPP objects.
3070
* [basho/lager](https://github.com/basho/lager): Erlang logger module.
31-
* [DeadZen/goldrush](https://github.com/DeadZen/goldrush): Small Erlang app that provides fast event stream processing. It is used by lager.
32-
* [vaxelfel/eHyperLogLog](https://github.com/vaxelfel/eHyperLogLog): HyperLogLog, a distinct values estimator, in Erlang. Used for analytics.
3371

34-
### Optional dependencies
72+
## Optional
3573

36-
Then, we use a few other dependent repositories that may be used if you have enabled support in the configure script.
37-
38-
Here are the dependencies for relational database support:
74+
Then, we use a few other dependent repositories that may be used if you have enabled support
75+
in the [`./configure` script](../admin/install/source.md#configure):
3976

77+
* [processone/epam](https://github.com/processone/epam): epam helper for Erlang / Elixir PAM authentication support
78+
* [processone/erlang-sqlite3](https://github.com/processone/erlang-sqlite3): Sqlite gen_server port for Erlang.
79+
* [processone/esip](https://github.com/processone/esip): ProcessOne SIP protocol support to add SIP-based voice capabilities to ejabberd.
80+
* [processone/ezlib](https://github.com/processone/ezlib): Native zlib driver for Erlang. Used for fast / efficient stream compression.
4081
* [processone/mysql](https://github.com/processone/mysql): Pure Erlang MySQL driver.
4182
* [processone/pgsql](https://github.com/processone/pgsql): Pure Erlang PostgreSQL driver
83+
* [processone/stun](https://github.com/processone/stun): Implementation of [Session Traversal Utilities for NAT](https://en.wikipedia.org/wiki/STUN). It is used for XMPP and SIP media capabilities, to help client discover their visible IP address and allow them to get in touch through NAT. This is basically useful for voice and file transfers.
84+
* [Nordix/eredis](https://github.com/Nordix/eredis): Erlang Redis client
85+
* [rvirding/luerl](https://github.com/rvirding/luerl): Lua in Erlang
4286

43-
Here are the dependencies for Elixir support:
44-
45-
* [elixir-lang/elixir](https://github.com/elixir-lang/elixir): Used to write ejabberd modules in Elixir programming language.
46-
* [yrashk/rebar_elixir_plugin](https://github.com/yrashk/rebar_elixir_plugin): Plugin for rebar build tool to support Elixir modules compilation.
47-
48-
After you have build ejabberd from source, you will find all the dependencies downloaded and build in the _deps_ directory.
49-
50-
As you see, there is much more Erlang code produce at ProcessOne and contributed to the Erlang community than just ejabberd repository.
51-
52-
## ejabberd contributions
53-
54-
This is not dependencies, but simply modules that you may find nice to add to your ejabberd deployment.
55-
56-
We attempted to gather some of the more useful ejabberd modules in a contribution repository to ease discovery.
57-
58-
This repository is available on Github: [ejabberd-contribs](https://github.com/processone/ejabberd-contrib)
59-
60-
We are thinking about a better approach for ejabberd contributions discovery. More on that soon.
87+
On the other hand, you can install additional ejabberd modules
88+
from the [ejabberd-contrib repository](../admin/guide/modules.md#ejabberd-contrib).

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ nav:
242242
- admin/guide/index.md
243243
- Architecture: developer/extending-ejabberd/architecture.md
244244
- Clustering: admin/guide/clustering.md
245+
- Dependencies: developer/repositories.md
245246
- Managing: admin/guide/managing.md
246247
- Modules / Contrib: admin/guide/modules.md
247248
- Security: admin/guide/security.md
@@ -264,7 +265,6 @@ nav:
264265
- " Contributing": contributing/index.md
265266
- " Contributor Convenant": contributing/CODE_OF_CONDUCT.md
266267
- " Contributors": contributing/CONTRIBUTORS.md
267-
- Dependencies: developer/repositories.md
268268
- Docs: README-DOCS.md
269269
- Elixir Dev: developer/extending-ejabberd/elixir.md
270270
- Livebook: livebooks/ejabberd-developer-livebook.md

0 commit comments

Comments
 (0)