routinator
routinator copied to clipboard
routinator init does not read the paths from routinator.conf
I have the following:
ichilton@routinator:~$ cat /etc/routinator/routinator.conf
repository-dir = "/var/lib/routinator/rpki-cache"
tal-dir = "/var/lib/routinator/tals"
However, routinator init
writes: /home/routinator/.rpki-cache
.
This means I have to copy /home/routinator/.rpki-cache/tals/*
in to /var/lib/routinator/tals
as part of my deployment.
routinator.init should really use the paths configured in the config file.... or at least provide a parameter to specify the paths on the command line.
Thanks!
The only config file that Routinator picks up auto-magically is $HOME/.routinator.conf
. We debated this a bit but going through a list of possible files felt surprising. So, if you want it to use /etc/routinator/routinator.conf
, you have to specify this on the command line via the -c
option, i.e., routinator -c /etc/routinator/routinator.conf init
.
There also are options to specify the paths on the command line directly: -b
for the base directory (i.e., TALs go in tals
and the data in repository
under it), -t
for the TAL directory, and -r
for the repository directory.
All these work with all commands and go before the actual command.
Hi @partim,
Thanks for the info!
It's good news that the options are already available.
I believe they should be added to the help text...:
root@routinator:~# routinator init --help
routinator-init
Initializes the local repository
USAGE:
routinator init [FLAGS] [OPTIONS]
FLAGS:
--accept-arin-rpa You have read and accept https://www.arin.net/resources/manage/rpki/rpa.pdf
--decline-arin-rpa Same as '--skip-tal arin' (deprecated)
-f, --force Overwrite an existing TAL directory
-h, --help Prints help information
--list-tals List available TALs and exit
--rir-tals Install all RIR production TALs
--rir-test-tals Install all RIR testbed TALs
-V, --version Prints version information
OPTIONS:
--skip-tal <skip-tal>... Name a TAL not to be in installed
--tal <tal>... Name a TAL to be installed (--list-tals shows available TALs)
If none of --rir-tals, --rir-test-tals, or --tal is given, assumes --rir-tals.
Thanks,
Ian
I’ll look into if and how that is possible – these texts are auto-generated by the command line library we are using.
I’ll leave the issue open as a reminder.
Thank you! 👍
To confirm, I tested routinator -c /etc/routinator/routinator.conf init
and can confirm it does create the right paths. Much better! :)
So the only problem is indeed that it doesn't show those parameters in the help text.
Thanks,
Ian
I'll be sure to document this scenario as well.
In #607, I added an ‘after help’ message to all the subcommands that will be printed at the bottom of the help output and says ‘Additional global options are available. Please consult 'routinator --help' for those.’
This isn’t ideal but the best I can do without bigger changes.