-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the following commit, we removed logic from bb_scheduler to talk to AWS ASG lifecycle hooks: buildbarn/bb-remote-execution@78e027f There is no need to let this be part of bb_scheduler itself, as we can easily move that into a separate binary. This change adds such a binary to the bb-autoscaler repository. Even if people don't need this binary in literal form, it still acts as useful documentation for how to add graceful worker termination to your cluster.
- Loading branch information
1 parent
1e92910
commit 19862fe
Showing
19 changed files
with
1,362 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
load("@com_github_buildbarn_bb_storage//tools:container.bzl", "container_push_official") | ||
load("@io_bazel_rules_docker//go:image.bzl", "go_image") | ||
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") | ||
|
||
go_library( | ||
name = "bb_asg_lifecycle_hook_lib", | ||
srcs = ["main.go"], | ||
importpath = "github.com/buildbarn/bb-autoscaler/cmd/bb_asg_lifecycle_hook", | ||
visibility = ["//visibility:private"], | ||
deps = [ | ||
"//pkg/cloud/aws", | ||
"//pkg/proto/configuration/bb_asg_lifecycle_hook", | ||
"@com_github_aws_aws_sdk_go_v2_service_autoscaling//:autoscaling", | ||
"@com_github_aws_aws_sdk_go_v2_service_sqs//:sqs", | ||
"@com_github_buildbarn_bb_remote_execution//pkg/proto/buildqueuestate", | ||
"@com_github_buildbarn_bb_storage//pkg/cloud/aws", | ||
"@com_github_buildbarn_bb_storage//pkg/global", | ||
"@com_github_buildbarn_bb_storage//pkg/program", | ||
"@com_github_buildbarn_bb_storage//pkg/util", | ||
"@org_golang_google_grpc//codes", | ||
"@org_golang_google_grpc//status", | ||
], | ||
) | ||
|
||
go_binary( | ||
name = "bb_asg_lifecycle_hook", | ||
embed = [":bb_asg_lifecycle_hook_lib"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
go_image( | ||
name = "bb_asg_lifecycle_hook_container", | ||
embed = [":bb_asg_lifecycle_hook_lib"], | ||
pure = "on", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
container_push_official( | ||
name = "bb_asg_lifecycle_hook_container_push", | ||
component = "bb-asg-lifecycle-hook", | ||
image = ":bb_asg_lifecycle_hook_container", | ||
) |
Oops, something went wrong.