Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Breaking] listen_address renamed/remapped in config #476

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 18 additions & 6 deletions deployment-examples/docker-compose/local-storage-cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"listener": {
"http": {
"socket_address": "0.0.0.0:50051"
}
},
"services": {
"cas": {
"main": {
Expand All @@ -63,18 +67,26 @@
}
}, {
// Only publish metrics on a private port.
"listen_address": "0.0.0.0:50061",
"listener": {
"http": {
"socket_address": "0.0.0.0:50061"
}
},
"services": {
"prometheus": {
"path": "/metrics"
}
}
},
{
"listen_address": "0.0.0.0:50071",
"tls": {
"cert_file": "/root/example-do-not-use-in-prod-rootca.crt",
"key_file": "/root/example-do-not-use-in-prod-key.pem"
"listener": {
"http": {
"socket_address": "0.0.0.0:50071",
"tls": {
"cert_file": "/root/example-do-not-use-in-prod-rootca.crt",
"key_file": "/root/example-do-not-use-in-prod-key.pem"
}
}
},
"services": {
"cas": {
Expand Down
12 changes: 10 additions & 2 deletions deployment-examples/docker-compose/scheduler.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50052",
"listener": {
"http": {
"socket_address": "0.0.0.0:50052",
}
},
"services": {
"ac": {
"main": {
Expand All @@ -49,7 +53,11 @@
}
}
}, {
"listen_address": "0.0.0.0:50061",
"listener": {
"http": {
"socket_address": "0.0.0.0:50061",
}
},
"services": {
// Note: This should be served on a different port, because it has
// a different permission set than the other services.
Expand Down
8 changes: 6 additions & 2 deletions deployment-examples/terraform/AWS/scripts/cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"verify_size": true,
"verify_hash": true
}
},
}
},
"schedulers": {
"MAIN_SCHEDULER": {
Expand All @@ -122,7 +122,11 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"listener": {
"http": {
"socket_address": "0.0.0.0:50051",
}
},
"services": {
"cas": {
"main": {
Expand Down
12 changes: 10 additions & 2 deletions deployment-examples/terraform/AWS/scripts/scheduler.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50052",
"listener": {
"http": {
"socket_address": "0.0.0.0:50052",
}
},
"services": {
"ac": {
"main": {
Expand All @@ -141,7 +145,11 @@
}
}
}, {
"listen_address": "0.0.0.0:50061",
"listener": {
"http": {
"socket_address": "0.0.0.0:50061",
}
},
"services": {
"prometheus": {
"path": "/metrics"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
"servers": [{
// Non-public apis. We re-export the CAS services so we don't need to go through
// an external load balancer.
"listen_address": "0.0.0.0:50052",
"listener": {
"http": {
"socket_address": "0.0.0.0:50052",
}
},
"services": {
"prometheus": {
"path": "/metrics"
Expand Down
38 changes: 23 additions & 15 deletions deployment-examples/terraform/GCP/module/scripts/cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,22 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"tls": {
"cert_file": "${NATIVELINK_CERT_FILE:-}",
"key_file": "${NATIVELINK_KEY_FILE:-}"
},
"advanced_http": {
"http2_keep_alive_interval": 10
},
// External apis support compression.
"compression": {
"send_compression_algorithm": "gzip",
"accepted_compression_algorithms": ["gzip"]
"listener": {
"http": {
"socket_address": "0.0.0.0:50051",
"tls": {
"cert_file": "${NATIVELINK_CERT_FILE:-}",
"key_file": "${NATIVELINK_KEY_FILE:-}"
},
"advanced_http": {
"http2_keep_alive_interval": 10
},
// External apis support compression.
"compression": {
"send_compression_algorithm": "gzip",
"accepted_compression_algorithms": ["gzip"]
}
}
},
"services": {
"cas": {
Expand All @@ -115,9 +119,13 @@
}, {
// Non-public apis. We re-export the CAS services so we don't need to go through
// an external load balancer.
"listen_address": "0.0.0.0:50052",
"advanced_http": {
"http2_keep_alive_interval": 10
"listener": {
"http": {
"socket_address": "0.0.0.0:50052",
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
"services": {
"prometheus": {
Expand Down
38 changes: 25 additions & 13 deletions deployment-examples/terraform/GCP/module/scripts/scheduler.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,17 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"tls": {
"cert_file": "${nativelink_CERT_FILE:-}",
"key_file": "${nativelink_KEY_FILE:-}"
},
"advanced_http": {
"http2_keep_alive_interval": 10
"listener": {
"http": {
"socket_address": "0.0.0.0:50051",
"tls": {
"cert_file": "${nativelink_CERT_FILE:-}",
"key_file": "${nativelink_KEY_FILE:-}"
},
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
"services": {
"ac": {
Expand All @@ -117,9 +121,13 @@
}, {
// Non-public apis. We re-export the Scheduler services on a non-tls connection
// for local services that don't need a load balancer.
"listen_address": "0.0.0.0:50052",
"advanced_http": {
"http2_keep_alive_interval": 10
"listener": {
"http": {
"socket_address": "0.0.0.0:50052",
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
"services": {
"prometheus": {
Expand All @@ -146,9 +154,13 @@
}
}, {
// Internal Worker endpoint.
"listen_address": "0.0.0.0:50061",
"advanced_http": {
"http2_keep_alive_interval": 10
"listener": {
"http": {
"socket_address": "0.0.0.0:50061",
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
"services": {
// Note: This should be served on a different port, because it has
Expand Down
20 changes: 14 additions & 6 deletions deployment-examples/terraform/GCP/module/scripts/worker.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,24 @@
}
}],
"servers": [{
"listen_address": "0.0.0.0:50051",
"advanced_http": {
"http2_keep_alive_interval": 10
"listener": {
"http": {
"socket_address": "0.0.0.0:50051",
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
// Only /status will be served.
"services": {}
}, {
"listen_address": "0.0.0.0:50052",
"advanced_http": {
"http2_keep_alive_interval": 10
"listener": {
"http": {
"socket_address": "0.0.0.0:50052",
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
"services": {
"prometheus": {
Expand Down
9 changes: 8 additions & 1 deletion nativelink-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ A very basic configuration that is a pure in-memory store is:
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"listener": {
"http": {
"socket_address": "0.0.0.0:50051",
"advanced_http": {
"http2_keep_alive_interval": 10
}
}
},
"services": {
"cas": {
"main": {
Expand Down
12 changes: 10 additions & 2 deletions nativelink-config/examples/basic_cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
}],
"servers": [{
"name": "public",
"listen_address": "0.0.0.0:50051",
"listener": {
"http": {
"socket_address": "0.0.0.0:50051"
}
},
"services": {
"cas": {
"main": {
Expand Down Expand Up @@ -126,7 +130,11 @@
}
}, {
"name": "private_workers_servers",
"listen_address": "0.0.0.0:50061",
"listener": {
"http": {
"socket_address": "0.0.0.0:50061"
}
},
"services": {
"prometheus": {
"path": "/metrics"
Expand Down
12 changes: 10 additions & 2 deletions nativelink-config/examples/filesystem_cas.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"listener": {
"http": {
"socket_address": "0.0.0.0:50051"
}
},
"services": {
"cas": {
"main": {
Expand Down Expand Up @@ -148,7 +152,11 @@
}
}
}, {
"listen_address": "0.0.0.0:50061",
"listener": {
"http": {
"socket_address": "0.0.0.0:50061"
}
},
"services": {
// Note: This should be served on a different port, because it has
// a different permission set than the other services.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@
}
},
"servers": [{
"listen_address": "0.0.0.0:50051",
"listener": {
"http": {
"socket_address": "0.0.0.0:50051"
}
},
"services": {
"cas": {
"main": {
Expand Down