diff --git a/morph/README.rst b/morph/README.rst index 96a4d5bf62dc9c29fbec0bcf16c08528dbb59a64..6fd00a93a0315d64b1e1aa6d33dc79345cb65b0a 100644 --- a/morph/README.rst +++ b/morph/README.rst @@ -43,10 +43,17 @@ Each such file contains a minimal Nix expression supplying critical system confi "Critical" roughly corresponds to anything which must be specified to have a bootable system. These files are referenced by the corresponding ``<hostname>.nix`` files. -<hostname>.nix --------------- +Configuring New Storage Nodes +----------------------------- + +Storage nodes are brought into the grid in a multi-step process. +Here are the steps to configure a new node, +starting from a minimal NixOS 19.03 or 19.09 installation. + +#. Copy ``/etc/nixos/hardware-configuration.nix`` to ``storageNNN-hardware.nix``. + In the case of an EC2 instance, copy ``/etc/nixos/configuration.nix`` instead. +#. Create a ``storageNNN-config.nix`` containing further configuration for the new host. +#. Add an entry for the new host to ``grid.nix`` referencing the new files. -Each such file contains the parts of the system configuration that aren't *so* related to hardware. -They are referenced from ``grid.nix``. .. _`morph`: https://github.com/DBCDK/morph diff --git a/morph/testing000.nix b/morph/make-testing.nix similarity index 89% rename from morph/testing000.nix rename to morph/make-testing.nix index d45086ae90fb5dfd64b5181d1723c757d219e6bb..2c3a9d1c96d7084d809ddcecb64ce90e430aa736 100644 --- a/morph/testing000.nix +++ b/morph/make-testing.nix @@ -1,4 +1,4 @@ -{ publicIPv4, publicStoragePort, ristrettoSigningKeyPath, ... }: rec { +{ publicIPv4, hardware, publicStoragePort, ristrettoSigningKeyPath, ... }: rec { deployment = { secrets = { @@ -17,7 +17,7 @@ }; imports = [ - ./testing000-hardware.nix + hardware ../nixos/modules/private-storage.nix ]; diff --git a/morph/testing-grid.nix b/morph/testing-grid.nix index 778b1c65019f834be0e409c429ec25662edc59d3..77c9574f339837a0dbbe5bdd46b3fde2b097806d 100644 --- a/morph/testing-grid.nix +++ b/morph/testing-grid.nix @@ -10,8 +10,9 @@ import ./make-grid.nix { stateVersion = "19.03"; } // cfg); - "3.120.26.190" = import ./testing000.nix (cfg // { + "3.120.26.190" = import ./make-testing.nix (cfg // { publicIPv4 = "3.120.26.190"; + hardware = ./testing001-hardware.nix; }); }; } diff --git a/morph/testing000-hardware.nix b/morph/testing000-hardware.nix deleted file mode 100644 index 8eccc4b3e13d8f83838e1a07ab355956742e0e23..0000000000000000000000000000000000000000 --- a/morph/testing000-hardware.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> - ]; - - config.ec2.hvm = true; -} diff --git a/morph/testing001-hardware.nix b/morph/testing001-hardware.nix new file mode 100644 index 0000000000000000000000000000000000000000..9c79ca12604d3046947a8b8977c75a2886ea0d3d --- /dev/null +++ b/morph/testing001-hardware.nix @@ -0,0 +1,5 @@ +{ + imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ]; + ec2.hvm = true; + +}