Commit 9e6c016a authored by Valentin Reis's avatar Valentin Reis
Browse files

nrm pyzmq fix

parent 116ccaff
......@@ -55,25 +55,34 @@ in
distributedBuilds = true;
buildMachines = [
{
hostName = "slave-desktop-tunnel";
hostName = "localhost";
maxJobs = 40;
speedFactor = 1;
sshKey = "/run/id_buildfarm";
#sshKey = "/run/id_buildfarm";
sshUser = "fre";
systems = ["builtin" "x86_64-linux" "i686-linux"];
supportedFeatures = [ "nixos-test" "benchmark" "icc" ];
supportedFeatures = [ "nixos-test" "benchmark" ];
}
#{
#hostName = "slave-desktop-tunnel";
#maxJobs = 40;
#speedFactor = 1;
#sshKey = "/run/id_buildfarm";
#sshUser = "fre";
#systems = ["builtin" "x86_64-linux" "i686-linux"];
#supportedFeatures = [ "nixos-test" "benchmark" "icc" ];
#}
];
extraOptions = "auto-optimise-store = true";
};
programs.ssh.extraConfig = ''
Host slave-desktop-tunnel
HostName localhost
Port 2210
User frex
IdentityFile /run/id_buildfarm
'';
#programs.ssh.extraConfig = ''
#Host slave-desktop-tunnel
#HostName localhost
#Port 2210
#User frex
#IdentityFile /run/id_buildfarm
#'';
networking = {
firewall = {
......@@ -217,63 +226,63 @@ in
users.extraUsers.fre.openssh.authorizedKeys.keys = [ (pkgs.lib.readFile ./keys/id_buildfarm.pub)];
};
slave-desktop =
{ ... }:
{
deployment.targetEnv = "none";
deployment.targetHost = "140.221.10.9";
#slave-desktop =
#{ ... }:
#{
#deployment.targetEnv = "none";
#deployment.targetHost = "140.221.10.9";
time.timeZone = "America/Chicago";
#time.timeZone = "America/Chicago";
deployment.keys."id_buildfarm" = {
destDir = "/run";
keyFile = ./id_buildfarm.secret;
user = "fre";
group = "users";
permissions = "600";
};
#deployment.keys."id_buildfarm" = {
#destDir = "/run";
#keyFile = ./id_buildfarm.secret;
#user = "fre";
#group = "users";
#permissions = "600";
#};
systemd.services.tunnel-hydra= {
path = [pkgs.autossh];
enable= true;
description = "ssh tunnel to hydra";
after = [];
wantedBy = [ "multi-user.target" ];
environment.AUTOSSH_GATETIME="0";
environment.AUTOSSH_POLL="30";
serviceConfig = {
User = "fre";
Restart = "on-success";
Type = "simple";
ExecStart = ''
${pkgs.autossh}/bin/autossh -M 0 -N -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -T -R 2210:localhost:22 fre@argo.freux.fr -i /run/id_buildfarm
'';
};
};
#systemd.services.tunnel-hydra= {
#path = [pkgs.autossh];
#enable= true;
#description = "ssh tunnel to hydra";
#after = [];
#wantedBy = [ "multi-user.target" ];
#environment.AUTOSSH_GATETIME="0";
#environment.AUTOSSH_POLL="30";
#serviceConfig = {
#User = "fre";
#Restart = "on-success";
#Type = "simple";
#ExecStart = ''
#${pkgs.autossh}/bin/autossh -M 0 -N -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -T -R 2210:localhost:22 fre@argo.freux.fr -i /run/id_buildfarm
#'';
#};
#};
require=argomodules;
environment.argo.known-hosts.enable=true;
environment.argo.provider-openspace.enable=true;
environment.argo.root-access.enable=true;
#require=argomodules;
#environment.argo.known-hosts.enable=true;
#environment.argo.provider-openspace.enable=true;
#environment.argo.root-access.enable=true;
environment.variables.TERM = "xterm";
#environment.variables.TERM = "xterm";
i18n.defaultLocale = "en_US.UTF-8";
nix.useSandbox = true;
nix.nrBuildUsers = 30;
nix.trustedUsers=["root" "fre" ];
#i18n.defaultLocale = "en_US.UTF-8";
#nix.useSandbox = true;
#nix.nrBuildUsers = 30;
#nix.trustedUsers=["root" "fre" ];
services.ntp.enable = false;
services.openssh.allowSFTP = false;
#services.ntp.enable = false;
#services.openssh.allowSFTP = false;
nix.gc = {
automatic = true;
dates = "05:15";
options = ''--max-freed "$((32 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
};
services.openssh.enable = true;
users.extraUsers.root.openssh.authorizedKeys.keys = [ (pkgs.lib.readFile ./keys/id_buildfarm.pub)];
users.extraUsers.fre.openssh.authorizedKeys.keys = [ (pkgs.lib.readFile ./keys/id_buildfarm.pub)];
};
#nix.gc = {
#automatic = true;
#dates = "05:15";
#options = ''--max-freed "$((32 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | ${pkgs.gawk}/bin/awk '{ print $4 }')))"'';
#};
#services.openssh.enable = true;
#users.extraUsers.root.openssh.authorizedKeys.keys = [ (pkgs.lib.readFile ./keys/id_buildfarm.pub)];
#users.extraUsers.fre.openssh.authorizedKeys.keys = [ (pkgs.lib.readFile ./keys/id_buildfarm.pub)];
#};
}
......@@ -12,7 +12,7 @@ let
gitpin = f: pkgs.fetchgit {inherit (pkgs.lib.importJSON f) url sha256 rev fetchSubmodules;};
compiler_path = "/opt/intel/compilers_and_libraries_2017.1.132/linux";
callPackage = pkgs.lib.callPackageWith pkgs;
callPackage = pkgs.lib.callPackageWith (pkgs//argopkgs);
callPackagePinWith =
{ folderPath
, nixName ? "default"
......@@ -32,6 +32,8 @@ let
pythonPackages = pkgs.python27Packages;
argopkgs = rec {
pyzmq = pythonPackages.pyzmq.override { zeromq3 = pkgs.zeromq; };
#NRM components
tools = rec {
inherit (kapack) zymake;
......@@ -45,7 +47,7 @@ let
});
containers = cpDefaultPin ./containers { inherit pythonPackages; };
containers-bandit = cpAlternatePin ./containers { inherit pythonPackages; } "bandit";
nrm = cpDefaultPin ./nrm { inherit pythonPackages; nrm-containers = containers; };
nrm = cpDefaultPin ./nrm { inherit pythonPackages; inherit pyzmq; nrm-containers = containers; };
nrm-bandit = cpAlternatePin ./nrm { inherit pythonPackages; nrm-containers=containers-bandit; } "bandit";
};
......
{ src, stdenv, pythonPackages, hwloc, nrm-containers }:
{ src, stdenv, pythonPackages, pyzmq, hwloc, nrm-containers }:
pythonPackages.buildPythonPackage {
inherit src;
name = "nrm";
propagatedBuildInputs = with pythonPackages;[ six numpy tornado pyzmq hwloc docopt nrm-containers];
propagatedBuildInputs = [ pythonPackages.six pythonPackages.numpy pythonPackages.tornado pyzmq hwloc pythonPackages.docopt nrm-containers];
buildInputs = with pythonPackages;[ pytest];
testPhase = '' pytest '';
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment