Open maxadamo opened 4 years ago
Starting the New Year with guns blazing :smirk:
Cool idea, I'm also looking for a way to check the whole g10k run first before shipping or using the populated Puppet environment code elsewhere.
My approach would have been a staging directory somewhere else and the simply link or rsync it to the final destination.
I'll also have a look into integrating your ZFS code into g10k directly, but you're also welcome to provide a PR of course :sweat_smile:
I think if I remove docopt the code left is tiny.... I should be able to provide a file zfs.go, which can be added to this package. Then. it will be matter of adding few command switches for it.
I'll think about the symlink... it's easier for people who don't want to setup ZFS on their servers... and it would have been easier for me :cry:
I had time to think a little bit. Symlink is also good, but you'll have one copy at time, and you need to clone again from scratch, because the other copy is in use already.
With ZFS you have a staging copy (read/write) which is never mounted and can be changed.
I'll try to work for the ZFS PR .... and anyway, it will be optional for the users.
I have created this tool: https://github.com/maxadamo/g10k-zfs The tool does the following: ~- creates ZFS snapshots on an existing ZFS pool~ ~- rotates in a loop two snapshots, called Even and Odd~ ~- mounts either Even or Odd depending on the rotation position~
This prevents leaving the code in a bad status and helps minimizing the downtime (replacing the snapshot takes few millisecond and happens only if the code was checked out successfully).
I am not sure about the question that I need to ask you, because there are actually few different options available:
g10k-zfs
intog10k
with PR (it is version 0.1... it needs a break-in period first). I can remove docopt (which you are not using) and try to harmonize my code with g10k code.checkForAndExecutePostrunCommand()
. Not clear how this works, and if it works, but g10k-zfs can be run indeed as Postrun command.