Author: eelco
Date: Wed May 11 13:52:49 2011
New Revision: 27224
URL: https://svn.nixos.org/websvn/nix/?rev=27224&sc=1
Log:
* Generate a nova.conf file.
* Provide a configuration.nix in Nova images.
Added:
nixos/trunk/modules/virtualisation/nova-config.nix
Modified:
nixos/trunk/modules/virtualisation/nova-image.nix
nixos/trunk/modules/virtualisation/nova.nix
Added: nixos/trunk/modules/virtualisation/nova-config.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixos/trunk/modules/virtualisation/nova-config.nix Wed May 11 13:52:49
2011 (r27224)
@@ -0,0 +1,5 @@
+{ config, pkgs, modulesPath, ... }:
+
+{
+ require = [ "${modulesPath}/virtualisation/nova-image.nix" ];
+}
Modified: nixos/trunk/modules/virtualisation/nova-image.nix
==============================================================================
--- nixos/trunk/modules/virtualisation/nova-image.nix Wed May 11 13:44:18
2011 (r27223)
+++ nixos/trunk/modules/virtualisation/nova-image.nix Wed May 11 13:52:49
2011 (r27224)
@@ -57,7 +57,7 @@
# Install a configuration.nix.
mkdir -p /mnt/etc/nixos
- #cp ${./amazon-config.nix} /mnt/etc/nixos/configuration.nix
+ cp ${./nova-config.nix} /mnt/etc/nixos/configuration.nix
# Generate the GRUB menu.
chroot /mnt
${config.system.build.toplevel}/bin/switch-to-configuration boot
@@ -71,17 +71,8 @@
[ { mountPoint = "/";
device = "/dev/disk/by-label/nixos";
}
- #{ mountPoint = "/ephemeral0";
- # device = "/dev/xvdc";
- # neededForBoot = true;
- #}
];
- /*
- swapDevices =
- [ { device = "/dev/xvdb"; } ];
- */
-
boot.kernelParams = [ "console=ttyS0" ];
boot.initrd.kernelModules = [ "aufs" ];
Modified: nixos/trunk/modules/virtualisation/nova.nix
==============================================================================
--- nixos/trunk/modules/virtualisation/nova.nix Wed May 11 13:44:18 2011
(r27223)
+++ nixos/trunk/modules/virtualisation/nova.nix Wed May 11 13:52:49 2011
(r27224)
@@ -10,6 +10,12 @@
nova = pkgs.nova;
+ novaConf = pkgs.writeText "nova.conf"
+ ''
+ --nodaemon
+ --verbose
+ '';
+
in
{
@@ -87,7 +93,7 @@
# required to generate key pairs.
path = [ pkgs.openssl pkgs.openssh ];
- exec = "${nova}/bin/nova-api";
+ exec = "${nova}/bin/nova-api --flagfile=${novaConf}";
};
# `nova-objectstore' is a simple image server. Useful if you're
@@ -105,7 +111,7 @@
mkdir -m 700 -p /var/lib/nova/images
'';
- exec = "${nova}/bin/nova-objectstore --nodaemon";
+ exec = "${nova}/bin/nova-objectstore --flagfile=${novaConf}";
};
# `nova-scheduler' schedules VM execution requests.
@@ -116,7 +122,7 @@
startOn = "ip-up";
- exec = "${nova}/bin/nova-scheduler --nodaemon --verbose";
+ exec = "${nova}/bin/nova-scheduler --flagfile=${novaConf}";
};
# `nova-compute' starts and manages virtual machines.
@@ -132,7 +138,7 @@
pkgs.e2fsprogs pkgs.utillinux pkgs.multipath_tools
];
- exec = "${nova}/bin/nova-compute --nodaemon --verbose";
+ exec = "${nova}/bin/nova-compute --flagfile=${novaConf}";
};
# `nova-network' manages networks and allocates IP addresses.
@@ -148,7 +154,7 @@
pkgs.iproute pkgs.bridge_utils pkgs.radvd
];
- exec = "${nova}/bin/nova-network --nodaemon --verbose";
+ exec = "${nova}/bin/nova-network --flagfile=${novaConf}";
};
};
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits