File tree 3 files changed +17
-7
lines changed
3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,12 @@ job "orchestrator-${latest_orchestrator_job_id}" {
5
5
priority = 90
6
6
7
7
group "client-orchestrator" {
8
- network {
9
- port "orchestrator" {
10
- static = " ${ port } "
11
- }
12
- }
8
+ # TODO: Return after migrating to the new version
9
+ # network {
10
+ # port "orchestrator" {
11
+ # static = "${port}"
12
+ # }
13
+ # }
13
14
14
15
service {
15
16
name = " orchestrator"
83
84
84
85
config {
85
86
command = " /bin/bash"
86
- args = [" -c" , " chmod +x local/orchestrator && local/orchestrator --port ${ port } --proxy-port ${ proxy_port } " ]
87
+ args = [" -c" , " chmod +x local/orchestrator && local/orchestrator --port ${ port } --proxy-port ${ proxy_port } --wait 0 " ]
87
88
}
88
89
89
90
artifact {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ run-debug:
47
47
ORCHESTRATOR_SERVICES=$(ORCHESTRATOR_SERVICES ) \
48
48
GCP_DOCKER_REPOSITORY_NAME=$(GCP_DOCKER_REPOSITORY_NAME ) \
49
49
GOOGLE_SERVICE_ACCOUNT_BASE64=$(GOOGLE_SERVICE_ACCOUNT_BASE64 ) \
50
- ./bin/orchestrator
50
+ ./bin/orchestrator --wait 0
51
51
52
52
.PHONY : upload/orchestrator
53
53
upload/orchestrator :
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"os/signal"
12
12
"slices"
13
13
"syscall"
14
+ "time"
14
15
15
16
"go.opentelemetry.io/otel"
16
17
"go.uber.org/zap"
@@ -41,6 +42,7 @@ type Closeable interface {
41
42
const (
42
43
defaultPort = 5008
43
44
defaultProxyPort = 5007
45
+ defaultWait = 30
44
46
)
45
47
46
48
var forceStop = env .GetEnv ("FORCE_STOP" , "false" ) == "true"
@@ -49,6 +51,7 @@ var commitSHA string
49
51
func main () {
50
52
port := flag .Uint ("port" , defaultPort , "orchestrator server port" )
51
53
proxyPort := flag .Uint ("proxy-port" , defaultProxyPort , "orchestrator proxy port" )
54
+ wait := flag .Uint ("wait" , defaultWait , "orchestrator proxy port" )
52
55
flag .Parse ()
53
56
54
57
if * port > math .MaxUint16 {
@@ -61,6 +64,12 @@ func main() {
61
64
os .Exit (1 )
62
65
}
63
66
67
+ // TODO: Remove after the orchestrator is fully migrated to the new job definition
68
+ if * wait > 0 {
69
+ log .Printf ("waiting %d seconds before starting orchestrator" , * wait )
70
+ time .Sleep (time .Duration (* wait ) * time .Second )
71
+ }
72
+
64
73
result := run (* port , * proxyPort )
65
74
66
75
if result == false {
You can’t perform that action at this time.
0 commit comments