Open copumpkin opened 7 years ago
Currently not, but I was thinking about having pre-deployment "hooks", that upload docker image or nix store(distributed nix store) somewhere. While in our case this is not as useful, as we have build process separated from provisioning, I understand the use case, where you let Hydra build everything and then you have one large closure of everything you need for running apps on your cluster.
On Fri, Jan 6, 2017, 3:32 AM Daniel Peebles notifications@github.com wrote:
Is it possible to be Nix from start to finish and specify my container images using dockerTools instead of talking about images from a pre-existing registry? That would be amazing!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/proteuslabs/nix-kubernetes/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjvSzCmoMGwLPWy0gNraExhZC-hQt6Bks5rPafPgaJpZM4LcWId .
Yeah, that would be amazing.
On Jan 6, 2017, at 04:28, Jaka Hudoklin notifications@github.com wrote:
Currently not, but I was thinking about having pre-deployment "hooks", that upload docker image or nix store(distributed nix store) somewhere. While in our case this is not as useful, as we have build process separated from provisioning, I understand the use case, where you let Hydra build everything and then you have one large closure of everything you need for running apps on your cluster.
On Fri, Jan 6, 2017, 3:32 AM Daniel Peebles notifications@github.com wrote:
Is it possible to be Nix from start to finish and specify my container images using dockerTools instead of talking about images from a pre-existing registry? That would be amazing!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/proteuslabs/nix-kubernetes/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjvSzCmoMGwLPWy0gNraExhZC-hQt6Bks5rPafPgaJpZM4LcWId .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I've put together an example of how one might go about adding dockerTools
images to a configuration.
It has the following files:
trivial.nix
: adaptation of the preexisting examplemyImages.nix
: defines the images with dockerTools
images.nix
: indirection for images, should become part of nix-kubernetesnixImages.nix
: module that maps dockerTools
images onto the images
config, should become part of nix-kubernetesThe only thing missing is upload to registry. I like @offlinehacker's suggestion of providing a hook. We can make the upload strategy pluggable by letting the user import the right module for it. Such a module could be provided by nix-kubernetes or the user. For the user, that might look like this in the future:
imports = [ <nix-kubernetes/upload/gcr.nix> ];
config.upload.gcr.foo = true;
An upload module simply reads the nixImages
config and sets the upload hook to an appropriate script.
What do you think?
Is it possible to be Nix from start to finish and specify my container images using
dockerTools
instead of talking about images from a pre-existing registry? That would be amazing!