Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
251 commits
Select commit Hold shift + click to select a range
f9500ca
fix dependencies when temporal isn't needed
glimberg Aug 5, 2025
44d0e81
gcloud-pubsub only if ztcontroller is flagged
glimberg Aug 5, 2025
a552163
fix macos build
glimberg Aug 5, 2025
4b3b847
fix windows bui ld
glimberg Aug 5, 2025
837f15d
tokio is needed by both temporal & gcloud pubsub, so make just one in…
glimberg Aug 7, 2025
f079f8b
cleanup warnings
glimberg Aug 11, 2025
06b2ce9
WIP: pubsub wrapper in Rust
glimberg Aug 12, 2025
0e94891
plumb through callbacks
glimberg Aug 13, 2025
bf8c9d0
function naming cleanup.
glimberg Aug 13, 2025
ccb0fa7
updates & tests.
glimberg Aug 14, 2025
3a209e2
expose change_handler to C via FFI
glimberg Aug 14, 2025
a842ad8
remove ztcontroller from default feature list
glimberg Aug 14, 2025
d4ee95e
feature cleanup
glimberg Aug 14, 2025
e4147f7
fix build script
glimberg Aug 14, 2025
4fab227
fix calling into async functions from non-async via the FFI
glimberg Aug 14, 2025
4237830
revert default feature list once again
glimberg Aug 14, 2025
b90ad51
more calling async from non-async changes
glimberg Aug 15, 2025
650fc0c
Add C++ wrapper around pubsub listeners
glimberg Aug 15, 2025
ebe8fdb
rename classes
glimberg Aug 20, 2025
9522437
Refactor Redis & Posgres notification listeners into listener subclas…
glimberg Aug 21, 2025
2833d0e
make whether SSO is enabled a switchable config value
glimberg Aug 21, 2025
f8a4a5d
rework protobuf messages
glimberg Aug 25, 2025
7f3b150
Update central controller build to use CMake + conda
glimberg Aug 27, 2025
9bdd564
spacing
glimberg Aug 27, 2025
3187c2f
clang format change (not applied project-wide yet)
glimberg Aug 29, 2025
85f2335
add a StatusWriter class hierarchy for writing member status updates
glimberg Aug 29, 2025
d119547
wire up status writers
glimberg Sep 1, 2025
e347f89
add sleep at end of online notificaiton loop
glimberg Sep 1, 2025
17b48d7
Merge branch 'dev' into gl/ctl-pubsub
glimberg Sep 1, 2025
b114896
PubSub to gcloud-cpp library for simplicity's sake
glimberg Sep 1, 2025
db6e698
rework the pubsub listener again so the subscription is set up on its…
glimberg Sep 1, 2025
0f63783
remove rust-based pubsub
glimberg Sep 1, 2025
496e69e
add def for new style controllers
glimberg Sep 1, 2025
195d5b4
Merge branch 'adam/1.16' into gl/ctl-pubsub
glimberg Sep 1, 2025
4ddb1fb
Create the pubsub topic if it doesn't exist
glimberg Sep 2, 2025
a5bd262
Wiring through initialization of the CentralDB version of the controller
glimberg Sep 2, 2025
0753556
wire up configuration.
glimberg Sep 2, 2025
70f9fe0
update central controller readme with config block
glimberg Sep 2, 2025
2a647d4
remove otel warning
glimberg Sep 2, 2025
7c1bfc9
setup github action for building
glimberg Sep 3, 2025
0f13363
runs-on matrix
glimberg Sep 3, 2025
09f1ee7
skip caching until this all works
glimberg Sep 3, 2025
97681b5
trying to get this working
glimberg Sep 3, 2025
e1db40d
test
glimberg Sep 3, 2025
cab33df
no linux/arm64 build available for google-cloud-cpp 2.39 :/. Downgra…
glimberg Sep 3, 2025
22484c7
dependency juggling
glimberg Sep 3, 2025
3ad36c7
fix cmake options
glimberg Sep 3, 2025
f43bc3d
more conda
glimberg Sep 3, 2025
21e20f2
more conda
glimberg Sep 3, 2025
648f091
skip cmake action
glimberg Sep 3, 2025
3470ceb
cmake --build args
glimberg Sep 3, 2025
d3f1ec7
fix arm64 build flag
glimberg Sep 3, 2025
0f3a514
fix deps for selftest
glimberg Sep 3, 2025
d31b3a0
set ZT_AES_NEON for arm64
glimberg Sep 3, 2025
1dae4c4
cache conda environment
glimberg Sep 3, 2025
4395574
cache conda environment
glimberg Sep 3, 2025
b09956a
fix run arg
glimberg Sep 3, 2025
3ff4d67
bump
glimberg Sep 3, 2025
a841e96
put git branch ref into cache key name
glimberg Sep 3, 2025
3f3e684
only update conda env if cache was not hit
glimberg Sep 3, 2025
000f3d5
let's build a docker image
glimberg Sep 3, 2025
7fd112e
fix short hash
glimberg Sep 3, 2025
594d227
fix multi-arch manifest creation
glimberg Sep 3, 2025
4abf902
update ld.so.conf for paths to libraries
glimberg Sep 3, 2025
9d73c34
new modified startup script for central controller docker images with…
glimberg Sep 3, 2025
3ad352c
no trailing comma on bigtable block
glimberg Sep 3, 2025
6ceb8ea
text alignment
glimberg Sep 3, 2025
4f07599
add jemalloc
glimberg Sep 3, 2025
2416c42
change tag to match existing
glimberg Sep 4, 2025
4516e6a
need a conda init here first apparently
glimberg Sep 4, 2025
96aa893
stray backtick
glimberg Sep 4, 2025
158d245
also have to add postgres to the container for pg_isready
glimberg Sep 4, 2025
1da9e24
no absolute path for pg_isready
glimberg Sep 4, 2025
092fc26
ok back to full path
glimberg Sep 4, 2025
d216a37
run process in conda env directly from docker
glimberg Sep 4, 2025
c9c8e95
debug output of main script
glimberg Sep 4, 2025
b94fa2d
.
glimberg Sep 4, 2025
7e4e7ef
fix case for redis: null
glimberg Sep 4, 2025
ce84de6
and instead of or in postgres check
glimberg Sep 4, 2025
6866535
debug printf
glimberg Sep 4, 2025
f33e706
get a running controller in docker
glimberg Sep 4, 2025
73e3287
debugging runtime link issues on arm64
glimberg Sep 4, 2025
2264452
try to make this work on both x64 & arm64
glimberg Sep 4, 2025
7d5a60b
will this make arm64 containers work?
glimberg Sep 4, 2025
40f6508
add conda builder dockerfile
glimberg Sep 4, 2025
70d24fc
trying to build in a docker container
glimberg Sep 4, 2025
8bd96d3
build in containers
glimberg Sep 4, 2025
67526d4
move up docker auth
glimberg Sep 4, 2025
3616c40
move up the gcp auth step
glimberg Sep 4, 2025
dcd583f
cleanup controller github action
glimberg Sep 4, 2025
f208007
enable otel exporter
glimberg Sep 4, 2025
b16d937
fix otel exporting
glimberg Sep 4, 2025
20746b2
query fix
glimberg Sep 4, 2025
3b7958a
another query fix
glimberg Sep 4, 2025
e9565cf
another query fix
glimberg Sep 4, 2025
a18e370
another query fix
glimberg Sep 4, 2025
a061c86
fix
glimberg Sep 5, 2025
48ff61b
fix
glimberg Sep 5, 2025
282d7c7
another fix
glimberg Sep 5, 2025
ba6200f
add a ChangeSource enum to the change protobuf messages
glimberg Sep 5, 2025
74f0525
Add `frontend` column to networks & network_memberships tables so the…
glimberg Sep 5, 2025
024824c
wire up pubsub outgoing status changes from controller -> CV2
glimberg Sep 5, 2025
7ad264d
whoops. mesed up the migrate naming convention
glimberg Sep 5, 2025
3d72a43
misc bugfixes
glimberg Sep 6, 2025
69efa92
apply patch to libnatpmp repo so we can compile on macOS with CMake
glimberg Sep 6, 2025
36219c5
compiler on mac doesn't like this. not really needed though
glimberg Sep 6, 2025
a78ac17
fix compile & link on macOS
glimberg Sep 6, 2025
71d68e9
fix stack corruption in DB::get
glimberg Sep 8, 2025
ebf66b7
fix typo in cmake file
glimberg Sep 8, 2025
006ced2
more fixes
glimberg Sep 8, 2025
190d836
alloc meatadata with new so pubsub can delete it
glimberg Sep 8, 2025
f51bfdb
delete pubsub subscription on shutdown
glimberg Sep 8, 2025
88f08fa
append 8 random hex chars to the subscription id
glimberg Sep 8, 2025
934aa93
forgot a ;
glimberg Sep 8, 2025
1ba4ccd
pass version info to status writer
glimberg Sep 8, 2025
1d65c1e
back to bulk apply for status updates in BigTable
glimberg Sep 8, 2025
facca36
only update os, architecture and client version if they've changed (o…
glimberg Sep 8, 2025
ee87eb3
removing some log output
glimberg Sep 8, 2025
012443a
wire up pubsub notifications from controller to frontend
glimberg Sep 8, 2025
7aa451b
clean up deprecation warnings in pqxx
glimberg Sep 10, 2025
493cc4f
fix version string
glimberg Sep 10, 2025
1ce37e7
add `use_for_new_networks` column in controller table
glimberg Sep 11, 2025
ad1fc5f
add tables for the controller load log and sso nonces & expiry
glimberg Sep 13, 2025
cb2de5a
fix migration
glimberg Sep 13, 2025
6113bad
make pubsub topics configurable
glimberg Sep 18, 2025
d96d3b2
try making the controller attach to an existing pubsub subscription i…
glimberg Sep 22, 2025
6196e87
only create the subscription if pubsub emulator is being used.
glimberg Sep 22, 2025
069d7c1
set objtype on messages received via PubSub
glimberg Sep 25, 2025
e51e516
fix subscription creation
glimberg Sep 25, 2025
c6b7c26
query fix for new networks
glimberg Sep 25, 2025
315bf24
json field fix
glimberg Sep 25, 2025
97d20a1
more logging for errors on pubsub listener
glimberg Sep 30, 2025
02908e5
stray ` got in there
glimberg Sep 30, 2025
20a67ab
fix attempted null -> string conversion
glimberg Oct 1, 2025
b4f018b
debug output from parsing pubsub messages
glimberg Oct 1, 2025
f028213
debug output
glimberg Oct 1, 2025
dad1a1e
more logging
glimberg Oct 1, 2025
aecd7fd
more logging
glimberg Oct 1, 2025
1f557b5
more debug output
glimberg Oct 1, 2025
7faf705
make the default an empty array here
glimberg Oct 1, 2025
80f8213
fix tags/capabilities?
glimberg Oct 1, 2025
a8b5c89
think this is where things are crashing, but I'm not sure why yet. C…
glimberg Oct 1, 2025
fb75369
throwing stuff at the wall cuz I can't actually debug this right now
glimberg Oct 1, 2025
3bbf194
pubsub writer should work now
glimberg Oct 1, 2025
0d21250
one last json parsing fix
glimberg Oct 1, 2025
4861b7d
one last json parsing fix. but really this time
glimberg Oct 2, 2025
a75d06a
cleaning up some gross JSON code
glimberg Oct 2, 2025
18714c7
add explicit nack if there's an error processing a pubsub message
glimberg Oct 2, 2025
1ef7ea0
Fixing more JSON issues
glimberg Oct 2, 2025
6df7366
no need for these timeouts
glimberg Oct 2, 2025
fe221b9
debug output for IP addressing & fixing order of operations in a coup…
glimberg Oct 6, 2025
6b74bf2
fix assign mode json
glimberg Oct 6, 2025
b92fb93
Merge branch 'dev' into gl/ctl-pubsub
glimberg Oct 6, 2025
946d96f
dont NACK failed messages. That gets us into a loop of failing the s…
glimberg Oct 9, 2025
46a8cd7
robustify the handling of tags/capabilities/rules which are strings o…
glimberg Oct 9, 2025
4736767
more robustifying incoming messages
glimberg Oct 9, 2025
e3f65ff
compiler fix
glimberg Oct 9, 2025
19ccc98
more variations on checking json
glimberg Oct 9, 2025
bf0fe2c
these should be empty json arrays, not just "[]".
glimberg Oct 9, 2025
77aa8c7
missed one
glimberg Oct 9, 2025
76ba890
ensure change source is controller if otherwise unset
glimberg Oct 9, 2025
c21ff23
Added some more logging to the ctl around deauths
glimberg Oct 27, 2025
30c4484
Set ordering key on pubsub message publishing.
glimberg Oct 27, 2025
5c27068
Enable cross-service propagation of otel trace metadata
glimberg Oct 30, 2025
00dca6a
Merge branch 'dev' into gl/ctl-pubsub
glimberg Nov 6, 2025
50daf95
controller build readme update
glimberg Nov 12, 2025
2ba50f4
set --provenance false on docker build to try and fix docker image cr…
glimberg Nov 13, 2025
68a9634
Merge branch 'dev' into gl/ctl-pusub
glimberg Jan 23, 2026
ccb9a45
Remove extra verbose logging from controller
glimberg Jan 23, 2026
35f7bf2
disable peer metrics in Central controller
glimberg Jan 23, 2026
c653e76
WIP: Update sso info retrieval method
glimberg Feb 24, 2026
0f0e6b3
add a linked_id column to the oidc_config table.
glimberg Feb 25, 2026
ae7ee51
fix db migrations
glimberg Feb 25, 2026
0ad6b19
drop index
glimberg Feb 25, 2026
38f4d12
woops. out of order here
glimberg Feb 25, 2026
03aa33b
set network member frontend based on the network its a member of
glimberg Mar 12, 2026
a840b94
add SSO nonce/auth PubSub messaging with frontend routing
glimberg Mar 17, 2026
2c57f85
add assigned_central_version column to controllers_ctl
glimberg Mar 17, 2026
d9507dd
Undo change to old migration that shouldn't have been made
glimberg Mar 18, 2026
7faf30d
another fix
glimberg Mar 18, 2026
e49b347
plumb through config changes for sso pubsub
glimberg Mar 19, 2026
7ec4246
configure assigned central version in startup script
glimberg Mar 19, 2026
b047038
print a message when the SSO PSK is configured
glimberg Mar 31, 2026
895b060
temporary logging
glimberg Mar 31, 2026
78b25f4
update settings to enable SSO networks
glimberg Mar 31, 2026
dd6e69f
sso query fix in controller
glimberg Mar 31, 2026
20f7311
Skip redundant nonce sending with an expiry time of 0
glimberg Apr 1, 2026
ea5c91b
Remove smee from CentralDB.
glimberg Apr 2, 2026
af7eae5
Added a little bit more logging for the node checkin/bigtable write p…
glimberg Apr 3, 2026
1f3a04f
periodic queue size logging, and fix some db connection leaks
glimberg Apr 3, 2026
4ca5c9b
fix poison pill blocking proccessing
glimberg Apr 11, 2026
910334c
Fix silent PubSub message loss in controller subscription loop
glimberg Apr 11, 2026
d2361a9
logging
glimberg Apr 11, 2026
0e8ec66
make sure subscribe pulls stay running
glimberg Apr 11, 2026
23d395d
change sso topic names for clarity
glimberg Apr 30, 2026
8c3a777
addressing pr comments
glimberg May 4, 2026
f0522a7
fix a typo in some json handling that could be affecting an issue I'm…
glimberg May 8, 2026
b79592c
Bugfix pass
glimberg May 13, 2026
7b44e0a
Fix json key inconsistency in pubsub writer
glimberg May 13, 2026
1c75584
align JSON keys between CentralDB and PubSub listener/writer
glimberg May 13, 2026
ac20c32
update network.proto in line with CV1 and CV2
glimberg May 14, 2026
9a9a8c0
fix for missing field in json
glimberg May 14, 2026
80f5e81
ensure controller doesn't change assigned frontend
glimberg May 19, 2026
b142715
handle nulls for remote trace target
glimberg May 27, 2026
346dc90
remove noisy log
glimberg May 28, 2026
29f5464
Merge branch 'dev' into gl/ctl-pubsub
glimberg May 28, 2026
3dffacc
cargo fix
glimberg May 28, 2026
f76e6b9
This workflow does need to be removed from this branch.
glimberg May 28, 2026
174130c
More sso error logging & removing a few logs as well
glimberg Jun 2, 2026
eec53a5
Add handling sso networks for both CV1 & CV2 simultaneously
glimberg Jun 2, 2026
af7c882
perf(controller): drop per-row BigTable reads in status writer
glimberg Jun 10, 2026
a001eba
better closed connection handling to postgres
glimberg Jun 10, 2026
a3a45a7
Better data handling if a db write fails
glimberg Jun 10, 2026
fede9b9
better logging of commit thread ticks
glimberg Jun 10, 2026
85eec45
remove db check from onlineNotificationThread
glimberg Jun 10, 2026
407bfdf
fix pubsub flood on ctl startup
glimberg Jun 10, 2026
a4904c9
Repo cleanup.
glimberg Jun 12, 2026
378dd27
main controller cmake file cleanup
glimberg Jun 12, 2026
052ea55
bring CMake in line with make-linux/mac/bsd
glimberg Jun 13, 2026
e09e7b5
Fix PIC/PIE flags
glimberg Jun 13, 2026
0e637a1
More linux/mac cmake cleanup
glimberg Jun 15, 2026
f1c6a64
build fix
glimberg Jun 15, 2026
8ae153b
Set thinkgs up for Windows in CMake
glimberg Jun 15, 2026
14faaaa
update to use makefiles by default on *ix
glimberg Jun 15, 2026
4988d53
fix linking via CMake on Windows
glimberg Jun 15, 2026
404fa9b
fix incompatible options on crypto files in windows
glimberg Jun 15, 2026
deee555
fix deps so that architecture is taken into account
glimberg Jun 16, 2026
ace5352
Bump cpp-httplib so it supports win32
glimberg Jun 16, 2026
c02c649
more build updates.
glimberg Jun 16, 2026
b6d5fb6
set vcpagkage baseline and remove comment with text windows doesn't like
glimberg Jun 16, 2026
fd98e0b
Addressing comments
glimberg Jun 17, 2026
1112281
bugfixes
glimberg Jun 17, 2026
8271fca
Pubsub devlivery reliability updates
glimberg Jun 17, 2026
6f57a77
Better connection handling for postgres status writer
glimberg Jun 17, 2026
4a517e2
status update batch delivery reliablilty
glimberg Jun 17, 2026
7be64c6
Concurrency hygene updates
glimberg Jun 17, 2026
7192b65
Correcting a few things
glimberg Jun 17, 2026
afd8a82
fix printf, connection pool smart pointer semantics, wait for ready spin
glimberg Jun 17, 2026
bf42649
Conneciton pool update to a timed wait on connection pool exhaustion
glimberg Jun 17, 2026
4706ed9
enable metrics by default for the central controller
glimberg Jun 17, 2026
ab9efc7
use the checkin timestamps for the cell timestamps in BigTable
glimberg Jun 17, 2026
5640b82
Update build.sh with build instructions
glimberg Jun 17, 2026
75b51ec
Ensure everything in nonfree/controller has the proper header comment
glimberg Jun 17, 2026
fcb016b
standardize log formatting across the controller
glimberg Jun 17, 2026
8304ec7
update documentation for ConnectionPool
glimberg Jun 17, 2026
64cc25b
bump actions to get rid of node warnings
glimberg Jun 17, 2026
4bcff9d
Fix the sso template for errors returned by IdP
glimberg Jun 22, 2026
0797626
Fix a potential crash on central controller shutdown
glimberg Jun 26, 2026
edcc066
Add a SIGSEGV handler to print a stack trace for central controllers
glimberg Jun 26, 2026
1f6a1fd
Remove ZT_CONTROLLER=1 from makefile. No longer used to build central
glimberg Jun 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
93 changes: 46 additions & 47 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,71 @@ BreakBeforeBraces: Stroustrup
IndentWidth: 4
TabWidth: 4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: 'true'
AlignConsecutiveAssignments: 'false'
AlignConsecutiveDeclarations: 'false'
AlignConsecutiveMacros: "true"
AlignConsecutiveAssignments: "false"
AlignConsecutiveDeclarations: "false"
AlignEscapedNewlines: Right
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllArgumentsOnNextLine: 'false'
AllowAllConstructorInitializersOnNextLine: 'false'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortBlocksOnASingleLine: 'true'
AllowShortCaseLabelsOnASingleLine: 'false'
AlignOperands: "true"
AlignTrailingComments: "true"
AllowAllArgumentsOnNextLine: "false"
AllowAllConstructorInitializersOnNextLine: "false"
AllowAllParametersOfDeclarationOnNextLine: "false"
AllowShortBlocksOnASingleLine: "true"
AllowShortCaseLabelsOnASingleLine: "false"
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AlwaysBreakAfterReturnType: None
BinPackArguments: 'false'
BinPackParameters: 'false'
BinPackArguments: "true"
BinPackParameters: OnePerLine
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: 'true'
BreakBeforeTernaryOperators: "true"
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
CompactNamespaces: 'false'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
ConstructorInitializerIndentWidth: '4'
ContinuationIndentWidth: '4'
Cpp11BracedListStyle: 'false'
FixNamespaceComments: 'true'
CompactNamespaces: "false"
ConstructorInitializerAllOnOneLineOrOnePerLine: "true"
ConstructorInitializerIndentWidth: "4"
ContinuationIndentWidth: "4"
Cpp11BracedListStyle: "false"
FixNamespaceComments: "true"
IncludeBlocks: Regroup
IndentCaseLabels: 'true'
IndentCaseLabels: "true"
IndentPPDirectives: None
IndentWrappedFunctionNames: 'false'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
MaxEmptyLinesToKeep: '1'
IndentWrappedFunctionNames: "false"
KeepEmptyLinesAtTheStartOfBlocks: "false"
MaxEmptyLinesToKeep: "1"
NamespaceIndentation: None
PointerAlignment: Left
ReflowComments: 'true'
SortIncludes: 'true'
SortUsingDeclarations: 'true'
SpaceAfterCStyleCast: 'false'
SpaceAfterLogicalNot: 'true'
SpaceAfterTemplateKeyword: 'true'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeCpp11BracedList: 'true'
SpaceBeforeCtorInitializerColon: 'true'
SpaceBeforeInheritanceColon: 'true'
ReflowComments: "true"
SortIncludes: "true"
SortUsingDeclarations: "true"
SpaceAfterCStyleCast: "false"
SpaceAfterLogicalNot: "true"
SpaceAfterTemplateKeyword: "true"
SpaceBeforeAssignmentOperators: "true"
SpaceBeforeCpp11BracedList: "true"
SpaceBeforeCtorInitializerColon: "true"
SpaceBeforeInheritanceColon: "true"
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: 'true'
SpaceInEmptyParentheses: 'false'
SpacesBeforeTrailingComments: '3'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'true'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
UseTab: 'Always'
SpaceBeforeRangeBasedForLoopColon: "true"
SpaceInEmptyParentheses: "false"
SpacesBeforeTrailingComments: "3"
SpacesInAngles: "false"
SpacesInCStyleCastParentheses: "false"
SpacesInContainerLiterals: "true"
SpacesInParentheses: "false"
SpacesInSquareBrackets: "false"
UseTab: "Always"

---
Language: Cpp
Standard: Cpp03
ColumnLimit: '240'
ColumnLimit: "120"
---
Language: ObjC
ColumnLimit: '240'
ColumnLimit: "120"
---
Language: Java
ColumnLimit: '240'
ColumnLimit: "120"
---
Language: CSharp
ColumnLimit: '240'
...
ColumnLimit: "120"
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
.git/
workspace/
# Local from-source dependency builds (scripts/bootstrap-deps.sh) and CMake output;
# never ship these into an image -- they are host-specific and large.
.deps/
.deps-build/
build/
build-*/
out/
# Dockerfiles are supplied via -f; keeping them out of the context means editing
# them does not invalidate the COPY layers (and the heavy build cache).
ext/central-controller-docker/Dockerfile*
67 changes: 0 additions & 67 deletions .github/workflows/central-controller-cv1.yaml

This file was deleted.

104 changes: 104 additions & 0 deletions .github/workflows/central-controller.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# on:
# workflow_dispatch:
on:
push:
workflow_dispatch:

jobs:
central_controller:
name: Central Controller Build
strategy:
matrix:
runner: [gha-runner-x64, gha-runner-arm64]
runs-on: ${{ matrix.runner }}
steps:
- name: checkout
uses: actions/checkout@v6

- name: GCP Auth
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.DOCKER_REGISTRY_WRITER}}

- name: Set up GCloud CLI
uses: google-github-actions/setup-gcloud@v3
with:
# v3 no longer uses the tool cache by default; restore the prior caching
# behavior on these self-hosted runners (perf: avoids re-fetching the SDK).
cache: true

- name: Docker Auth
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet

- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT

- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build & Push Docker Image
# Registry layer cache (mode=max) so the expensive builder stage -- which
# builds opentelemetry-cpp + google-cloud-cpp from source -- is reused across
# runs and fresh runners. The cache invalidates automatically when the
# bootstrap inputs change. Cache is per-arch (the deps layer is arch-specific).
run: |
CACHE=us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller-buildcache:${{ runner.arch }}
docker buildx build \
-t us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-${{ runner.arch }} \
-f ext/central-controller-docker/Dockerfile \
--cache-from type=registry,ref=$CACHE \
--cache-to type=registry,ref=$CACHE,mode=max \
--provenance false \
--push .

multi-arch-docker:
runs-on: gha-runner-x64
needs: central_controller
steps:
- name: Checkout
uses: actions/checkout@v6

- name: GCP Auth
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.DOCKER_REGISTRY_WRITER}}

- name: Set up GCloud CLI
uses: google-github-actions/setup-gcloud@v3
with:
# v3 no longer uses the tool cache by default; restore the prior caching
# behavior on these self-hosted runners (perf: avoids re-fetching the SDK).
cache: true

- name: Docker Auth
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet

- name: Get branch name and sanitize
id: branch
run: |
BRANCH_NAME="${GITHUB_REF##*/}"
SANITIZED_BRANCH="${BRANCH_NAME//\//-}"
echo "branch_name=$SANITIZED_BRANCH" >> $GITHUB_OUTPUT

- name: Get short git commit SHA
id: sha
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV

- name: Create and push multi-arch manifest
run: |
docker manifest create us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }} \
--amend us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-X64 \
--amend us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}-ARM64
docker manifest push us-central1-docker.pkg.dev/zerotier-421eb9/docker-images/ztcentral-controller:${{ env.COMMIT_SHORT_SHA }}-${{ steps.branch.outputs.branch_name }}
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ __pycache__
*.pyc
*_source.tar.bz2
snap/.snapcraft
build/

# Local dependency bootstrap output (scripts/bootstrap-deps.sh): the install
# prefix and the build/clone scratch dir. Large + host-specific; never commit.
.deps/
.deps-build/

# local Claude configurations
.claude/*.local.*
.claude/*.local.*
28 changes: 28 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Central Controller build dependencies for macOS development.
#
# brew bundle # install the deps below
# ZT_CONTROLLER_DEPS=1 scripts/bootstrap-deps.sh # build the two pinned controller deps (full OTel + google-cloud-cpp)
#
# The two version-sensitive C++ libraries (opentelemetry-cpp, google-cloud-cpp)
# are NOT taken from Homebrew -- they are pinned and built from source by
# scripts/bootstrap-deps.sh so every dev/CI machine uses the same versions
# (the role conda previously filled). Everything below is stable enough to take
# from Homebrew.

brew "cmake"
brew "ninja"
brew "pkg-config"
brew "rustup-init" # then: rustup-init -y && rustup default stable

brew "libpqxx"
brew "libpq" # keg-only; add $(brew --prefix libpq) to CMAKE_PREFIX_PATH so find_package(PostgreSQL) resolves
brew "hiredis"
brew "jemalloc"
brew "nlohmann-json"
brew "openssl@3"
brew "abseil"
brew "protobuf"
brew "grpc"
brew "googletest" # google-cloud-cpp requires GTest/GMock at configure (builds its *_mocks libs)
brew "curl"
brew "inja"
Loading
Loading