netsec-ethz / rains

RAINS (Another Internet Naming Service)
Apache License 2.0
9 stars 11 forks source link

create a rainsd command #96

Closed britram closed 5 years ago

britram commented 5 years ago

Actually running a RAINS server requires someone to write Go code that instantiates and configures a RAINS server from objects defined in an internal package. This is not, how shall I put it, compatible with common operational practice.

To be reasonably deployable (e.g., in SCIONlab), we'll need a sciond that is designed to be run from various system management approaches (e.g. shudder systemd), taking its configuration from configuration files and command line arguments.

britram commented 5 years ago

This appears to be related to #87 and #36.

rayhaanj commented 5 years ago

I believe this is what this file implements: https://github.com/netsec-ethz/rains/blob/master/examples/server/main.go

It probably needs some cleanup but it is possible to just run that binary with a config file and the appropriate keys in the pwd. At least that is how the integration tests worked.

Probably doesn't help that it's in a folder called examples though.

fehlmach commented 5 years ago

The server can easily be set up by providing a config file. In this example it starts up a server and a publisher and publishes the zonefile: https://github.com/netsec-ethz/rains/blob/master/examples/rainsdServer/server.go

But we also want a cmd line program which allows to overwrite settings in a given config file. Similar to https://github.com/netsec-ethz/rains/blob/master/cmd/zonepub/zonepub.go

britram commented 5 years ago

which allows to overwrite settings in a given config file

Huh? not clear why rainsd needs to edit its configuration file?

fehlmach commented 5 years ago

Maybe the formulation was not specific enough: There are several ways to start up a server. Two of them would be: 1) Have a small program which takes the path to a config file and starts the server 2) Have a cmd line tool where you can specify all the server configs and those that are not specified have some default value or are loaded from a given config file.

I was referring to the second one.

britram commented 5 years ago

ah. override, not overwrite. sorry, got it :)