commands.tex 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. \section{Commands}
  2. Synrc mad has a simple interface as follows:
  3. \vspace{1\baselineskip}
  4. \begin{lstlisting}
  5. MAD Container Tool version b547fa
  6. invoke = mad params
  7. params = [] | command [ options ] params
  8. command = app | deps | clean | compile | up
  9. | release [ beam | ling | script | runc ]
  10. | deploy | start | stop | attach | sh
  11. \end{lstlisting}
  12. \vspace{1\baselineskip}
  13. It seems to us more natural, you can specify random
  14. commands set with different specifiers (options).
  15. \subsection{deps, dep}
  16. In rebar-like managers we are selecting deps from rebar.config:
  17. \vspace{1\baselineskip}
  18. \begin{lstlisting}
  19. {sub_dirs,["apps"]}.
  20. {deps_dir,"deps"}.
  21. {deps, [active,{nitro,"2.9"},{n2o,"2.9"}]}.
  22. \end{lstlisting}
  23. \vspace{1\baselineskip}
  24. \subsection{compile, com}
  25. Performs compilation of all known compilations backends in complilation profile of mad:
  26. \vspace{1\baselineskip}
  27. \begin{lstlisting}
  28. app — app.src erlang templating
  29. dtl — DTL compiler
  30. erl — BEAM compiler
  31. c/c++ — for gcc cland and other native compilation
  32. script — .script file used in projects like gproc
  33. yrl/xrl — DSL language parser compilers
  34. upl — UPL compiler
  35. \end{lstlisting}
  36. \vspace{1\baselineskip}
  37. \subsection{release, rel, bundle, bun}
  38. Taking all dependecies and resolve boot sequence according to dependecy order.
  39. Storing this value in .applist. If release type is not defined ({\bf beam} in following example),
  40. then {\bf script} release will be taken as a default.
  41. \vspace{1\baselineskip}
  42. \begin{lstlisting}
  43. $ mad release beam sample
  44. Ordered: [kernel,stdlib,fs,ranch,crypto,compiler,syntax_tools,
  45. gproc,cowlib,cowboy,n2o,sample,active,erlydtl,jsone,
  46. mad,nitro,sh]
  47. *WARNING* : Missing application sasl. Can not upgrade with this release
  48. sample.boot: ok
  49. OK: "sample"
  50. $ mad rel mad
  51. Ordered: [kernel,stdlib,inets,sh,mad]
  52. OK: "mad"
  53. \end{lstlisting}
  54. \vspace{1\baselineskip}
  55. MAD supports several releasing backends:
  56. \vspace{1\baselineskip}
  57. \begin{lstlisting}
  58. script — script bundles, like mad itself
  59. beam — ERTS releases with systools
  60. ling — LING portable unikernels
  61. runc — Docker-compatible containers
  62. depot — releases from binary repositories
  63. \end{lstlisting}
  64. \vspace{1\baselineskip}
  65. \subsection{sh, repl, rep}
  66. Start REPL shell session.