Closed mindreframer closed 6 years ago
Good catch! Thank you very much for submitting this PR.
Thank you for this library, I think it is really useful. Normal Elixir pipe operator is too limited for some cases. Thumbs up!
On Thu, Jul 19, 2018, 8:27 PM Dimitrios Zorbas notifications@github.com wrote:
Good catch! Thank you very much for submitting this PR.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Zorbash/opus/pull/3#issuecomment-406371460, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAE0IJriNN0v2_942x8U0m64VoqTg9sks5uIM-jgaJpZM4VW0jU .
@mindreframer I'd be really interested to find out if / how you use this library. I'm preparing a blogpost and more real-word use-cases would only make it more interesting I think.
@Zorbash I'm not currently using it, just thinking about it. My use-case would be server configuration in Kubernetes with tenant isolation and own database (servers + users). This would also allow life cycle upgrades (like DB upgrade, moving to another kubernetes cluster, changing some configuration parameters). Having those moving parts clearly defined and being understandable / readable is kinda important. I was also looking into https://github.com/Nebo15/sage, it is a bit more advanced, yet opus looks like a nice unix-y way to combine smaller functions into a cohesive pipeline. Not sure if that is a blogpost-suitable real-world use-case, but here you go :)
Flow:
if db server exists: making sure it has desired properties. if properties changed: initiate DB server migration. if db server does not exist, provision it. if everything matches: leave it like it is. make sure users exist and the DB is created with right permissions.
Kubernetes deployment: if it exists, upgrade it. otherwise create it. consists of creating the deployment, service, ingress and secrets with database credentials.
Secrets should be rotated every predefined period (month / week). This will also trigger a re-deployment.
That is a rough sketch of requirements.
Have a nice weekend!
otherwise it is not picked up by the ExUnit test runner...
Nice library, btw!
Cheers, Roman