ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.72k stars 913 forks source link

Refactor #812

Open ytti opened 7 years ago

ytti commented 7 years ago

Reminder for myself, what things we need to fix when/if refactoring the core.

  1. Move state from memory to sqlite. Only keep in memory being fetched right now. So that we scale as number of threads, instead as number of devices
  2. Allow models to use multiple input methods, you may want to use ssh to send config, and ftp to actually receive it
  3. Extend support of creating multiple files from models, current use-case only conveniently supports creating files in new directories or in new repos. But for stacks, virtual firewalls etc. you might want to create multiple normal files
  4. Support multiple source files (multiple times same type, and/or combination of different types)
  5. Support multiple outputs
  6. Separate device interaction to own library, make Oxidized client of the library
  7. Flexible naming of files directory/%g/%t/%n:%p, replacement with group, type, node, port, model, command...
  8. Nested groups (unsure) /country/pop ... /customer/x
  9. one off run of all devices or just one devices, even while running daemon as well
    1. more hooks, for example when single rotation has been done
    2. testing (eeh, at least for refactored code)
MajesticFalcon commented 7 years ago

Working on #6 now

ytti commented 6 years ago
  1. we should support routers pushing config to us, http, ftp, tftp.. listener thread, with worker fetching configs from listener threads via Queue
  2. API should be changed to Swagger and return only JSON, with HTTP rendering at client side code + 0touch LE integration
  3. review issues to see what users are missing :/
ytti commented 6 years ago

with https://github.com/mitchellh/go-mruby we could rewrite oxidized in golang, but continue supporting ruby device models. Ship everything in single binary, but still support loading local ruby models.

aakso commented 6 years ago

I've been toying with the possible implementation of a go version of Oxidized and so far it seems to be a viable option. The models can be indeed left as ruby code and use the go-mruby to evaluate them.

Some benefits regarding the go-rewrite:

And the downsides:

I'm planning to release a PoC codebase in coming month(s) or so. So far I have the model evaluator and some basic Input modules done.

sts commented 5 years ago

Deployment could be fixed by shipping as Docker container or providing classical pre-build packages (eg. https://github.com/jordansissel/fpm)?

ytti commented 5 years ago
  1. as we separate device interaction from configuration backups we should further develop another software which collects formal set of normalised data from supported devices with motivation of having programmatic platform agnostic access to the data