Emulated vault#4097
Conversation
|
Can one of the admins verify this patch? |
0525ab9 to
d80c2c5
Compare
ocket8888
left a comment
There was a problem hiding this comment.
Missing license headers in all files.
|
Please fill out the Pull Request template to the best of your ability, and avoid deleting it entirely. |
09495d1 to
40f4119
Compare
ocket8888
left a comment
There was a problem hiding this comment.
The vast majority of this Python code-base could use some type-hinting and docstrings
ocket8888
left a comment
There was a problem hiding this comment.
Also isn't compatible with modern Python
f635bc0 to
edad420
Compare
|
@ocket8888
|
|
That's certainly fine with me, especially since this is experimental. I'll try to be a bit lax about the contribution guidelines as well, with that fact that it is experimental in mind. |
ocket8888
left a comment
There was a problem hiding this comment.
I made some comments about how to approve your linter score above 4/10, but that's not strictly necessary for experimental code if you're strongly opposed to it.
Your files vault-debug and vault-server both start with "shebang"s (#!s) and don't end with .py which seems to indicate that they should be executable, and I think your unit file expects that as well. However, the files themselves are not executable - should they be?
f4bf9cf to
01b2060
Compare
ocket8888
left a comment
There was a problem hiding this comment.
Looks good at a glance. I'll run it through the linter again after this one small fix. I don't think I'll test it, since it's experimental.
Supporting python 2 & 3
fe2336d to
57b144a
Compare
|
@ocket8888 Any additional AIs on my side? |
ocket8888
left a comment
There was a problem hiding this comment.
The linter found a couple of bugs
ocket8888
left a comment
There was a problem hiding this comment.
Looks fine, net positive linting score, untested but experimental.
What does this PR (Pull Request) do?
The PR introduces the
emulated_vaultmodule which supplies a HTTP server mimicking RIAK behavior for usage as Traffic Vault.It may be used in order to replace RIAK-based Traffic Vault, as it is much more simple to install.
The server may use different type of persistent storage (e.g. file-system), using the proper adapter.
The resiliency of the stored keys is derived from the resiliency of the underlying storage.
Which Traffic Control components are affected by this PR?
None by default.
It introduces a module that may replace the RIAK-based Traffic Vault.
What is the best way to verify this PR?
Install the emulated vault as described below, and add it to a running Traffic Ops instance instead of the standard RIAK-based Traffic Vault.
Run url-signing and SSL based scenarios.
Note: you would probably want to work on a fresh TC deployment, or somehow copy the RIAK vault to the emulated one...
The following criteria are ALL met by this PR
Tests are not included in the PR as it is still under experimental.
Would be a must if/when the code goes to production.
Additional Information - Installation
Basic requirements: Centos ver >= 7; Python >= 2.7
In order to install the module on a server please:
Logs may be found under /opt/emulated_vault/var/log
Additional Information - Developer's Notes
If you just want to play around with the module, you may of course run the server script on its own.
Before doing that, you would probably need to adjust the opt/emulated_vault/conf/cfg.json:
Additionally, the vault-cmd script is also available to work against the DB with command line.
It is mostly useful when developing a new adapter.