Commit Graph

79 Commits

Author SHA1 Message Date
Brian Picciano
1dc22701cd Write rpc_port file to garage meta dir
This file is then used in later startups when determining the rpc port,
thus preventing the user from changing the port by accident.
2023-01-17 20:31:22 +01:00
Brian Picciano
ca003eaf85 Improve version sub-cmd output 2022-11-22 12:57:27 +01:00
Brian Picciano
e96fccae1b Upgrade to garage v0.8.0, plus a commit to fix panics
We were encountering panics (see
https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/414). The new garage
commit is simply 0.8.0 plus the fix for that issue.
2022-11-22 12:51:24 +01:00
Brian Picciano
0a6516b44e Add release target in nix 2022-11-16 17:45:13 +01:00
Brian Picciano
03ab15902c Update docs for storage allocs in daemon.yml 2022-11-16 17:30:55 +01:00
Brian Picciano
53194614df Switch to using camelCase for logs 2022-11-16 17:27:42 +01:00
Brian Picciano
2181da14a1 Added some debug logging, ultimately not needed 2022-11-16 17:25:55 +01:00
Brian Picciano
b498ee271d Don't divide layout capacity by 100
See discussion in
https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/414. Apparently the
capacity is only relative to that of other instances in the layout, it
has no absolute value of its own. We can say it corresponds to GB for
ease-of-use, but garage doesn't see it that way.
2022-11-16 15:51:13 +01:00
Brian Picciano
877e519821 Apply garage layout prior to putting bootstrap 2022-11-15 20:11:47 +01:00
Brian Picciano
b1fa3be970 Fix garage mc not getting default secret key set correctly 2022-11-13 20:14:16 +01:00
Brian Picciano
739e88d6c9 Add secret ability to specify zone 2022-11-13 20:09:03 +01:00
Brian Picciano
da100c6170 Fix garage Wait method not sleeping properly between tries 2022-11-13 16:49:23 +01:00
Brian Picciano
629a8ec9b2 Improve logging, introduce log levels
I switched to using mlog for logging, as opposed to writing directly to
Stderr. This gives us control over log levels, as well as coordination
so that we don't have multiple go-routines writing to stderr at the same
time.
2022-11-13 16:45:42 +01:00
Brian Picciano
90a30bef5e Fix startup sequence for daemon
Putting bootstrap host data into garage, and applying garage layout
diff, no longer happen simultaneously in the background. This was
causing some weird non-determinism in the startup which wasn't really
breaking anything, but made the logs harder to debug.

This also potentially fixes `waitForGarageAndNebula`, which was
neglecting to wait for nebula if there were allocations defined.
2022-11-13 14:55:25 +01:00
Brian Picciano
838c548706 Fix random bugs related to using garage cli tools 2022-11-08 14:54:31 +01:00
Brian Picciano
c4b7abbcc4 Add documentation related to firewalls 2022-11-05 17:16:25 +01:00
Brian Picciano
97d4aacc15 Make output of hosts list more useful 2022-11-05 16:55:17 +01:00
Brian Picciano
0d7d69679f Rename to make-bootstrap to create-bootstrap 2022-11-05 16:41:14 +01:00
Brian Picciano
4bc0750797 Adjust .gitignore after change to yml 2022-11-05 16:32:26 +01:00
Brian Picciano
d916d1a630 Fix dnsmasq config 2022-11-05 16:25:24 +01:00
Brian Picciano
a153911948 Forgot to write bootstrap to data dir during reload 2022-11-05 16:21:49 +01:00
Brian Picciano
0b094f057e Fix how host object is initialized during daemon startup 2022-11-05 15:50:04 +01:00
Brian Picciano
ffd276bd3e Refactor how nebula certs are signed and propagated
I had previously made the mistake of thinking that the Curve25519 key
which is generated for each host to use in nebula communication could
also be used for signing. This is not the case, Ed25519 is used for
signing and is different thant Curve25519.

Rather than figuring out how to convert the Curve25519 key into an
Ed25519 key, which there is no apparent support for in the standard
library, I opted to instead ship a separate key just for signing with
each host. Doing this required a bit of refactoring in order to keep all
the different keys straight and ensure all data which needs a signature
still has it.
2022-11-05 15:23:29 +01:00
Brian Picciano
e9ac1336ba Small fixes to documentation and various small bugs 2022-11-05 13:57:21 +01:00
Brian Picciano
c0ebca193d Add Name field to admin.CreationParams 2022-11-05 13:15:42 +01:00
Brian Picciano
bd5a5552bc Add Glossary, remove "participant" as a term 2022-11-05 12:03:51 +01:00
Brian Picciano
46685113e0 "cryptic-net network" -> "cryptic network" throughout docs 2022-11-05 11:50:11 +01:00
Brian Picciano
5c8c24e73e Add documentation for admin create-network 2022-11-03 15:38:31 +01:00
Brian Picciano
b935457439 Various fixes to bugs in admin create-network 2022-11-03 14:54:46 +01:00
Brian Picciano
6ba8b948c2 Update firewall information in "Contributing Storage" doc 2022-11-03 14:30:54 +01:00
Brian Picciano
be25907444 Remove reference to cryptic.io in daemon.yml 2022-11-03 14:25:50 +01:00
Brian Picciano
3ac86e07cf Use yaml instead of tgz for bootstrap file 2022-11-02 14:34:40 +01:00
Brian Picciano
7d95825f97 Use yaml to encode admin file, not tgz 2022-11-02 14:02:21 +01:00
Brian Picciano
745fe31324 Updates to existing documentation 2022-10-30 02:22:03 +02:00
Brian Picciano
287313e00a Update daemon-process-tree 2022-10-30 00:38:26 +02:00
Brian Picciano
7dceb659ef Store full nebula cert for each host in garage, rather than just the IP
This allows each host to verify the cert against the CA cert. We also
now have each host sign the yaml file that it posts to garage, to ensure
that a host can't arbitrarily overwrite another host's file.
2022-10-29 21:11:40 +02:00
Brian Picciano
711d568036 Use a real private key for garage instances 2022-10-29 00:09:18 +02:00
Brian Picciano
b26f4bdd6a Move proc locking into entrypoint
This completely cleans up all logic that used to be in crypticnet.
2022-10-27 00:45:40 +02:00
Brian Picciano
28159608c8 Factor out crypticnet.Env completely 2022-10-27 00:37:03 +02:00
Brian Picciano
b23a4cafa6 Remove Bootstrap from Env 2022-10-27 00:25:58 +02:00
Brian Picciano
08f47bd514 Move daemon.yml types and functionality out of entrypoint and Env 2022-10-26 23:21:31 +02:00
Brian Picciano
03618ba72c Reimplement dnsmasq-entrypoint in go
This allowed for deleting all script utilities and environment variable
logic.
2022-10-26 22:18:16 +02:00
Brian Picciano
2200d85992 Make populating garage ports optional 2022-10-26 21:47:39 +02:00
Brian Picciano
6ef21ff186 Don't set bootstrap host entry during admin create-network 2022-10-26 21:30:30 +02:00
Brian Picciano
be2250fddd Small fixes to get admin create-network working 2022-10-25 21:15:09 +02:00
Brian Picciano
9288d8cf48 Fix and improve version string 2022-10-20 22:30:30 +02:00
Brian Picciano
5e399209b2 Rename go-workspace to just entrypoint, clean out unused wait-for tools 2022-10-20 22:06:22 +02:00
Brian Picciano
47e45e0071 Factor out nebula-entrypoint
As part of this all "wait" constraints have been migrated to pure-go
implementations, taking advantage of pmux's `StartAfterFunc` argument.

nebula-entrypoint was the final main process besides the entrypoint
itself, allowing us to get rid of cryptic-net-main.
2022-10-20 21:59:46 +02:00
Brian Picciano
8ba88b4dfc Use migrated and upgraded pmux 2022-10-20 20:57:26 +02:00
Brian Picciano
8d92b9fe2b Factor out update-global-bucket 2022-10-19 16:53:38 +02:00