Commit Graph

32 Commits

Author SHA1 Message Date
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
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
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
46685113e0 "cryptic-net network" -> "cryptic network" throughout docs 2022-11-05 11:50:11 +01:00
Brian Picciano
b935457439 Various fixes to bugs in admin create-network 2022-11-03 14:54:46 +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
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
5e399209b2 Rename go-workspace to just entrypoint, clean out unused wait-for tools 2022-10-20 22:06:22 +02:00