Skip to content
Snippets Groups Projects
Unverified Commit c41eaabc authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Move all of the grid files into new per-grid subdirectories

Also put library code in a library directory
parent 07f71d0f
Branches
No related tags found
1 merge request!24Move morph configuration around so it is better placed
Showing
with 31 additions and 26 deletions
......@@ -7,20 +7,24 @@ and some JSON-based configuration in ``.config.json`` files.
This configuration is fed to `morph`_ to make changes to the deployment.
bootstrap-configuration.nix
---------------------------
lib
---
This is meant as a minimal system configuration to use as part of crossgrading a Debian install to NixOS.
It has a lot of comments explaining different parts of Nix and NixOS.
You may want to browse it before looking at other ``.nix`` files here.
This contains Nix library code for defining the grids.
grid.config.json
----------------
grid
----
This contains configuration for Tahoe-LAFS.
Specific grid definitions live in subdirectories beneath this directory.
config.json
~~~~~~~~~~~
As much as possible of the static configuration for the PrivateStorage.io application is provided in this file.
It is read by **grid.nix**.
grid.nix
--------
~~~~~~~~
This is the `morph`_ entrypoint for the grid.
This defines all of the servers that are part of the grid.
......@@ -30,14 +34,15 @@ You can do things like build the network::
morph build grid.nix
<hostname>-hardware.nix
-----------------------
~~~~~~~~~~~~~~~~~~~~~~~
These are the generated hardware-related configuration files for servers in the grid.
These files are referenced from the corresponding ``<hostname>.nix`` files.
<hostname>-config.nix
---------------------
~~~~~~~~~~~~~~~~~~~~~
Each such file contains a minimal Nix expression supplying critical system configuration details.
"Critical" roughly corresponds to anything which must be specified to have a bootable system.
......@@ -76,6 +81,6 @@ starting from a minimal NixOS 19.03 or 19.09 installation.
#. 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.
#. Deploy to the new host with ``morph deploy morph/grid.nix --on <identifier> boot --upload-secrets --reboot``.
#. Deploy to the new host with ``morph deploy morph/.../grid.nix --on <identifier> boot --upload-secrets --reboot``.
.. _`morph`: https://github.com/DBCDK/morph
File moved
# Load the helper function and call it with arguments tailored for the testing
# grid. It will make the morph configuration for us. We share this function
# with the testing grid and have one fewer possible point of divergence.
import ./make-grid.nix {
import ../../lib/make-grid.nix {
name = "Production";
config = ./grid.config.json;
config = ./config.json;
nodes = cfg: {
# Here are the hosts that are in this morph network. This is sort of like
# a server manifest. We try to keep as many of the specific details as
......@@ -17,32 +17,32 @@ import ./make-grid.nix {
# doesn't specify one.
#
# The names must be unique!
"payments.privatestorage.io" = import ./issuer.nix ({
hardware = ./issuer-aws.nix;
"payments.privatestorage.io" = import ../../lib/issuer.nix ({
hardware = ../../lib/issuer-aws.nix;
stateVersion = "19.03";
} // cfg);
"storage001" = import ./make-storage.nix ({
"storage001" = import ../../lib/make-storage.nix ({
cfg = import ./storage001-config.nix;
hardware = ./storage001-hardware.nix;
stateVersion = "19.09";
} // cfg);
"storage002" = import ./make-storage.nix ({
"storage002" = import ../../lib/make-storage.nix ({
cfg = import ./storage002-config.nix;
hardware = ./storage002-hardware.nix;
stateVersion = "19.09";
} // cfg);
"storage003" = import ./make-storage.nix ({
"storage003" = import ../../lib/make-storage.nix ({
cfg = import ./storage003-config.nix;
hardware = ./storage003-hardware.nix;
stateVersion = "19.09";
} // cfg);
"storage004" = import ./make-storage.nix ({
"storage004" = import ../../lib/make-storage.nix ({
cfg = import ./storage004-config.nix;
hardware = ./storage004-hardware.nix;
stateVersion = "19.09";
} // cfg);
"storage005" = import ./make-storage.nix ({
"storage005" = import ../../lib/make-storage.nix ({
cfg = import ./storage005-config.nix;
hardware = ./storage005-hardware.nix;
stateVersion = "19.03";
......
File moved
# Load the helper function and call it with arguments tailored for the testing
# grid. It will make the morph configuration for us. We share this function
# with the production grid and have one fewer possible point of divergence.
import ./make-grid.nix {
import ../../lib/make-grid.nix {
name = "Testing";
config = ./testing-grid.config.json;
config = ./config.json;
nodes = cfg: {
"payments.privatestorage-staging.com" = import ./issuer.nix ({
hardware = ./issuer-aws.nix;
"payments.privatestorage-staging.com" = import ../../lib/issuer.nix ({
hardware = ../../lib/issuer-aws.nix;
stateVersion = "19.03";
} // cfg);
"3.120.26.190" = import ./make-testing.nix (cfg // {
"3.120.26.190" = import ../../lib/make-testing.nix (cfg // {
publicIPv4 = "3.120.26.190";
hardware = ./testing001-hardware.nix;
stateVersion = "19.03";
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment