Namdak Tonpa 9 years ago
parent
commit
9b8533db10
4 changed files with 70 additions and 19 deletions
  1. 32 1
      doc/commands.tex
  2. 33 10
      doc/deps.tex
  3. 1 1
      doc/index.tex
  4. 4 7
      doc/web/toc.tex

+ 32 - 1
doc/commands.tex

@@ -28,6 +28,38 @@ In rebar-like managers we are selecting deps from rebar.config:
 \end{lstlisting}
 \vspace{1\baselineskip}
 
+The search sequence for dependecies is follows. First mad will try to
+reach global package repository at \footahref{http://synrc.com/apps/index.txt}{http://synrc.com/apps/index.txt},
+this address is configurable. No application server is required for mad
+package management, only static files with OTP application format.
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+  {application,bpe,
+      [{description,"BPE SRC Business Process Engine"},
+       {vsn,"1.9"},
+       {registered,[]},
+       {applications,[kernel,stdlib,kvs,n2o]},
+       {dependencies,[kernel,stdlib,fs,ranch,crypto,mnesia,
+                      gproc,cowlib,kvs,cowboy,n2o,active,
+                      jsone,mad,nitro,sh,bpe]},
+       {mod,{bpe_app,[]}},
+       {env,[]},
+       {modules,[bpe,bpe_app,bpe_date,bpe_event,bpe_metainfo,bpe_proc,
+                 bpe_sup,bpe_task,default_railing,log_allow,routes,
+                 sampleproc,sampleproc_process]}]}.
+\end{lstlisting}
+\vspace{1\baselineskip}
+
+If no file is found or server is unavailable then application registry will
+be taken from mad built-in index.txt. If no luck then the name of application,
+e.g. "spawnproc/rete" will be interpreted as github repository address.
+
+\vspace{1\baselineskip}
+\begin{lstlisting}
+   $ mad dep active n2o kvs ling "spawnproc/rete"
+\end{lstlisting}
+\vspace{1\baselineskip}
 
 \subsection{compile, com}
 Performs compilation of all known compilations backends in complilation profile of mad:
@@ -71,7 +103,6 @@ MAD supports several releasing backends:
     beam — ERTS releases with systools
     ling — LING portable unikernels
     runc — Docker-compatible containers
-    depot — releases from binary repositories
 \end{lstlisting}
 \vspace{1\baselineskip}
 

+ 33 - 10
doc/deps.tex

@@ -2,7 +2,7 @@
 
 \subsection{OTP Compliant}
 
-mad supports rebar umbrella project structure.
+mad supports app files inside ebin, priv static folder and c_src ports directories points.
 Specifically two kinds of directory layouts:
 
 \vspace{1\baselineskip}
@@ -25,18 +25,41 @@ Specifically two kinds of directory layouts:
 \end{lstlisting}
 \vspace{1\baselineskip}
 
-\subsection{Apps Ordering}
+\subsection{Application Depot}
 
-As you may know you can create OTP releases with
-reltool (rebar generate) or systools (relx). mad currently
-creates releases with relx but is going to do it independently soon.
-Now it can only order applications.
+As you may know you can create OTP releases systools from sasl application.
+mad currently creates releases with systools, but manually manages binary access:
+from local erlang or public applcation depot.
+
+To bundle binary BEAM or LING along with synrc spplications MAD can use
+global repository statically avaliable at Github Pages:
 
 \vspace{1\baselineskip}
 \begin{lstlisting}
-    # mad plan
-    Ordered: [kernel,stdlib,mnesia,kvs,crypto,cowlib,ranch,
-              cowboy,compiler,syntax_tools,erlydtl,gproc,
-              xmerl,n2o,n2o_sample,fs,active,mad,rest,sh]
+
+  $ curl -X GET http://synrc.com/apps/index.txt
+  [ {bin,[beam],     ["7.0.3"]},
+    {lib,[active],   ["0.9"]},
+    {lib,[compiler], ["6.0"]},
+    {lib,[cowboy],   ["1.0.1"]},
+    {lib,[cowlib],   ["1.0.0"]},
+    {lib,[crypto],   ["3.6"]},
+    {lib,[erlydtl],  ["0.8.0"]},
+    {lib,[fs],       ["1.9"]},
+    {lib,[gproc],    ["0.3"]},
+    {lib,[jsone],    ["v0.3.3"]},
+    {lib,[kernel],   ["4.0"]},
+    {lib,[stdlib],   ["2.5"]},
+    {lib,[kvs],      ["2.9"]},
+    {lib,[mad],      ["2.9"]},
+    {lib,[mnesia],   ["4.13"]},
+    {lib,[n2o],      ["2.10"]},
+    {lib,[nitro],    ["0.9"]},
+    {lib,[ranch],    ["1.0.0"]},
+    {lib,[rest],     ["2.9"]},
+    {lib,[review],   ["2.9"]},
+    {lib,[sh],       ["1.9"]},
+    {lib,[syntax_tools], ["1.7"]} ].
+
 \end{lstlisting}
 \vspace{1\baselineskip}

+ 1 - 1
doc/index.tex

@@ -1,4 +1,4 @@
-\section{MAD: Erlang Build and Deploy Tool}
+\section{MAD: Erlang Containers}
 
 \subsection{History}
 

+ 4 - 7
doc/web/toc.tex

@@ -3,12 +3,9 @@
 \paragraph{}
 \footahref{http://synrc.com/apps/mad/doc/web}{Overview} \@br
 \footahref{http://synrc.com/apps/mad/doc/web/setup.htm}{1. Setup} \@br
-\footahref{http://synrc.com/apps/mad/doc/web/config.htm}{2. Configuration} \@br
-\footahref{http://synrc.com/apps/mad/doc/web/commands.htm}{3. Commands} \@br
-%\footahref{http://synrc.com/apps/mad/doc/web/scripts.htm}{5. Scripts} \@br
-\footahref{http://synrc.com/apps/mad/doc/web/deps.htm}{4. Deps} \@br
-\footahref{http://synrc.com/apps/mad/doc/web/bundles.htm}{6. Bundles} \@br
-%\footahref{http://synrc.com/apps/mad/doc/web/ports.htm}{7. Ports} \@br
-
+\footahref{http://synrc.com/apps/mad/doc/web/deps.htm}{2. Deps} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/config.htm}{3. Configuration} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/commands.htm}{4. Commands} \@br
+\footahref{http://synrc.com/apps/mad/doc/web/bundles.htm}{5. Bundles} \@br
 \footahref{http://synrc.com/apps/mad/doc/book.pdf}{Download PDF} \@br
 %HEVEA \end{divstyle}