Alejandro Mery
5e57fe5f30
ceph: zones.Zones.WriteCephConfig() and ceph.Config.WriteTo()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
75dee617ef
env: set ceph monitors variables
...
they indicate the ceph monitors on the specified zone
* MON{zoneID}_NAME
* MON{zoneID}_ID
* MON{zoneID}_IP
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
cc7526ceb5
zones: extend scan to ensure every zone has a ceph monitor
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
d8657770d5
zones: store ceph FSID on scan
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
564a6c8af2
zones: set Machine.CephMonitor if its referenced as monitor on ceph.conf
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
c083a144ea
zones: introduce GenCephConfig()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
226d529223
zones: introduce Zone.GetCephMonitors()
...
returning the local ceph monitors and setting one
if there is none. non-gateway nodes are preferred
when setting a monitor automatically
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
7489b15c52
zones: introduce Zones.GetCephConfig() accessor for m/ceph.conf
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
d4757bebc2
ceph: add NewConfigFromReader() and initial ceph.conf parser
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
025b9072b4
zones: introduce Machine.CephMonitor field
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0fb8c1d44b
zones: introduce Zones.CephFSID and Zones.GetCephFSID()
...
the accessor doesn't generate one if needed yet
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
a8849b747c
vscode: add ceph to the dictionary
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
879d2b4d1c
chore: update dependencies
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
ff4bb97599
vscode: add jpictl, zerolog and darvaza to the dictionary
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
c95bf06da2
chore: update dependencies
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
2e48f34f7f
chore: update revive to 1.3.3
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
8e5fc44e62
Merge pull request 'jpictl: introduce `gateway` command' ( #7 )
...
Reviewed-on: #7
1 year ago
Nagy Károly Gábriel
3d5a766161
jpictl: introduce `gateway` command
...
Signed-off-by: Nagy Károly Gábriel <k@jpi.io>
1 year ago
Alejandro Mery
6f5ca3f235
Merge pull request 'zones: add methods to work with files at the root of `m/`' ( #6 )
...
Reviewed-on: #6
1 year ago
Alejandro Mery
296d4007ff
zones: add methods to work with files at the root of m/
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
1a03404a07
Merge pull request 'zone.ScanOptions, custom resolver and prevent unnecessary DNS calls' ( #5 )
...
Reviewed-on: #5
1 year ago
Alejandro Mery
d2f0a0744b
Merge pull request 'zones: Env: allow multiple gateways and drop unused `ZONE{zoneID}_IP`' ( #4 )
...
Reviewed-on: #4
1 year ago
Alejandro Mery
71a1d1a7c2
zones: Env: allow multiple gateways on a Zone
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
de45fa6c30
zones: Env: minor tidy up
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
6e46d23b45
jpictl: only load Machine.PublicAddresses for `jpictl dump`
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
94daf5ad59
zones: export Machine.LookupNetIP() and Machine.UpdatePublicAddresses()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
0989dec5e8
zones: add ResolvePublicAddresses() ScanOption to prevent early LookupIP calls
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
216bf5aa29
zones: WithLookuper()/WithResolver()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
9af88f6593
zones: introduce ScanOption/ScanOptions for New()/NewFS()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
af2d836000
zones: Env: drop unused ZONE{zoneID}_IP
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
1655ce85bc
Merge pull request 'zones: FilterMachines() and Zone.GatewayIDs()' ( #3 )
...
Reviewed-on: #3
1 year ago
Alejandro Mery
9c4f6d987d
Merge pull request 'env: introduce Env() factory and `jpictl env -e` to export variables' ( #2 )
...
Reviewed-on: #2
1 year ago
Alejandro Mery
fb82a7f358
Merge pull request 'zones: fix PruneWireguardConfig recursion' ( #1 )
...
Reviewed-on: #1
1 year ago
Alejandro Mery
f63ce6c4e7
zones: introduce Zone.GatewayIDs()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
1885c76198
zones: FilterMachines() creates a Machines subset
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
2224e70638
zones: introduce Machines type. iterable and sortable
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
6ee848e6ca
jpictl: introduce `-e` for `jpictl env` to export variables
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
864eb02f9d
zones: turn Zones.WriteEnv() into Zones.Env().WriteTo()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
9da2f8711f
zones: fix PruneWireguardConfig recursion
...
Zones and Zone implementation should call Machine's directly
instead jumping back to Zone's for each Machine again and again
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
2a14205e7e
wireguard: fix misspellings
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
a5d9466fb8
zones: change WriteEnv() to not fake gateways
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
3d638e9a85
zones: add Zone.SetGateway() to set one by ID
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
60d3a2c290
zones: set first node of a Zone as ring0 gateway if it doesn't have one already
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
af90825f13
zones: Machine.SetGateway()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
b4f1d2e4d9
wireguard: implement Machine.SyncWireguardConfig()
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
acf9e0e81d
zones: extend WriteWireguardConfig to include a Name indicating the ring ID
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
3b43e0c9ea
wireguard: add support for optional Name comment
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
9762e78f5e
jpictl: do SyncWireguardConfig() on `write`
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
3534e7b755
zones: SyncWireguardConfig() as Prune+Write
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago
Alejandro Mery
b80dc84a26
zones: introduce WireguardConfigWriters
...
Signed-off-by: Alejandro Mery <amery@jpi.io>
1 year ago