This is an Erlang node that contains:
Table of Contents
- Erlang R17+
- npm
To build the application call: make
. This will:
- download the dependencies,
- compile the code,
- copy the
dobby_ui_lib
nodeJS artefact to thedobby_rest/priv/static/www
- generate an Erlang release,
- generate ssh keys
- private and public user keys:
ida_rsa
andid_rsa.pub
respectively in the project root directory - public and private system keys in the
priv/erl_sshd
that will be used by the ssh deamon running in the Erlang node authorized_keys
file that will already have the previously generated user public key
- private and public user keys:
You may add your own public keys to the authorized_keys
file in
priv/erl_sshd
(remember to make rel
afterwards).
If you want to connect to the dobby Erlang shell using ssh with
a username and password, add or modify the usernames and passwords
to the erl_sshd
section of config/sys.config
.
_rel/ivancp_allinone/bin/ivancp_allinone
To access the Dobby Visualizer go to http://localhost:8080/static/www/index.html
You can follow an example on how to use Dobby Publishers with Lucet.
If you genereated keys in erl_sshd before generating the dobby release, you can connect to the dobby server's Erlang shell using ssh.
ssh 127.0.0.1 -p 11144 -i id_rsa
To exit the Erlang shell obtained via ssh call exit().
To enable TLS support for the HTTP interface you have to configure it in the erl_cowboy
application and provide the following options:
- certificate file name (expected in the
priv/erl_cowboy
) - key file name (expected in the
priv/erl_cowboy
) - password to the key if it is password protected
The configuration has to be placed in the sys.config file. Below is an example:
[
...
{erl_cowboy, [
{port, 8080},
{listeners, 10},
{app, 'ivancp_allinone'},
{tls_enabled, true},
{tls_opts, [{certfile, "dummy.crt"},
{keyfile, "dummy.key"},
{password, ""}]}
]},
...
]
There is a sample certificate and key generator that you can run with:
make tls
.
The above example config works with the generated files. To test the TLS,
put the config snippet into the config/sys.config
. Remember
to re-generated the release after the change.
With TLS enabled, the Visualizer can be accessed via https://localhost:8080/static/www/index.html.