[Nix-dev] NixOps: distributed builds, arm7vl

Théophane Hufschmitt rg_nixos at regnat.ovh
Fri Mar 17 17:13:49 CET 2017


Hi Drew,

I got a setup quite similar to the one you describe :

I got a network managed by nixops consisting of a few x86 machines and
an armv7l board (a bananaPi R1, which has exactly the same chipset as
the BBB iirc), and forwards builds to an arm machine in the cloud. Short
answer : it works fine.

More in detail :

1. Not that I know of. The machine that I use as a CnC is itself managed
  by nixops, and it never raised any problem.

2. Yes, it works without problem. In fact NixOps isn't concerned about
  the architecture of your machine, it just forwards the config to nix
  which builds it. But you have to specify the architecture in the
  configuration of your machine for nix to know about it. In my case it
  was just setting `nixpkgs.system = "armv7l-linux"` in my bananaPi's
  configuration.

3. Yes again, by using nix's distributed builds feature (see the
  `nix.buildMachines` and `nix.distributedBuilds` nixos options and
  https://nixos.org/nix/manual/#chap-distributed-builds if you don't know
  how to set it up), you got what you want (and if you don't explicitly
  specify you boards as build machines, nothing will be built on them).

-- 
Théophane Hufschmitt

Wed 15 Mar 17 − 15:01, Drew Hess(ml-nix-dev at drewhess.com) a écrit:
> Hi all,
> 
> I just wrapped up my first NixOps deployment. It’s lovely! Now I’m
> ready to proceed to the next stage, and I could use a little guidance.
> Here's where I am currently:
> 
> - I use a dedicated NixOS host, which I manage by hand (i.e., not with
>   NixOps), as a “command-and-control” (CnC) host for my NixOps
>   deployments.
> 
> - The current deployment is just 2 x86_64-linux physical hosts. These
>   machines are fully managed by NixOps from the CnC host.
> 
> Here is where I'd like to get to next:
> 
> - Add multiple BeagleBone Black (armv7l architecture) hosts to the
>   existing NixOps deployment. These will run various services and
>   sensors.
> 
> - Use a dedicated armv7l build slave for the armv7l package builds.
>   The BeagleBone Blacks (BBBs) are seriously underpowered and should 
>   never do their own builds.
> 
> I just installed NixOS on a Jetson TK1. I would like to use it as the
> armv7l build slave since it has pretty decent specs for an armv7l
> machine. Currently, it is managed by hand, i.e., not in NixOps.
> 
> Here are my questions:
> 
> 1. Are there any potential problems that arise from managing build
>    slaves that are intended for use in NixOps deployments in the
>    NixOps deployment itself? Should build slaves be managed by hand,
>    like the CnC host? I’m not sure how NixOS’s support for
>    distributed builds interacts and/or interferes with NixOps’s 
>    deployments.
> 
> 2. Does NixOps support both x86_64-linux and armv7l physical host
>    targets in the same deployment? Do I need to specify that a
>    particular target is armv7l, or will NixOps figure that out when it
>    adds the host to the database?
> 
> 3. Is there a way to ensure that NixOps only uses the dedicated armv7l
>    build slave for armv7l builds, and never performs builds on the 
>    other armv7l targets that it has deployed? I would prefer that
>    deployments fail — say, because the dedicated build slave is down —
>    than builds ever happen on the BeagleBones.
> 
> Thanks!
> 
> d
> 
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170317/1e0fbcdd/attachment.sig>


More information about the nix-dev mailing list