snabblab / snabblab-nixos

NixOS configuration for the Snabb Lab
59 stars 17 forks source link

Workflow for deploying changes to lab server #19

Open domenkozar opened 8 years ago

domenkozar commented 8 years ago

Here are the scenarios under which we'd like to handle lab servers modifications:

Once we have Hydra setup on supporting server (see #8), it would poll snabblab-nixos for git changes and build the whole machine cluster. If the build is successful, channel would update. Meanwhile all lab servers would pull for latest channel every 15min and upgrade if new channel is available.

Pros

By choosing a different NixOps backend it could be deployed into VirtualBox or Qemu via libvirt.

Another option is to apply the change to only one server, test it, then move it to modules/lab-configuration.nix.

cc @lukego

domenkozar commented 8 years ago

Whatever we decide, we should have a boot test to avoid issues like https://github.com/NixOS/nixpkgs/issues/12949

lukego commented 8 years ago

:+1: sounds good!

domenkozar commented 8 years ago

I did my research over the weekend (as I'm excited about this as it will reduce my human error logistic in the deployment).

Aszlig implemented this for his cluster and upstreamed the Hydra part. Here are the necessary parts:

domenkozar commented 8 years ago

A preliminary implementation is now in customchannel branch and on Snabb Hydra.

domenkozar commented 8 years ago

The prototype plan is to deploy build-{1,2,3,4} machines using this workflow, then gradually switch over one lugano server and then the rest of the lab.

Channel is being generated at https://hydra.snabb.co/eval/674#tabs-new

What's left to do for prototype:

For later on: