Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Prince
PrivateStorageio
Commits
7e2345bf
Commit
7e2345bf
authored
Oct 21, 2019
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Add the necessary secrets configuration
parent
5e022988
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
morph/grid.config.json
+1
-0
1 addition, 0 deletions
morph/grid.config.json
morph/storage000.nix
+19
-1
19 additions, 1 deletion
morph/storage000.nix
morph/testing-grid.nix
+3
-7
3 additions, 7 deletions
morph/testing-grid.nix
morph/testing000.nix
+20
-2
20 additions, 2 deletions
morph/testing000.nix
with
43 additions
and
10 deletions
morph/grid.config.json
+
1
−
0
View file @
7e2345bf
{
"publicStoragePort"
:
8898
,
"ristrettoSigningKeyPath"
:
"../../PrivateStorageSecrets/ristretto.signing-key"
}
This diff is collapsed.
Click to expand it.
morph/storage000.nix
+
19
−
1
View file @
7e2345bf
...
...
@@ -5,7 +5,23 @@ in
# Define the function that defines the node. Accept the public storage server
# port argument so we can configure Tahoe-LAFS with it. Accept but ignore any
# other arguments.
{
publicStoragePort
,
...
}:
{
{
publicStoragePort
,
ristrettoSigningKeyPath
,
...
}:
rec
{
deployment
=
{
secrets
=
{
"ristretto-signing-key"
=
{
source
=
ristrettoSigningKeyPath
;
destination
=
"/var/secrets/ristretto.signing-key"
;
owner
.
user
=
"root"
;
owner
.
group
=
"root"
;
permissions
=
"0400"
;
# Service name here matches the name defined by our tahoe-lafs nixos
# module. It would be nice to not have to hard-code it here. Can we
# extract it from the tahoe-lafs nixos module somehow?
action
=
[
"sudo"
"systemctl"
"restart"
"tahoe.storage.service"
];
};
};
};
# Any extra NixOS modules to load on this server.
imports
=
[
...
...
@@ -34,6 +50,8 @@ in
inherit
(
cfg
)
publicIPv4
;
# And the port to operate on is specified via parameter.
inherit
publicStoragePort
;
# Give it the Ristretto signing key, too, to support authorization.
ristrettoSigningKeyPath
=
deployment
.
secrets
.
ristretto-signing-key
.
destination
;
};
# This value determines the NixOS release with which your system is to be
...
...
This diff is collapsed.
Click to expand it.
morph/testing-grid.nix
+
3
−
7
View file @
7e2345bf
...
...
@@ -4,12 +4,8 @@
import
./make-grid.nix
{
name
=
"Testing"
;
nodes
=
cfg
:
{
"testing000"
=
import
./testing000.nix
{
publicIPv4
=
"3.123.26.90"
;
# Pass along some of the Tahoe-LAFS configuration. If we have much more
# configuration than this we may want to keep it bundled up in one value
# instead of pulling individual values out to pass along.
inherit
(
cfg
)
publicStoragePort
;
};
"testing000"
=
import
./testing000.nix
(
cfg
//
{
publicIPv4
=
"35.157.216.200"
;
});
};
}
This diff is collapsed.
Click to expand it.
morph/testing000.nix
+
20
−
2
View file @
7e2345bf
{
publicIPv4
,
publicStoragePort
}:
{
imports
=
[
{
publicIPv4
,
publicStoragePort
,
ristrettoSigningKeyPath
}:
rec
{
deployment
=
{
secrets
=
{
"ristretto-signing-key"
=
{
source
=
ristrettoSigningKeyPath
;
destination
=
"/var/secrets/ristretto.signing-key"
;
owner
.
user
=
"root"
;
owner
.
group
=
"root"
;
permissions
=
"0400"
;
# Service name here matches the name defined by our tahoe-lafs nixos
# module. It would be nice to not have to hard-code it here. Can we
# extract it from the tahoe-lafs nixos module somehow?
action
=
[
"sudo"
"systemctl"
"restart"
"tahoe.storage.service"
];
};
};
};
imports
=
[
./testing000-hardware.nix
../nixos/modules/private-storage.nix
];
...
...
@@ -8,5 +25,6 @@
{
enable
=
true
;
inherit
publicIPv4
;
inherit
publicStoragePort
;
ristrettoSigningKeyPath
=
deployment
.
secrets
.
ristretto-signing-key
.
destination
;
};
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment