diff options
-rw-r--r-- | nixos/maintainers/scripts/openstack/nova-image.nix | 26 | ||||
-rw-r--r-- | nixos/maintainers/scripts/openstack/openstack-image.nix | 26 | ||||
-rw-r--r-- | nixos/modules/virtualisation/openstack-config.nix (renamed from nixos/modules/virtualisation/nova-config.nix) | 2 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 3 | ||||
-rw-r--r-- | nixos/tests/openstack-image.nix (renamed from nixos/tests/nova-image.nix) | 10 |
5 files changed, 35 insertions, 32 deletions
diff --git a/nixos/maintainers/scripts/openstack/nova-image.nix b/nixos/maintainers/scripts/openstack/nova-image.nix deleted file mode 100644 index b6f3a5b1520..00000000000 --- a/nixos/maintainers/scripts/openstack/nova-image.nix +++ /dev/null @@ -1,26 +0,0 @@ -# nix-build '<nixpkgs/nixos>' -A config.system.build.novaImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/openstack/nova-image.nix ]; }" - -{ config, lib, pkgs, ... }: - -with lib; - -{ - imports = - [ ../../../modules/installer/cd-dvd/channel.nix - ../../../modules/virtualisation/nova-config.nix - ]; - - system.build.novaImage = import ../../../lib/make-disk-image.nix { - inherit lib config; - pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package - diskSize = 8192; - format = "qcow2"; - configFile = pkgs.writeText "configuration.nix" - '' - { - imports = [ <nixpkgs/nixos/modules/virtualisation/nova-config.nix> ]; - } - ''; - }; - -} diff --git a/nixos/maintainers/scripts/openstack/openstack-image.nix b/nixos/maintainers/scripts/openstack/openstack-image.nix new file mode 100644 index 00000000000..4c464f43f61 --- /dev/null +++ b/nixos/maintainers/scripts/openstack/openstack-image.nix @@ -0,0 +1,26 @@ +# nix-build '<nixpkgs/nixos>' -A config.system.build.openstackImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/openstack/openstack-image.nix ]; }" + +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = + [ ../../../modules/installer/cd-dvd/channel.nix + ../../../modules/virtualisation/openstack-config.nix + ]; + + system.build.openstackImage = import ../../../lib/make-disk-image.nix { + inherit lib config; + pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package + diskSize = 8192; + format = "qcow2"; + configFile = pkgs.writeText "configuration.nix" + '' + { + imports = [ <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> ]; + } + ''; + }; + +} diff --git a/nixos/modules/virtualisation/nova-config.nix b/nixos/modules/virtualisation/openstack-config.nix index c944fff96a8..7f4799d1719 100644 --- a/nixos/modules/virtualisation/nova-config.nix +++ b/nixos/modules/virtualisation/openstack-config.nix @@ -29,7 +29,7 @@ with lib; passwordAuthentication = mkDefault false; }; - systemd.services.nova-init = { + systemd.services.openstack-init = { path = [ pkgs.wget ]; description = "Fetch Metadata on startup"; wantedBy = [ "multi-user.target" ]; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 7bc2f3076f1..e7040a52e30 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -159,6 +159,9 @@ in openldap = handleTest ./openldap.nix {}; opensmtpd = handleTest ./opensmtpd.nix {}; openssh = handleTest ./openssh.nix {}; + # openstack-image-userdata doesn't work in a sandbox as the simulated openstack instance needs network access + #openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {}; + openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {}; osquery = handleTest ./osquery.nix {}; ostree = handleTest ./ostree.nix {}; pam-oath-login = handleTest ./pam-oath-login.nix {}; diff --git a/nixos/tests/nova-image.nix b/nixos/tests/openstack-image.nix index 7934ab31c70..c7b28126e50 100644 --- a/nixos/tests/nova-image.nix +++ b/nixos/tests/openstack-image.nix @@ -13,15 +13,15 @@ let (import ../lib/eval-config.nix { inherit system; modules = [ - ../maintainers/scripts/openstack/nova-image.nix + ../maintainers/scripts/openstack/openstack-image.nix ../modules/testing/test-instrumentation.nix ../modules/profiles/qemu-guest.nix ]; - }).config.system.build.novaImage; + }).config.system.build.openstackImage; in { metadata = makeEc2Test { - name = "nova-ec2-metadata"; + name = "openstack-ec2-metadata"; inherit image; sshPublicKey = snakeOilPublicKey; userData = '' @@ -59,14 +59,14 @@ in { }; userdata = makeEc2Test { - name = "nova-ec2-metadata"; + name = "openstack-ec2-metadata"; inherit image; sshPublicKey = snakeOilPublicKey; userData = '' { pkgs, ... }: { imports = [ - <nixpkgs/nixos/modules/virtualisation/nova-config.nix> + <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> <nixpkgs/nixos/modules/testing/test-instrumentation.nix> <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ]; |