diff --git a/.gitignore b/.gitignore index 68f9d9496..980569933 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -bin/beam +bin/gateway bin/runner bin/worker tmp/* @@ -15,4 +15,4 @@ venv terraform.tfstate* terraform.tfvars sdk/src/build -sdk/src/Beam.egg-info +sdk/src/beta9.egg-info diff --git a/Makefile b/Makefile index e8277c10f..1a2007fcb 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ runnerTag := latest setup: bash bin/setup.sh - make k3d-up beam-runner beam-worker beam - kubectl delete pod -l app=beam + make k3d-up runner worker gateway + kubectl delete pod -l app=gateway setup-sdk: poetry install -C sdk @@ -17,19 +17,19 @@ k3d-up: k3d-down: bash bin/k3d.sh down -beam: - docker build . --target build -f ./docker/Dockerfile.beam -t localhost:5001/beam:$(tag) - docker push localhost:5001/beam:$(tag) +gateway: + docker build . --target build -f ./docker/Dockerfile.gateway -t localhost:5001/beta9-gateway:$(tag) + docker push localhost:5001/beta9-gateway:$(tag) -beam-worker: - docker build . --target final --build-arg BASE_STAGE=dev -f ./docker/Dockerfile.worker -t localhost:5001/beam-worker:$(workerTag) - docker push localhost:5001/beam-worker:$(workerTag) +worker: + docker build . --target final --build-arg BASE_STAGE=dev -f ./docker/Dockerfile.worker -t localhost:5001/beta9-worker:$(workerTag) + docker push localhost:5001/beta9-worker:$(workerTag) bin/delete_workers.sh -beam-runner: +runner: for target in py311 py310 py39 py38; do \ - docker build . --target $$target --platform=linux/amd64 -f ./docker/Dockerfile.runner -t localhost:5001/beam-runner:$$target-$(runnerTag); \ - docker push localhost:5001/beam-runner:$$target-$(runnerTag); \ + docker build . --target $$target --platform=linux/amd64 -f ./docker/Dockerfile.runner -t localhost:5001/beta9-runner:$$target-$(runnerTag); \ + docker push localhost:5001/beta9-runner:$$target-$(runnerTag); \ done start: diff --git a/README.md b/README.md index 80fec16e5..99c4cc7d4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

-Logo +Logo

@@ -12,8 +12,8 @@ Twitter - - Tests Passing + + Tests Passing License

@@ -25,7 +25,9 @@ --- -Beam is an open-source platform for running remote containers directly from Python. It supports GPU/CUDA acceleration, allows you to scale out arbitrary Python code to hundreds of machines, easily deploy functions and task queues, and distribute workloads across various cloud providers (including bare metal providers). +Beta9 is an open-source platform for running remote containers directly from Python. It supports GPU/CUDA acceleration, allows you to scale out arbitrary Python code to hundreds of machines, easily deploy functions and task queues, and distribute workloads across various cloud providers (including bare metal providers). + +We use this platform internally at [Beam](https://beam.cloud) to run AI applications for users at scale. ## Features @@ -36,7 +38,7 @@ Beam is an open-source platform for running remote containers directly from Pyth ## How it works -Beam is designed for launching remote serverless containers very quickly. There are a few things that make this possible: +Beta9 is designed for launching remote serverless containers very quickly. There are a few things that make this possible: - A custom, lazy loading image format (CLIP) backed by S3/FUSE - A fast, redis-based scheduling engine @@ -49,8 +51,8 @@ Beam is designed for launching remote serverless containers very quickly. There ## Community & Support -Beam is powered by the community. If you need support, you can join any of these channels: +Beta9 is powered by the community. If you need support, you can join any of these channels: - [Slack](https://join.slack.com/t/beam-89x5025/shared_invite/zt-1ye1jzgg2-cGpMKuoXZJiT3oSzgPmN8g) \(Chat live with our engineering team\) -- [GitHub issues](https://github.com/slai-labs/beam/issues) \(Bug reports, feature requests, and anything roadmap related) +- [GitHub issues](https://github.com/beam-cloud/beta9/issues) \(Bug reports, feature requests, and anything roadmap related) - [Twitter](https://twitter.com/beam_cloud) \(Updates on releases) diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 883027274..000000000 --- a/TODO.md +++ /dev/null @@ -1 +0,0 @@ -**_TODO_** diff --git a/bin/k3d.sh b/bin/k3d.sh index 6aeb92914..8cf0d2b42 100644 --- a/bin/k3d.sh +++ b/bin/k3d.sh @@ -33,8 +33,8 @@ k3d_up() { esac k3d cluster create --config hack/k3d.yaml $extra_args - kubectl config set contexts.k3d-beam.namespace beam - okteto context use k3d-beam --namespace beam + kubectl config set contexts.k3d-beta9.namespace beta9 + okteto context use k3d-beta9 --namespace beta9 } k3d_down() { diff --git a/cmd/beam/main.go b/cmd/gateway/main.go similarity index 77% rename from cmd/beam/main.go rename to cmd/gateway/main.go index 989a6817a..fd59dafb4 100644 --- a/cmd/beam/main.go +++ b/cmd/gateway/main.go @@ -6,7 +6,7 @@ import ( "os/signal" "syscall" - "github.com/beam-cloud/beam/internal/gateway" + "github.com/beam-cloud/beta9/internal/gateway" ) func main() { @@ -22,5 +22,5 @@ func main() { <-stop - log.Println("beam stopped") + log.Println("gateway stopped") } diff --git a/cmd/worker/main.go b/cmd/worker/main.go index 3d82701a1..0ffcbcf4c 100644 --- a/cmd/worker/main.go +++ b/cmd/worker/main.go @@ -3,7 +3,7 @@ package main import ( "log" - "github.com/beam-cloud/beam/internal/worker" + "github.com/beam-cloud/beta9/internal/worker" ) func main() { diff --git a/deploy/aws-dev/modules/cluster/variables.tf b/deploy/aws-dev/modules/cluster/variables.tf index cd292ad2e..cdf1d2aa6 100644 --- a/deploy/aws-dev/modules/cluster/variables.tf +++ b/deploy/aws-dev/modules/cluster/variables.tf @@ -16,5 +16,5 @@ variable "k3s_worker_count" { } variable "k3s_cluster_name" { - default = "beamtest-cluster" + default = "beta9test-cluster" } \ No newline at end of file diff --git a/deploy/aws-dev/modules/k8s-resources/config.tpl b/deploy/aws-dev/modules/k8s-resources/config.tpl index b3ab5717d..5b6ea2e6e 100644 --- a/deploy/aws-dev/modules/k8s-resources/config.tpl +++ b/deploy/aws-dev/modules/k8s-resources/config.tpl @@ -10,22 +10,22 @@ database: redis: mode: single addrs: - - redis-master.beam:6379 + - redis-master.beta9:6379 password: "${redis_password}" enableTLS: false dialTimeout: 3s storage: mode: juicefs - fsName: beam-fs + fsName: beta9-fs fsPath: /data objectPath: /data/objects juicefs: - redisURI: redis://:${juicefs_redis_password}@juicefs-redis-master.beam:6379/0 + redisURI: redis://:${juicefs_redis_password}@juicefs-redis-master.beta9:6379/0 awsS3Bucket: ${juicefs_bucket} awsAccessKeyID: ${aws_access_key_id} awsSecretAccessKey: ${aws_secret_access_key} gateway: - host: beam.beam + host: gateway.beta9 port: 1993 imageService: cacheURL: @@ -42,7 +42,7 @@ imageService: secretAccessKey: ${aws_secret_access_key} runner: baseImageTag: latest - baseImageName: beam-runner + baseImageName: beta9-runner baseImageRegistry: public.ecr.aws/k2t1v1n6 tags: python3.8: py38-latest @@ -52,7 +52,7 @@ imageService: python3.12: py312-latest worker: pools: - beam-cpu: + default: jobSpec: nodeSelector: {} poolSizing: @@ -64,10 +64,10 @@ worker: # global pool attributes hostNetwork: false imageTag: latest - imageName: beam-worker + imageName: beta9-worker imageRegistry: public.ecr.aws/k2t1v1n6 imagePullSecrets: [] - namespace: beam + namespace: beta9 serviceAccountName: default # non-standard k8s job spec resourcesEnforced: false diff --git a/deploy/aws-dev/modules/k8s-resources/main.tf b/deploy/aws-dev/modules/k8s-resources/main.tf index 83dcfb115..3c5f93fd5 100644 --- a/deploy/aws-dev/modules/k8s-resources/main.tf +++ b/deploy/aws-dev/modules/k8s-resources/main.tf @@ -145,7 +145,7 @@ resource "helm_release" "redis" { repository = "https://charts.bitnami.com/bitnami" chart = "redis" version = "18.7.1" - namespace = "beam" + namespace = "beta9" create_namespace = true set { @@ -172,7 +172,7 @@ resource "helm_release" "juicefs_redis" { repository = "https://charts.bitnami.com/bitnami" chart = "redis" version = "18.7.1" - namespace = "beam" + namespace = "beta9" create_namespace = true set { diff --git a/deploy/aws-dev/variables.tf b/deploy/aws-dev/variables.tf index 12e6bc512..34f5f5c86 100644 --- a/deploy/aws-dev/variables.tf +++ b/deploy/aws-dev/variables.tf @@ -1,7 +1,7 @@ variable "prefix" { description = "Global prefix for all resources" type = string - default = "beamtest" # Set your desired prefix here + default = "beta9test" # Set your desired prefix here } variable "domain" { diff --git a/deploy/crusoe/README.md b/deploy/crusoe/README.md index b7696f24d..ec4536c88 100644 --- a/deploy/crusoe/README.md +++ b/deploy/crusoe/README.md @@ -1,6 +1,6 @@ -# Beam Arc on Crusoe Cloud +# Beta9 on Crusoe Cloud -This will help you run a single instance of Beam Arc on [Crusoe Cloud](https://docs.crusoecloud.com/). +This will help you run a single instance of Beta9 on [Crusoe Cloud](https://docs.crusoecloud.com/). ## Prereqs diff --git a/deploy/crusoe/main.tf b/deploy/crusoe/main.tf index 1d730a523..1f54da05a 100644 --- a/deploy/crusoe/main.tf +++ b/deploy/crusoe/main.tf @@ -1,5 +1,5 @@ locals { - name = "beam-arc" + name = "beam-beta9" ssh_key_content = file(var.ssh_key_path) } @@ -18,8 +18,8 @@ resource "crusoe_compute_instance" "this" { mount -t ext4 /dev/vda /data # cd /data - # git clone https://github.com/beam-cloud/beam.git - # cd beam + # git clone https://github.com/beam-cloud/beta9.git + # cd beta9 # make setup EOF diff --git a/docker/Dockerfile.beam b/docker/Dockerfile.gateway similarity index 80% rename from docker/Dockerfile.beam rename to docker/Dockerfile.gateway index e4d0e7b40..e050691da 100644 --- a/docker/Dockerfile.beam +++ b/docker/Dockerfile.gateway @@ -18,7 +18,7 @@ RUN go mod download && go mod verify COPY . . -RUN go build -o /workspace/bin/beam /workspace/cmd/beam/main.go +RUN go build -o /workspace/bin/gateway /workspace/cmd/gateway/main.go # Target used in production-like environments @@ -28,6 +28,6 @@ WORKDIR /workspace RUN apt autoclean -COPY --from=build /usr/local/bin/beam /usr/local/bin/ +COPY --from=build /usr/local/bin/gateway /usr/local/bin/ CMD ["tail", "-f", "/dev/null"] diff --git a/docker/Dockerfile.worker b/docker/Dockerfile.worker index 4bd4e8852..6c62ea3c4 100644 --- a/docker/Dockerfile.worker +++ b/docker/Dockerfile.worker @@ -58,7 +58,7 @@ make binaries EOT -# beam worker +# beta9 worker # ======================== FROM golang AS worker @@ -100,7 +100,7 @@ COPY --from=skopeo /usr/local/bin/skopeo /usr/local/bin/skopeo COPY --from=skopeo /workspace/default-policy.json /etc/containers/policy.json COPY --from=nvidia-container-toolkit /workspace/nvidia-container-runtime* /usr/bin/ COPY --from=worker /usr/local/bin/worker /usr/local/bin/worker -COPY ./sdk/src/beam /workspace/sdk +COPY ./sdk/src/beta9 /workspace/sdk VOLUME "/usr/lib/x86_64-linux-gnu" VOLUME "/usr/lib/aarch64-linux-gnu" diff --git a/go.mod b/go.mod index 1b3fb6de7..d32940964 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/beam-cloud/beam +module github.com/beam-cloud/beta9 go 1.21 diff --git a/hack/k3d.yaml b/hack/k3d.yaml index 983d2a95f..2e0c3080b 100644 --- a/hack/k3d.yaml +++ b/hack/k3d.yaml @@ -2,7 +2,7 @@ apiVersion: k3d.io/v1alpha5 kind: Simple metadata: - name: beam + name: beta9 image: docker.io/rancher/k3s:v1.28.5-k3s1 servers: 1 diff --git a/hack/okteto.yaml b/hack/okteto.yaml index f26323431..9e43095c8 100644 --- a/hack/okteto.yaml +++ b/hack/okteto.yaml @@ -1,15 +1,15 @@ dev: - beam: - image: registry.localhost:5000/beam:latest + gateway: + image: registry.localhost:5000/beta9-gateway:latest command: - /workspace/bin/hotreload.sh sync: - ../:/workspace environment: BUILD_COMMAND: | - go build -o /workspace/bin/beam /workspace/cmd/beam/main.go + go build -o /workspace/bin/gateway /workspace/cmd/gateway/main.go go build -o /workspace/bin/worker /workspace/cmd/worker/main.go - BUILD_BINARY_PATH: /workspace/bin/beam + BUILD_BINARY_PATH: /workspace/bin/gateway forward: - 1993:1993 - 1994:1994 diff --git a/internal/abstractions/endpoint/endpoint.go b/internal/abstractions/endpoint/endpoint.go index 0c7c3147a..293ebc002 100644 --- a/internal/abstractions/endpoint/endpoint.go +++ b/internal/abstractions/endpoint/endpoint.go @@ -3,7 +3,7 @@ package endpoint import ( "context" - pb "github.com/beam-cloud/beam/proto" + pb "github.com/beam-cloud/beta9/proto" ) type WebEndpointService interface { diff --git a/internal/abstractions/endpoint/endpoint.proto b/internal/abstractions/endpoint/endpoint.proto index baa8d7141..d0b7a988d 100644 --- a/internal/abstractions/endpoint/endpoint.proto +++ b/internal/abstractions/endpoint/endpoint.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package endpoint; diff --git a/internal/abstractions/function/function.go b/internal/abstractions/function/function.go index 1ad46b135..0feb4a189 100644 --- a/internal/abstractions/function/function.go +++ b/internal/abstractions/function/function.go @@ -8,12 +8,12 @@ import ( "path" "time" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" "github.com/labstack/echo/v4" ) @@ -160,14 +160,14 @@ func (fs *RunCFunctionService) invoke(ctx context.Context, authInfo *auth.AuthIn Env: []string{ fmt.Sprintf("TASK_ID=%s", taskId), fmt.Sprintf("HANDLER=%s", stubConfig.Handler), - fmt.Sprintf("BEAM_TOKEN=%s", authInfo.Token.Key), + fmt.Sprintf("BETA9_TOKEN=%s", authInfo.Token.Key), fmt.Sprintf("STUB_ID=%s", stub.ExternalId), }, Cpu: stubConfig.Runtime.Cpu, Memory: stubConfig.Runtime.Memory, Gpu: string(stubConfig.Runtime.Gpu), ImageId: stubConfig.Runtime.ImageId, - EntryPoint: []string{stubConfig.PythonVersion, "-m", "beam.runner.function"}, + EntryPoint: []string{stubConfig.PythonVersion, "-m", "beta9.runner.function"}, Mounts: mounts, }) if err != nil { diff --git a/internal/abstractions/function/function.proto b/internal/abstractions/function/function.proto index 723fbaca2..2716946a0 100644 --- a/internal/abstractions/function/function.proto +++ b/internal/abstractions/function/function.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package function; diff --git a/internal/abstractions/function/http.go b/internal/abstractions/function/http.go index 159ec7c55..84f2c2868 100644 --- a/internal/abstractions/function/http.go +++ b/internal/abstractions/function/http.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/types" "github.com/labstack/echo/v4" ) diff --git a/internal/abstractions/image/build.go b/internal/abstractions/image/build.go index 416429141..6ad423d12 100644 --- a/internal/abstractions/image/build.go +++ b/internal/abstractions/image/build.go @@ -11,10 +11,10 @@ import ( "strings" "time" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" "github.com/mitchellh/hashstructure/v2" diff --git a/internal/abstractions/image/image.go b/internal/abstractions/image/image.go index edfd19685..107ed70f8 100644 --- a/internal/abstractions/image/image.go +++ b/internal/abstractions/image/image.go @@ -4,11 +4,11 @@ import ( "context" "log" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" "github.com/pkg/errors" ) diff --git a/internal/abstractions/image/image.proto b/internal/abstractions/image/image.proto index a2659d932..413131a3b 100644 --- a/internal/abstractions/image/image.proto +++ b/internal/abstractions/image/image.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package image; @@ -25,7 +25,7 @@ message VerifyImageBuildResponse { } message BuildImageRequest { - // These parameters are used for a "beam" managed image + // These parameters are used for a "beta9" managed image string python_version = 1; repeated string python_packages = 2; repeated string commands = 3; diff --git a/internal/abstractions/map/map.go b/internal/abstractions/map/map.go index 2ec5d94ad..34bb7f8e3 100644 --- a/internal/abstractions/map/map.go +++ b/internal/abstractions/map/map.go @@ -3,7 +3,7 @@ package dmap import ( "context" - pb "github.com/beam-cloud/beam/proto" + pb "github.com/beam-cloud/beta9/proto" ) type MapService interface { diff --git a/internal/abstractions/map/map.proto b/internal/abstractions/map/map.proto index e742b417a..d016afef8 100644 --- a/internal/abstractions/map/map.proto +++ b/internal/abstractions/map/map.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package map; diff --git a/internal/abstractions/map/map_redis.go b/internal/abstractions/map/map_redis.go index 30fdc6cbe..180022676 100644 --- a/internal/abstractions/map/map_redis.go +++ b/internal/abstractions/map/map_redis.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/common" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/common" + pb "github.com/beam-cloud/beta9/proto" ) type RedisMapService struct { diff --git a/internal/abstractions/queue/queue.proto b/internal/abstractions/queue/queue.proto index 81a468af8..1e70f0978 100644 --- a/internal/abstractions/queue/queue.proto +++ b/internal/abstractions/queue/queue.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package simplequeue; diff --git a/internal/abstractions/queue/simplequeue.go b/internal/abstractions/queue/simplequeue.go index 49d03d916..25683b783 100644 --- a/internal/abstractions/queue/simplequeue.go +++ b/internal/abstractions/queue/simplequeue.go @@ -3,7 +3,7 @@ package simplequeue import ( "context" - pb "github.com/beam-cloud/beam/proto" + pb "github.com/beam-cloud/beta9/proto" ) type SimpleQueueService interface { diff --git a/internal/abstractions/queue/simplequeue_redis.go b/internal/abstractions/queue/simplequeue_redis.go index 704f7f149..be6f79a0a 100644 --- a/internal/abstractions/queue/simplequeue_redis.go +++ b/internal/abstractions/queue/simplequeue_redis.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/common" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/common" + pb "github.com/beam-cloud/beta9/proto" "github.com/redis/go-redis/v9" ) diff --git a/internal/abstractions/taskqueue/client.go b/internal/abstractions/taskqueue/client.go index 46b227c49..c258e1aaf 100644 --- a/internal/abstractions/taskqueue/client.go +++ b/internal/abstractions/taskqueue/client.go @@ -6,8 +6,8 @@ import ( "sync" "time" - common "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + common "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" "github.com/gofrs/uuid" "github.com/redis/go-redis/v9" ) diff --git a/internal/abstractions/taskqueue/http.go b/internal/abstractions/taskqueue/http.go index 46805b561..e7efa1386 100644 --- a/internal/abstractions/taskqueue/http.go +++ b/internal/abstractions/taskqueue/http.go @@ -4,8 +4,8 @@ import ( "net/http" "strconv" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/types" "github.com/labstack/echo/v4" ) diff --git a/internal/abstractions/taskqueue/instance.go b/internal/abstractions/taskqueue/instance.go index 5efa3b369..960030db6 100644 --- a/internal/abstractions/taskqueue/instance.go +++ b/internal/abstractions/taskqueue/instance.go @@ -8,10 +8,10 @@ import ( "path" "time" - common "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - "github.com/beam-cloud/beam/internal/types" + common "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" "github.com/redis/go-redis/v9" ) @@ -141,7 +141,7 @@ func (i *taskQueueInstance) startContainers(containersToRun int) error { runRequest := &types.ContainerRequest{ ContainerId: i.genContainerId(), Env: []string{ - fmt.Sprintf("BEAM_TOKEN=%s", i.token.Key), + fmt.Sprintf("BETA9_TOKEN=%s", i.token.Key), fmt.Sprintf("HANDLER=%s", i.stubConfig.Handler), fmt.Sprintf("STUB_ID=%s", i.stub.ExternalId), fmt.Sprintf("CONCURRENCY=%d", i.stubConfig.Concurrency), @@ -151,7 +151,7 @@ func (i *taskQueueInstance) startContainers(containersToRun int) error { Memory: i.stubConfig.Runtime.Memory, Gpu: string(i.stubConfig.Runtime.Gpu), ImageId: i.stubConfig.Runtime.ImageId, - EntryPoint: []string{i.stubConfig.PythonVersion, "-m", "beam.runner.taskqueue"}, + EntryPoint: []string{i.stubConfig.PythonVersion, "-m", "beta9.runner.taskqueue"}, Mounts: []types.Mount{ { LocalPath: path.Join(types.DefaultExtractedObjectPath, i.workspace.Name, i.object.ExternalId), diff --git a/internal/abstractions/taskqueue/taskqueue.go b/internal/abstractions/taskqueue/taskqueue.go index 8fdf43f99..5d79ab494 100644 --- a/internal/abstractions/taskqueue/taskqueue.go +++ b/internal/abstractions/taskqueue/taskqueue.go @@ -10,12 +10,12 @@ import ( "strings" "time" - "github.com/beam-cloud/beam/internal/auth" - common "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + common "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" "github.com/labstack/echo/v4" ) diff --git a/internal/abstractions/taskqueue/taskqueue.proto b/internal/abstractions/taskqueue/taskqueue.proto index 9bd22bf3b..339f54bff 100644 --- a/internal/abstractions/taskqueue/taskqueue.proto +++ b/internal/abstractions/taskqueue/taskqueue.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package taskqueue; diff --git a/internal/abstractions/volume/volume.go b/internal/abstractions/volume/volume.go index 3b271a680..9a1221ab8 100644 --- a/internal/abstractions/volume/volume.go +++ b/internal/abstractions/volume/volume.go @@ -3,9 +3,9 @@ package volume import ( "context" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/repository" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/repository" + pb "github.com/beam-cloud/beta9/proto" ) type VolumeService interface { diff --git a/internal/abstractions/volume/volume.proto b/internal/abstractions/volume/volume.proto index 94af1e594..04bb02f43 100644 --- a/internal/abstractions/volume/volume.proto +++ b/internal/abstractions/volume/volume.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package volume; diff --git a/internal/api/v1/deploy.go b/internal/api/v1/deploy.go index c25ac3b99..1391252d7 100644 --- a/internal/api/v1/deploy.go +++ b/internal/api/v1/deploy.go @@ -3,8 +3,8 @@ package apiv1 import ( "net/http" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/repository" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/repository" "github.com/labstack/echo/v4" ) diff --git a/internal/api/v1/health.go b/internal/api/v1/health.go index 3f717ce0a..deb4dc24c 100644 --- a/internal/api/v1/health.go +++ b/internal/api/v1/health.go @@ -5,7 +5,7 @@ import ( "log" "net/http" - "github.com/beam-cloud/beam/internal/common" + "github.com/beam-cloud/beta9/internal/common" "github.com/labstack/echo/v4" ) diff --git a/internal/auth/grpc.go b/internal/auth/grpc.go index 06510d181..824994503 100644 --- a/internal/auth/grpc.go +++ b/internal/auth/grpc.go @@ -4,9 +4,9 @@ import ( "context" "strings" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" - "github.com/beam-cloud/beam/internal/repository" + "github.com/beam-cloud/beta9/internal/repository" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/internal/auth/http.go b/internal/auth/http.go index 037e53205..c53b676fb 100644 --- a/internal/auth/http.go +++ b/internal/auth/http.go @@ -3,7 +3,7 @@ package auth import ( "strings" - "github.com/beam-cloud/beam/internal/repository" + "github.com/beam-cloud/beta9/internal/repository" "github.com/labstack/echo/v4" ) diff --git a/internal/common/config.default.yaml b/internal/common/config.default.yaml index 5496bd84a..6ed82277d 100644 --- a/internal/common/config.default.yaml +++ b/internal/common/config.default.yaml @@ -1,7 +1,7 @@ debugMode: false database: postgres: - host: postgres-postgresql.beam + host: postgres-postgresql.beta9 port: 5432 username: root password: password @@ -10,22 +10,22 @@ database: redis: mode: single addrs: - - redis-master.beam:6379 + - redis-master.beta9:6379 password: enableTLS: false dialTimeout: 3s storage: mode: juicefs - fsName: beam-fs + fsName: beta9-fs fsPath: /data objectPath: /data/objects juicefs: - redisURI: redis://juicefs-redis-master.beam:6379/0 - awsS3Bucket: http://localstack.beam:4566/juicefs + redisURI: redis://juicefs-redis-master.beta9:6379/0 + awsS3Bucket: http://localstack.beta9:4566/juicefs awsAccessKeyID: test awsSecretAccessKey: test gateway: - host: beam.beam + host: gateway.beta9 port: 1993 imageService: cacheURL: @@ -36,13 +36,13 @@ imageService: username: beamcloud password: s3: - bucket: beam-images + bucket: beta9-images region: us-east-1 accessKeyID: test secretAccessKey: test runner: baseImageTag: latest - baseImageName: beam-runner + baseImageName: beta9-runner baseImageRegistry: registry.localhost:5000 tags: python3.8: py38-latest @@ -78,10 +78,10 @@ worker: # global pool attributes hostNetwork: false imageTag: latest - imageName: beam-worker + imageName: beta9-worker imageRegistry: registry.localhost:5000 imagePullSecrets: [] - namespace: beam + namespace: beta9 serviceAccountName: default # non-standard k8s job spec resourcesEnforced: false @@ -89,9 +89,9 @@ worker: defaultWorkerMemoryRequest: 1024 metrics: kinesis: - streamName: beam-realtime-metrics + streamName: beta9-realtime-metrics region: us-east-1 accessKeyID: test secretAccessKey: test sessionKey: test - stackEndpoint: http://localstack.beam:4566 + stackEndpoint: http://localstack.beta9:4566 diff --git a/internal/common/events.go b/internal/common/events.go index 29150eda4..54cd0cb4d 100644 --- a/internal/common/events.go +++ b/internal/common/events.go @@ -171,7 +171,7 @@ retry: return case err := <-errs: - log.Printf("beam: error with eventbus subscription: %v\n", err) + log.Printf("error with eventbus subscription: %v\n", err) break retry } } diff --git a/internal/common/key_events.go b/internal/common/key_events.go index 048ca0014..d7530d5c6 100644 --- a/internal/common/key_events.go +++ b/internal/common/key_events.go @@ -81,7 +81,7 @@ func (kem *KeyEventManager) ListenForPattern(ctx context.Context, patternPrefix return case err := <-errs: - log.Printf("beam: error with key manager subscription: %v", err) + log.Printf("error with key manager subscription: %v", err) break retry } } diff --git a/internal/common/kinesis.go b/internal/common/kinesis.go index e3120aeaf..66f5b4e84 100644 --- a/internal/common/kinesis.go +++ b/internal/common/kinesis.go @@ -13,7 +13,7 @@ import ( "github.com/aws/aws-sdk-go-v2/credentials" "github.com/aws/aws-sdk-go-v2/service/kinesis" "github.com/aws/aws-sdk-go-v2/service/kinesis/types" - beamTypes "github.com/beam-cloud/beam/internal/types" + beta9Types "github.com/beam-cloud/beta9/internal/types" ) var shardRecordLimit int32 = 100 @@ -23,7 +23,7 @@ type KinesisClient struct { ctx *context.Context shardIterators map[string]*string shardIteratorMutex sync.Mutex - sinks map[string]*beamTypes.EventSink + sinks map[string]*beta9Types.EventSink sinkMutex sync.Mutex streamName string } @@ -58,7 +58,7 @@ func NewKinesisClient(ctx context.Context, streamName string, region string, opt return &KinesisClient{ client: client, ctx: &ctx, - sinks: make(map[string]*beamTypes.EventSink), + sinks: make(map[string]*beta9Types.EventSink), streamName: streamName, }, nil } @@ -137,9 +137,9 @@ func (kcc *KinesisClient) IterateShards() { shardIterator = getRecordsResp.NextShardIterator kcc.shardIterators[shardId] = shardIterator - events := make([]beamTypes.Event, len(getRecordsResp.Records)) + events := make([]beta9Types.Event, len(getRecordsResp.Records)) for idx, record := range getRecordsResp.Records { - event := beamTypes.Event{} + event := beta9Types.Event{} err := json.Unmarshal(record.Data, &event) if err != nil { continue // silently skip event if it can't be unmarshalled @@ -166,7 +166,7 @@ func (kcc *KinesisClient) IterateShards() { } } -func (kcc *KinesisClient) AddSink(sinkId string, sink *beamTypes.EventSink) error { +func (kcc *KinesisClient) AddSink(sinkId string, sink *beta9Types.EventSink) error { kcc.sinkMutex.Lock() if _, exists := kcc.sinks[sinkId]; exists { kcc.sinkMutex.Unlock() @@ -190,7 +190,7 @@ func (kcc *KinesisClient) RemoveSink(sinkId string) error { return nil } -func (kcc *KinesisClient) PushEvent(event beamTypes.Event) error { +func (kcc *KinesisClient) PushEvent(event beta9Types.Event) error { data, err := json.Marshal(event) if err != nil { return err diff --git a/internal/common/object.go b/internal/common/object.go index f8a1df4c3..b73c018ae 100644 --- a/internal/common/object.go +++ b/internal/common/object.go @@ -5,7 +5,7 @@ import ( "os" "path" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" "github.com/mholt/archiver/v3" ) diff --git a/internal/common/redis.go b/internal/common/redis.go index 78d63ba97..2bb58e569 100644 --- a/internal/common/redis.go +++ b/internal/common/redis.go @@ -12,7 +12,7 @@ import ( "sync" "time" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" "github.com/bsm/redislock" "github.com/redis/go-redis/v9" ) diff --git a/internal/common/redis_test.go b/internal/common/redis_test.go index 7fa8c91cb..0eaacf15b 100644 --- a/internal/common/redis_test.go +++ b/internal/common/redis_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/alicebob/miniredis/v2" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" "github.com/stretchr/testify/assert" ) diff --git a/internal/common/registry.go b/internal/common/registry.go index 4f7dc6a61..269d7da08 100644 --- a/internal/common/registry.go +++ b/internal/common/registry.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go-v2/feature/s3/manager" "github.com/aws/aws-sdk-go-v2/service/s3" awstypes "github.com/aws/aws-sdk-go-v2/service/s3/types" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) const ( diff --git a/internal/common/runc_client.go b/internal/common/runc_client.go index 9ac67ad0f..c728567b0 100644 --- a/internal/common/runc_client.go +++ b/internal/common/runc_client.go @@ -7,7 +7,7 @@ import ( "io" "strings" - pb "github.com/beam-cloud/beam/proto" + pb "github.com/beam-cloud/beta9/proto" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" diff --git a/internal/common/stats.go b/internal/common/stats.go index e5504388f..481d87cf8 100644 --- a/internal/common/stats.go +++ b/internal/common/stats.go @@ -18,7 +18,7 @@ func (s *StatsdSender) begin() { s.queue = make(chan string, 100) if s.uri == "" { // TODO: Read from config or env - host := "statsd.beam" + host := "statsd.beta9" port := 8125 s.uri = fmt.Sprintf("%s:%v", host, port) diff --git a/internal/gateway/gateway.go b/internal/gateway/gateway.go index 73d646f4a..e4c6be5b2 100644 --- a/internal/gateway/gateway.go +++ b/internal/gateway/gateway.go @@ -9,24 +9,24 @@ import ( "os/signal" "syscall" - "github.com/beam-cloud/beam/internal/abstractions/function" - "github.com/beam-cloud/beam/internal/abstractions/image" - dmap "github.com/beam-cloud/beam/internal/abstractions/map" - simplequeue "github.com/beam-cloud/beam/internal/abstractions/queue" - "github.com/beam-cloud/beam/internal/abstractions/taskqueue" - gatewayservices "github.com/beam-cloud/beam/internal/gateway/services" - - volume "github.com/beam-cloud/beam/internal/abstractions/volume" - - apiv1 "github.com/beam-cloud/beam/internal/api/v1" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/common" - - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - "github.com/beam-cloud/beam/internal/storage" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/abstractions/function" + "github.com/beam-cloud/beta9/internal/abstractions/image" + dmap "github.com/beam-cloud/beta9/internal/abstractions/map" + simplequeue "github.com/beam-cloud/beta9/internal/abstractions/queue" + "github.com/beam-cloud/beta9/internal/abstractions/taskqueue" + gatewayservices "github.com/beam-cloud/beta9/internal/gateway/services" + + volume "github.com/beam-cloud/beta9/internal/abstractions/volume" + + apiv1 "github.com/beam-cloud/beta9/internal/api/v1" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/common" + + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + "github.com/beam-cloud/beta9/internal/storage" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "google.golang.org/grpc" @@ -55,7 +55,7 @@ func NewGateway() (*Gateway, error) { } config := configManager.GetConfig() - redisClient, err := common.NewRedisClient(config.Database.Redis, common.WithClientName("BeamGateway")) + redisClient, err := common.NewRedisClient(config.Database.Redis, common.WithClientName("Beta9Gateway")) if err != nil { return nil, err } diff --git a/internal/gateway/gateway.proto b/internal/gateway/gateway.proto index f0daa9be7..1d37cf774 100644 --- a/internal/gateway/gateway.proto +++ b/internal/gateway/gateway.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; import "google/protobuf/timestamp.proto"; package gateway; diff --git a/internal/gateway/services/auth.go b/internal/gateway/services/auth.go index 06b2f5285..62aa89ce9 100644 --- a/internal/gateway/services/auth.go +++ b/internal/gateway/services/auth.go @@ -3,8 +3,8 @@ package gatewayservices import ( "context" - "github.com/beam-cloud/beam/internal/auth" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + pb "github.com/beam-cloud/beta9/proto" ) func (gws *GatewayService) Authorize(ctx context.Context, in *pb.AuthorizeRequest) (*pb.AuthorizeResponse, error) { diff --git a/internal/gateway/services/object.go b/internal/gateway/services/object.go index b1a9a7e4b..177541475 100644 --- a/internal/gateway/services/object.go +++ b/internal/gateway/services/object.go @@ -7,9 +7,9 @@ import ( "os" "path" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" ) func (gws *GatewayService) HeadObject(ctx context.Context, in *pb.HeadObjectRequest) (*pb.HeadObjectResponse, error) { diff --git a/internal/gateway/services/service.go b/internal/gateway/services/service.go index 93e74e71d..76d76bdbd 100644 --- a/internal/gateway/services/service.go +++ b/internal/gateway/services/service.go @@ -1,9 +1,9 @@ package gatewayservices import ( - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/scheduler" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/scheduler" + pb "github.com/beam-cloud/beta9/proto" ) type GatewayService struct { diff --git a/internal/gateway/services/stub.go b/internal/gateway/services/stub.go index a8b3edf71..31d77267c 100644 --- a/internal/gateway/services/stub.go +++ b/internal/gateway/services/stub.go @@ -3,10 +3,10 @@ package gatewayservices import ( "context" - "github.com/beam-cloud/beam/internal/auth" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/auth" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" ) func (gws *GatewayService) GetOrCreateStub(ctx context.Context, in *pb.GetOrCreateStubRequest) (*pb.GetOrCreateStubResponse, error) { diff --git a/internal/gateway/services/task.go b/internal/gateway/services/task.go index f88d472cd..95b37f6f4 100644 --- a/internal/gateway/services/task.go +++ b/internal/gateway/services/task.go @@ -5,8 +5,8 @@ import ( "database/sql" "time" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" "google.golang.org/protobuf/types/known/timestamppb" ) diff --git a/internal/repository/backend_postgres.go b/internal/repository/backend_postgres.go index 675d1935d..7cfbb626c 100644 --- a/internal/repository/backend_postgres.go +++ b/internal/repository/backend_postgres.go @@ -10,8 +10,8 @@ import ( "log" "strings" - _ "github.com/beam-cloud/beam/internal/repository/backend_postgres_migrations" - "github.com/beam-cloud/beam/internal/types" + _ "github.com/beam-cloud/beta9/internal/repository/backend_postgres_migrations" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" "github.com/jmoiron/sqlx" _ "github.com/lib/pq" diff --git a/internal/repository/backend_postgres_test.go b/internal/repository/backend_postgres_test.go index 6ad20e370..400af5cbb 100644 --- a/internal/repository/backend_postgres_test.go +++ b/internal/repository/backend_postgres_test.go @@ -3,7 +3,7 @@ package repository import ( "testing" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" "github.com/stretchr/testify/assert" ) diff --git a/internal/repository/base.go b/internal/repository/base.go index 6a04ba9ec..411347ff7 100644 --- a/internal/repository/base.go +++ b/internal/repository/base.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) type SchedulerRepository interface{} @@ -76,9 +76,9 @@ type MetricsStatsdRepository interface { ContainerRequested(containerId string) ContainerScheduled(containerId string) ContainerDuration(containerId string, workerId string, timestampNs int64, duration time.Duration) - BeamDeploymentRequestDuration(bucketName string, duration time.Duration) - BeamDeploymentRequestStatus(bucketName string, status int) - BeamDeploymentRequestCount(bucketName string) + Beta9DeploymentRequestDuration(bucketName string, duration time.Duration) + Beta9DeploymentRequestStatus(bucketName string, status int) + Beta9DeploymentRequestCount(bucketName string) WorkerStarted(workerId string) WorkerStopped(workerId string) WorkerDuration(workerId string, timestampNs int64, duration time.Duration) diff --git a/internal/repository/container_redis.go b/internal/repository/container_redis.go index 93cf852eb..42bd3c42d 100644 --- a/internal/repository/container_redis.go +++ b/internal/repository/container_redis.go @@ -7,8 +7,8 @@ import ( "net" "time" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" redis "github.com/redis/go-redis/v9" ) diff --git a/internal/repository/metrics_statsd.go b/internal/repository/metrics_statsd.go index 3676355ab..9000391d0 100644 --- a/internal/repository/metrics_statsd.go +++ b/internal/repository/metrics_statsd.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - common "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + common "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" ) type MetricsStatsd struct { @@ -77,14 +77,14 @@ func (m *MetricsStatsd) WorkerDuration(workerId string, timestampNs int64, durat }) } -func (m *MetricsStatsd) BeamDeploymentRequestDuration(bucketName string, duration time.Duration) { - m.statSender.StatTime(fmt.Sprintf("beam.deployment.request.%s.duration", bucketName), duration) +func (m *MetricsStatsd) Beta9DeploymentRequestDuration(bucketName string, duration time.Duration) { + m.statSender.StatTime(fmt.Sprintf("beta9.deployment.request.%s.duration", bucketName), duration) } -func (m *MetricsStatsd) BeamDeploymentRequestStatus(bucketName string, status int) { - m.statSender.StatCount(fmt.Sprintf("beam.deployment.request.%s.http_status_%d", bucketName, status), 1) +func (m *MetricsStatsd) Beta9DeploymentRequestStatus(bucketName string, status int) { + m.statSender.StatCount(fmt.Sprintf("beta9.deployment.request.%s.http_status_%d", bucketName, status), 1) } -func (m *MetricsStatsd) BeamDeploymentRequestCount(bucketName string) { - m.statSender.StatCount(fmt.Sprintf("beam.deployment.request.%s.count", bucketName), 1) +func (m *MetricsStatsd) Beta9DeploymentRequestCount(bucketName string) { + m.statSender.StatCount(fmt.Sprintf("beta9.deployment.request.%s.count", bucketName), 1) } diff --git a/internal/repository/metrics_stream_kinesis.go b/internal/repository/metrics_stream_kinesis.go index f8d238e86..32f77dbd7 100644 --- a/internal/repository/metrics_stream_kinesis.go +++ b/internal/repository/metrics_stream_kinesis.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" "github.com/okteto/okteto/pkg/log" ) diff --git a/internal/repository/testutils.go b/internal/repository/testutils.go index e7eefa408..f2602c0cd 100644 --- a/internal/repository/testutils.go +++ b/internal/repository/testutils.go @@ -2,8 +2,8 @@ package repository import ( "github.com/alicebob/miniredis/v2" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" ) func NewRedisClientForTest() (*common.RedisClient, error) { diff --git a/internal/repository/worker_pool_redis.go b/internal/repository/worker_pool_redis.go index b2d715981..121e6559c 100644 --- a/internal/repository/worker_pool_redis.go +++ b/internal/repository/worker_pool_redis.go @@ -5,8 +5,8 @@ import ( "encoding/json" "strings" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" ) type WorkerPoolRedisRepository struct { diff --git a/internal/repository/worker_redis.go b/internal/repository/worker_redis.go index 12b28fdcc..c747bd6d6 100644 --- a/internal/repository/worker_redis.go +++ b/internal/repository/worker_redis.go @@ -8,8 +8,8 @@ import ( "log" "strings" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" redis "github.com/redis/go-redis/v9" ) diff --git a/internal/repository/worker_redis_test.go b/internal/repository/worker_redis_test.go index 6cff9f1ca..bd21f9ef0 100644 --- a/internal/repository/worker_redis_test.go +++ b/internal/repository/worker_redis_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" "github.com/tj/assert" ) diff --git a/internal/scheduler/backlog.go b/internal/scheduler/backlog.go index ab07d2c40..52b5ecc8b 100644 --- a/internal/scheduler/backlog.go +++ b/internal/scheduler/backlog.go @@ -6,8 +6,8 @@ import ( "errors" "sync" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" "github.com/redis/go-redis/v9" ) diff --git a/internal/scheduler/backlog_test.go b/internal/scheduler/backlog_test.go index 36ffa584c..83e4b1a00 100644 --- a/internal/scheduler/backlog_test.go +++ b/internal/scheduler/backlog_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/alicebob/miniredis/v2" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" "github.com/tj/assert" ) diff --git a/internal/scheduler/pool.go b/internal/scheduler/pool.go index d1bca2042..de4e2353b 100644 --- a/internal/scheduler/pool.go +++ b/internal/scheduler/pool.go @@ -1,18 +1,18 @@ package scheduler import ( - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) const ( - BeamWorkerLabelKey string = "run.beam.cloud/role" - BeamWorkerLabelValue string = "worker" - BeamWorkerJobPrefix string = "worker" - tmpVolumeName string = "beam-tmp" - logVolumeName string = "beam-logs" - imagesVolumeName string = "beam-images" - configVolumeName string = "beam-config" - configSecretName string = "beam" + Beta9WorkerLabelKey string = "run.beam.cloud/role" + Beta9WorkerLabelValue string = "worker" + Beta9WorkerJobPrefix string = "worker" + tmpVolumeName string = "beta9-tmp" + logVolumeName string = "beta9-logs" + imagesVolumeName string = "beta9-images" + configVolumeName string = "beta9-config" + configSecretName string = "beta9" configMountPath string = "/etc/config" defaultClusterDomain string = "cluster.local" defaultContainerName string = "worker" diff --git a/internal/scheduler/pool_k8s.go b/internal/scheduler/pool_k8s.go index ee79c36dd..3bbab560b 100644 --- a/internal/scheduler/pool_k8s.go +++ b/internal/scheduler/pool_k8s.go @@ -10,8 +10,8 @@ import ( "strings" "time" - "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" batchv1 "k8s.io/api/batch/v1" corev1 "k8s.io/api/core/v1" @@ -147,10 +147,10 @@ func (wpc *KubernetesWorkerPoolController) addWorkerWithId(workerId string, cpu } func (wpc *KubernetesWorkerPoolController) createWorkerJob(workerId string, cpu int64, memory int64, gpuType string) (*batchv1.Job, *types.Worker) { - jobName := fmt.Sprintf("%s-%s-%s", BeamWorkerJobPrefix, wpc.name, workerId) + jobName := fmt.Sprintf("%s-%s-%s", Beta9WorkerJobPrefix, wpc.name, workerId) labels := map[string]string{ - "app": "beam-" + BeamWorkerLabelValue, - BeamWorkerLabelKey: BeamWorkerLabelValue, + "app": "beta9-" + Beta9WorkerLabelValue, + Beta9WorkerLabelKey: Beta9WorkerLabelValue, } workerCpu := cpu @@ -366,11 +366,11 @@ func (wpc *KubernetesWorkerPoolController) getWorkerEnvironment(workerId string, Value: defaultClusterDomain, }, { - Name: "BEAM_GATEWAY_HOST", + Name: "BETA9_GATEWAY_HOST", Value: wpc.config.GatewayService.Host, }, { - Name: "BEAM_GATEWAY_PORT", + Name: "BETA9_GATEWAY_PORT", Value: fmt.Sprint(wpc.config.GatewayService.Port), }, } @@ -389,7 +389,7 @@ func (wpc *KubernetesWorkerPoolController) deleteStalePendingWorkerJobs() { defer ticker.Stop() for range ticker.C { - jobSelector := fmt.Sprintf("%s=%s", BeamWorkerLabelKey, BeamWorkerLabelValue) + jobSelector := fmt.Sprintf("%s=%s", Beta9WorkerLabelKey, Beta9WorkerLabelValue) jobs, err := wpc.kubeClient.BatchV1().Jobs(namespace).List(ctx, metav1.ListOptions{LabelSelector: jobSelector}) if err != nil { log.Printf("Failed to list jobs for controller <%s>: %v\n", wpc.name, err) diff --git a/internal/scheduler/pool_manager.go b/internal/scheduler/pool_manager.go index 63f3432e4..a737ec16f 100644 --- a/internal/scheduler/pool_manager.go +++ b/internal/scheduler/pool_manager.go @@ -3,8 +3,8 @@ package scheduler import ( "sync" - repo "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/types" + repo "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/types" ) // WorkerPool represents a pool of workers with a specific name, configuration, diff --git a/internal/scheduler/pool_sizing.go b/internal/scheduler/pool_sizing.go index f86b3d35c..a743aa589 100644 --- a/internal/scheduler/pool_sizing.go +++ b/internal/scheduler/pool_sizing.go @@ -4,7 +4,7 @@ import ( "log" "time" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) const poolMonitoringInterval = 1 * time.Second diff --git a/internal/scheduler/pool_sizing_test.go b/internal/scheduler/pool_sizing_test.go index 679a2d51f..9fb874856 100644 --- a/internal/scheduler/pool_sizing_test.go +++ b/internal/scheduler/pool_sizing_test.go @@ -4,9 +4,9 @@ import ( "testing" "github.com/alicebob/miniredis/v2" - "github.com/beam-cloud/beam/internal/common" - repo "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + repo "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/types" "github.com/stretchr/testify/assert" ) diff --git a/internal/scheduler/scheduler.go b/internal/scheduler/scheduler.go index 350bc8866..57c0f7702 100644 --- a/internal/scheduler/scheduler.go +++ b/internal/scheduler/scheduler.go @@ -6,9 +6,9 @@ import ( "sort" "time" - "github.com/beam-cloud/beam/internal/common" - repo "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + repo "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/types" ) const ( diff --git a/internal/scheduler/scheduler.proto b/internal/scheduler/scheduler.proto index 08b84fe6c..03354bb3c 100644 --- a/internal/scheduler/scheduler.proto +++ b/internal/scheduler/scheduler.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package scheduler; diff --git a/internal/scheduler/scheduler_test.go b/internal/scheduler/scheduler_test.go index b55941d10..a155e35aa 100644 --- a/internal/scheduler/scheduler_test.go +++ b/internal/scheduler/scheduler_test.go @@ -7,9 +7,9 @@ import ( "time" "github.com/alicebob/miniredis/v2" - "github.com/beam-cloud/beam/internal/common" - repo "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/common" + repo "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/types" "github.com/google/uuid" "github.com/knadh/koanf/providers/rawbytes" "github.com/tj/assert" @@ -36,7 +36,7 @@ func NewSchedulerForTest() (*Scheduler, error) { return nil, err } - poolJson := []byte(`{"worker":{"pools":{"beam-cpu":{},"beam-a10g":{"gpuType": "A10G"},"beam-t4":{"gpuType": "T4"}}}}}`) + poolJson := []byte(`{"worker":{"pools":{"beta9-cpu":{},"beta9-a10g":{"gpuType": "A10G"},"beta9-t4":{"gpuType": "T4"}}}}}`) configManager.LoadConfig(common.YAMLConfigFormat, rawbytes.Provider(poolJson)) config := configManager.GetConfig() @@ -199,14 +199,14 @@ func TestGetController(t *testing.T) { a10gRequest := &types.ContainerRequest{Gpu: "A10G"} a10gController, err := wb.getController(a10gRequest) - if err != nil || a10gController.Name() != "beam-a10g" { - t.Errorf("Expected beam-a10g controller, got %v, error: %v", a10gController, err) + if err != nil || a10gController.Name() != "beta9-a10g" { + t.Errorf("Expected beta9-a10g controller, got %v, error: %v", a10gController, err) } t4Request := &types.ContainerRequest{Gpu: "T4"} t4Controller, err := wb.getController(t4Request) - if err != nil || t4Controller.Name() != "beam-t4" { - t.Errorf("Expected beam-t4 controller, got %v, error: %v", t4Controller, err) + if err != nil || t4Controller.Name() != "beta9-t4" { + t.Errorf("Expected beta9-t4 controller, got %v, error: %v", t4Controller, err) } }) diff --git a/internal/scheduler/service.go b/internal/scheduler/service.go index b6e9e2e09..34791581e 100644 --- a/internal/scheduler/service.go +++ b/internal/scheduler/service.go @@ -3,9 +3,9 @@ package scheduler import ( "context" - "github.com/beam-cloud/beam/internal/common" - "github.com/beam-cloud/beam/internal/types" - pb "github.com/beam-cloud/beam/proto" + "github.com/beam-cloud/beta9/internal/common" + "github.com/beam-cloud/beta9/internal/types" + pb "github.com/beam-cloud/beta9/proto" ) type SchedulerService struct { diff --git a/internal/scheduler/utils.go b/internal/scheduler/utils.go index 46f9c3e33..f3237738b 100644 --- a/internal/scheduler/utils.go +++ b/internal/scheduler/utils.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) func ParseCPU(cpu interface{}) (int64, error) { diff --git a/internal/scheduler/utils_test.go b/internal/scheduler/utils_test.go index 30d2d6dd2..4a05318e1 100644 --- a/internal/scheduler/utils_test.go +++ b/internal/scheduler/utils_test.go @@ -3,7 +3,7 @@ package scheduler import ( "testing" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" "github.com/tj/assert" ) diff --git a/internal/storage/juicefs.go b/internal/storage/juicefs.go index 68eadb622..4423f116f 100644 --- a/internal/storage/juicefs.go +++ b/internal/storage/juicefs.go @@ -5,7 +5,7 @@ import ( "log" "os/exec" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) type JuiceFsStorage struct { diff --git a/internal/storage/storage.go b/internal/storage/storage.go index 7eab37090..2db2869f6 100644 --- a/internal/storage/storage.go +++ b/internal/storage/storage.go @@ -4,7 +4,7 @@ import ( "errors" "log" - "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/types" ) const ( diff --git a/internal/types/backend.go b/internal/types/backend.go index 51810608d..c3656a59d 100644 --- a/internal/types/backend.go +++ b/internal/types/backend.go @@ -5,7 +5,7 @@ import ( "encoding/json" "time" - pb "github.com/beam-cloud/beam/proto" + pb "github.com/beam-cloud/beta9/proto" "github.com/gofrs/uuid" ) diff --git a/internal/types/gateway.go b/internal/types/gateway.go index 0358d1549..e96173f25 100644 --- a/internal/types/gateway.go +++ b/internal/types/gateway.go @@ -8,7 +8,7 @@ const ( DefaultExtractedObjectPath string = "/data/unpacked" DefaultVolumesPath string = "/data/volumes" DefaultObjectPath string = "/data/objects" - DefaultFilesystemName string = "beam-fs" + DefaultFilesystemName string = "beta9-fs" DefaultFilesystemPath string = "/data" FailedContainerThreshold int = 3 RequestTimeoutDurationS time.Duration = 175 * time.Second diff --git a/internal/types/scheduler.go b/internal/types/scheduler.go index 9f2a3ee59..8bccfb03e 100644 --- a/internal/types/scheduler.go +++ b/internal/types/scheduler.go @@ -71,8 +71,8 @@ const ContainerExitCodeTtlS int = 300 // Container Stats const ( - ContainerDurationStatsKey string = "beam.worker.usage.container.duration" - ContainerLifecycleStatsKey string = "beam.worker.usage.container.lifecycle" + ContainerDurationStatsKey string = "beta9.worker.usage.container.duration" + ContainerLifecycleStatsKey string = "beta9.worker.usage.container.lifecycle" ContainerDurationEmissionInterval time.Duration = 30 * time.Second ContainerResourceUsageEmissionInterval time.Duration = 3 * time.Second diff --git a/internal/types/worker.go b/internal/types/worker.go index 0a76d576b..46402368a 100644 --- a/internal/types/worker.go +++ b/internal/types/worker.go @@ -6,8 +6,8 @@ const ( WorkerLifecycleStarted string = "STARTED" WorkerLifecycleStopped string = "STOPPED" - WorkerLifecycleStatsKey string = "beam.worker.usage.spawner.lifecycle" - WorkerDurationStatsKey string = "beam.worker.usage.spawner.duration" + WorkerLifecycleStatsKey string = "beta9.worker.usage.spawner.lifecycle" + WorkerDurationStatsKey string = "beta9.worker.usage.spawner.duration" WorkerDurationEmissionInterval time.Duration = 30 * time.Second WorkerUserCodeVolume string = "/mnt/code" ) diff --git a/internal/worker/base_runc_config.json b/internal/worker/base_runc_config.json index cbcdc5719..bc653af23 100644 --- a/internal/worker/base_runc_config.json +++ b/internal/worker/base_runc_config.json @@ -201,7 +201,7 @@ ] }, { - "destination": "/usr/local/lib/python3.8/dist-packages/beam", + "destination": "/usr/local/lib/python3.8/dist-packages/beta9", "type": "bind", "source": "/workspace/sdk", "options": [ @@ -214,7 +214,7 @@ ] }, { - "destination": "/usr/local/lib/python3.9/dist-packages/beam", + "destination": "/usr/local/lib/python3.9/dist-packages/beta9", "type": "bind", "source": "/workspace/sdk", "options": [ @@ -227,7 +227,7 @@ ] }, { - "destination": "/usr/local/lib/python3.10/dist-packages/beam", + "destination": "/usr/local/lib/python3.10/dist-packages/beta9", "type": "bind", "source": "/workspace/sdk", "options": [ @@ -240,7 +240,7 @@ ] }, { - "destination": "/usr/local/lib/python3.11/dist-packages/beam", + "destination": "/usr/local/lib/python3.11/dist-packages/beta9", "type": "bind", "source": "/workspace/sdk", "options": [ @@ -253,7 +253,7 @@ ] }, { - "destination": "/usr/local/lib/python3.12/dist-packages/beam", + "destination": "/usr/local/lib/python3.12/dist-packages/beta9", "type": "bind", "source": "/workspace/sdk", "options": [ diff --git a/internal/worker/image.go b/internal/worker/image.go index a74bca347..ad07d9794 100644 --- a/internal/worker/image.go +++ b/internal/worker/image.go @@ -12,9 +12,9 @@ import ( "syscall" "time" - "github.com/beam-cloud/beam/internal/abstractions/image" - common "github.com/beam-cloud/beam/internal/common" - types "github.com/beam-cloud/beam/internal/types" + "github.com/beam-cloud/beta9/internal/abstractions/image" + common "github.com/beam-cloud/beta9/internal/common" + types "github.com/beam-cloud/beta9/internal/types" "github.com/beam-cloud/clip/pkg/clip" clipCommon "github.com/beam-cloud/clip/pkg/common" "github.com/moby/sys/mountinfo" diff --git a/internal/worker/logger.go b/internal/worker/logger.go index 54fb8ef5c..b4862d67e 100644 --- a/internal/worker/logger.go +++ b/internal/worker/logger.go @@ -9,7 +9,7 @@ import ( "path" "strings" - "github.com/beam-cloud/beam/internal/common" + "github.com/beam-cloud/beta9/internal/common" "github.com/sirupsen/logrus" ) diff --git a/internal/worker/metrics.go b/internal/worker/metrics.go index 48897c0be..44f841cd3 100644 --- a/internal/worker/metrics.go +++ b/internal/worker/metrics.go @@ -4,8 +4,8 @@ import ( "context" "time" - repo "github.com/beam-cloud/beam/internal/repository" - types "github.com/beam-cloud/beam/internal/types" + repo "github.com/beam-cloud/beta9/internal/repository" + types "github.com/beam-cloud/beta9/internal/types" "github.com/okteto/okteto/pkg/log" ) diff --git a/internal/worker/runc_server.go b/internal/worker/runc_server.go index 367cded99..5785863eb 100644 --- a/internal/worker/runc_server.go +++ b/internal/worker/runc_server.go @@ -13,9 +13,9 @@ import ( "strings" "syscall" - pb "github.com/beam-cloud/beam/proto" + pb "github.com/beam-cloud/beta9/proto" - common "github.com/beam-cloud/beam/internal/common" + common "github.com/beam-cloud/beta9/internal/common" "github.com/beam-cloud/go-runc" "github.com/google/shlex" "github.com/opencontainers/runtime-spec/specs-go" diff --git a/internal/worker/worker.go b/internal/worker/worker.go index ed68832e4..7464e49a5 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -14,10 +14,10 @@ import ( "syscall" "time" - common "github.com/beam-cloud/beam/internal/common" - repo "github.com/beam-cloud/beam/internal/repository" - "github.com/beam-cloud/beam/internal/storage" - types "github.com/beam-cloud/beam/internal/types" + common "github.com/beam-cloud/beta9/internal/common" + repo "github.com/beam-cloud/beta9/internal/repository" + "github.com/beam-cloud/beta9/internal/storage" + types "github.com/beam-cloud/beta9/internal/types" "github.com/beam-cloud/go-runc" "github.com/opencontainers/runtime-spec/specs-go" ) @@ -111,7 +111,7 @@ func NewWorker() (*Worker, error) { } config := configManager.GetConfig() - redisClient, err := common.NewRedisClient(config.Database.Redis, common.WithClientName("BeamWorker")) + redisClient, err := common.NewRedisClient(config.Database.Redis, common.WithClientName("orker")) if err != nil { return nil, err } @@ -549,8 +549,8 @@ func (s *Worker) getContainerEnvironment(request *types.ContainerRequest, option fmt.Sprintf("BIND_PORT=%d", options.BindPort), fmt.Sprintf("CONTAINER_HOSTNAME=%s", fmt.Sprintf("%s:%d", s.podIPAddr, options.BindPort)), fmt.Sprintf("CONTAINER_ID=%s", request.ContainerId), - fmt.Sprintf("BEAM_GATEWAY_HOST=%s", s.config.GatewayService.Host), - fmt.Sprintf("BEAM_GATEWAY_PORT=%d", s.config.GatewayService.Port), + fmt.Sprintf("BETA9_GATEWAY_HOST=%s", s.config.GatewayService.Host), + fmt.Sprintf("BETA9_GATEWAY_PORT=%d", s.config.GatewayService.Port), "PYTHONUNBUFFERED=1", } env = append(env, request.Env...) diff --git a/internal/worker/worker.proto b/internal/worker/worker.proto index 188fa8dc7..6bc67b218 100644 --- a/internal/worker/worker.proto +++ b/internal/worker/worker.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "github.com/beam-cloud/beam/proto"; +option go_package = "github.com/beam-cloud/beta9/proto"; package runc; diff --git a/manifests/k3d/beam.yaml b/manifests/k3d/beta9.yaml similarity index 83% rename from manifests/k3d/beam.yaml rename to manifests/k3d/beta9.yaml index 47b4969cf..26bfb1d70 100644 --- a/manifests/k3d/beam.yaml +++ b/manifests/k3d/beta9.yaml @@ -1,13 +1,13 @@ apiVersion: v1 kind: Namespace metadata: - name: beam + name: beta9 --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: beam-role - namespace: beam + name: gateway-role + namespace: beta9 rules: - apiGroups: - '*' @@ -25,37 +25,37 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: beam-role-binding - namespace: beam + name: gateway-role-binding + namespace: beta9 roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: beam-role + name: gateway-role subjects: - kind: ServiceAccount name: default - namespace: beam + namespace: beta9 --- apiVersion: apps/v1 kind: Deployment metadata: - name: beam - namespace: beam + name: gateway + namespace: beta9 spec: replicas: 1 selector: matchLabels: - app: beam + app: gateway template: metadata: labels: - app: beam + app: gateway spec: containers: - - name: beam - image: registry.localhost:5000/beam:latest + - name: gateway + image: registry.localhost:5000/beta9-gateway:latest command: - - /workspace/bin/beam + - /workspace/bin/gateway ports: - name: grpc containerPort: 1993 @@ -81,7 +81,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: images - namespace: beam + namespace: beta9 spec: accessModes: - ReadWriteOnce @@ -94,7 +94,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: worker-data - namespace: beam + namespace: beta9 spec: accessModes: - ReadWriteOnce @@ -106,11 +106,11 @@ spec: apiVersion: v1 kind: Service metadata: - name: beam - namespace: beam + name: gateway + namespace: beta9 spec: selector: - app: beam + app: gateway ports: - name: grpc port: 1993 @@ -124,8 +124,8 @@ spec: apiVersion: traefik.containo.us/v1alpha1 kind: IngressRouteTCP metadata: - name: beam - namespace: beam + name: gateway + namespace: beta9 spec: entryPoints: - web @@ -133,14 +133,14 @@ spec: - match: HostSNI(`*`) kind: Rule services: - - name: beam + - name: gateway port: 1993 --- apiVersion: helm.cattle.io/v1 kind: HelmChart metadata: name: redis - namespace: beam + namespace: beta9 spec: repo: https://charts.bitnami.com/bitnami chart: redis @@ -161,7 +161,7 @@ apiVersion: helm.cattle.io/v1 kind: HelmChart metadata: name: postgres - namespace: beam + namespace: beta9 spec: repo: https://charts.bitnami.com/bitnami chart: postgresql diff --git a/manifests/k3d/juicefs.yaml b/manifests/k3d/juicefs.yaml index 7f477bb32..7066be115 100644 --- a/manifests/k3d/juicefs.yaml +++ b/manifests/k3d/juicefs.yaml @@ -2,7 +2,7 @@ apiVersion: helm.cattle.io/v1 kind: HelmChart metadata: name: juicefs-redis - namespace: beam + namespace: beta9 spec: repo: https://charts.bitnami.com/bitnami chart: redis diff --git a/manifests/k3d/localstack.yaml b/manifests/k3d/localstack.yaml index 54b766a81..4ea34dd3c 100644 --- a/manifests/k3d/localstack.yaml +++ b/manifests/k3d/localstack.yaml @@ -2,7 +2,7 @@ apiVersion: helm.cattle.io/v1 kind: HelmChart metadata: name: localstack - namespace: beam + namespace: beta9 spec: repo: https://localstack.github.io/helm-charts chart: localstack diff --git a/proto/endpoint.pb.go b/proto/endpoint.pb.go index c1c84f757..a1902ae82 100644 --- a/proto/endpoint.pb.go +++ b/proto/endpoint.pb.go @@ -121,10 +121,10 @@ var file_endpoint_proto_rawDesc = []byte{ 0x57, 0x65, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, - 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, - 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, + 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, + 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/function.pb.go b/proto/function.pb.go index cb3a5addd..56bbb4182 100644 --- a/proto/function.pb.go +++ b/proto/function.pb.go @@ -409,10 +409,10 @@ var file_function_proto_rawDesc = []byte{ 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/gateway.pb.go b/proto/gateway.pb.go index a647da120..0f9192e90 100644 --- a/proto/gateway.pb.go +++ b/proto/gateway.pb.go @@ -1711,10 +1711,10 @@ var file_gateway_proto_rawDesc = []byte{ 0x75, 0x62, 0x12, 0x1a, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, 0x74, 0x75, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x53, - 0x74, 0x75, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x67, + 0x74, 0x75, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/gen.sh b/proto/gen.sh index 33765f5d4..4c7aac2fb 100755 --- a/proto/gen.sh +++ b/proto/gen.sh @@ -5,26 +5,26 @@ protoc -I ../internal/scheduler/ --go_out=. --go_opt=paths=source_relative --go- protoc -I ../internal/worker/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/worker/worker.proto protoc -I ../internal/gateway/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/gateway/gateway.proto -protoc -I ../internal/gateway/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/gateway/gateway.proto +protoc -I ../internal/gateway/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/gateway/gateway.proto # Generate code for abstractions protoc -I ../internal/abstractions/image/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/image/image.proto -protoc -I ../internal/abstractions/image/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/image/image.proto +protoc -I ../internal/abstractions/image/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/image/image.proto protoc -I ../internal/abstractions/map/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/map/map.proto -protoc -I ../internal/abstractions/map/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/map/map.proto +protoc -I ../internal/abstractions/map/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/map/map.proto protoc -I ../internal/abstractions/function/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/function/function.proto -protoc -I ../internal/abstractions/function/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/function/function.proto +protoc -I ../internal/abstractions/function/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/function/function.proto protoc -I ../internal/abstractions/queue/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/queue/queue.proto -protoc -I ../internal/abstractions/queue/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/queue/queue.proto +protoc -I ../internal/abstractions/queue/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/queue/queue.proto protoc -I ../internal/abstractions/volume/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/volume/volume.proto -protoc -I ../internal/abstractions/volume/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/volume/volume.proto +protoc -I ../internal/abstractions/volume/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/volume/volume.proto protoc -I ../internal/abstractions/taskqueue/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/taskqueue/taskqueue.proto -protoc -I ../internal/abstractions/taskqueue/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/taskqueue/taskqueue.proto +protoc -I ../internal/abstractions/taskqueue/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/taskqueue/taskqueue.proto protoc -I ../internal/abstractions/endpoint/ --go_out=. --go_opt=paths=source_relative --go-grpc_out=./ --go-grpc_opt=paths=source_relative ../internal/abstractions/endpoint/endpoint.proto -protoc -I ../internal/abstractions/endpoint/ --python_betterproto_out=../sdk/src/beam/clients/ ../internal/abstractions/endpoint/endpoint.proto +protoc -I ../internal/abstractions/endpoint/ --python_betterproto_out=../sdk/src/beta9/clients/ ../internal/abstractions/endpoint/endpoint.proto diff --git a/proto/image.pb.go b/proto/image.pb.go index d20f5ab96..9a4d72b28 100644 --- a/proto/image.pb.go +++ b/proto/image.pb.go @@ -167,7 +167,7 @@ type BuildImageRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // These parameters are used for a "beam" managed image + // These parameters are used for a "beta9" managed image PythonVersion string `protobuf:"bytes,1,opt,name=python_version,json=pythonVersion,proto3" json:"python_version,omitempty"` PythonPackages []string `protobuf:"bytes,2,rep,name=python_packages,json=pythonPackages,proto3" json:"python_packages,omitempty"` Commands []string `protobuf:"bytes,3,rep,name=commands,proto3" json:"commands,omitempty"` @@ -370,10 +370,10 @@ var file_image_proto_rawDesc = []byte{ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, - 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/proto/map.pb.go b/proto/map.pb.go index 870684247..95d592ed2 100644 --- a/proto/map.pb.go +++ b/proto/map.pb.go @@ -600,10 +600,10 @@ var file_map_proto_rawDesc = []byte{ 0x07, 0x4d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x13, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x6d, 0x61, 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, - 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/queue.pb.go b/proto/queue.pb.go index d81c4e6a5..e5ca61fb3 100644 --- a/proto/queue.pb.go +++ b/proto/queue.pb.go @@ -508,10 +508,10 @@ var file_queue_proto_rawDesc = []byte{ 0x75, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x51, 0x75, 0x65, 0x75, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, - 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, - 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, + 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, + 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/scheduler.pb.go b/proto/scheduler.pb.go index 9fcac8bae..80f661944 100644 --- a/proto/scheduler.pb.go +++ b/proto/scheduler.pb.go @@ -417,10 +417,10 @@ var file_scheduler_proto_rawDesc = []byte{ 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, - 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/proto/taskqueue.pb.go b/proto/taskqueue.pb.go index f9ea38543..b00ad26b8 100644 --- a/proto/taskqueue.pb.go +++ b/proto/taskqueue.pb.go @@ -713,9 +713,9 @@ var file_taskqueue_proto_rawDesc = []byte{ 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x71, 0x75, 0x65, 0x75, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, - 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, + 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/volume.pb.go b/proto/volume.pb.go index 998d95265..594c001c8 100644 --- a/proto/volume.pb.go +++ b/proto/volume.pb.go @@ -140,10 +140,10 @@ var file_volume_proto_rawDesc = []byte{ 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x6f, 0x6c, - 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, - 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, - 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, + 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, + 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/worker.pb.go b/proto/worker.pb.go index bb3f86c38..e89514e52 100644 --- a/proto/worker.pb.go +++ b/proto/worker.pb.go @@ -564,10 +564,10 @@ var file_worker_proto_rawDesc = []byte{ 0x2e, 0x72, 0x75, 0x6e, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x75, 0x6e, 0x63, 0x2e, 0x52, 0x75, 0x6e, 0x43, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x22, 0x5a, 0x20, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, - 0x65, 0x61, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/sdk/README.md b/sdk/README.md index 259a85a42..7fef4f945 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -1,3 +1,3 @@ -# beam-sdk +# beta9 sdk -Python SDK for Beam. Includes configuration serialization and helper functions. +Python SDK for Beta9. diff --git a/sdk/bin/docgen.md b/sdk/bin/docgen.md index 91671aa5c..51fbb81cd 100644 --- a/sdk/bin/docgen.md +++ b/sdk/bin/docgen.md @@ -1,6 +1,6 @@ # docgen -Use this tool to generate markdown for Beam's SDK Reference documentation page. +Use this tool to generate markdown for beta9's SDK Reference documentation page. ## How it works diff --git a/sdk/bin/docgen.py b/sdk/bin/docgen.py index 57f6f89bb..40ca83cd9 100755 --- a/sdk/bin/docgen.py +++ b/sdk/bin/docgen.py @@ -4,9 +4,7 @@ import textwrap from enum import Enum -from docstring_parser import parse - -from beam import ( +from beta9 import ( App, Autoscaling, AutoscalingType, @@ -21,6 +19,7 @@ Volume, VolumeType, ) +from docstring_parser import parse EXCLUDED_FUNCS = [ "_", diff --git a/sdk/pyproject.toml b/sdk/pyproject.toml index 04116aca4..3727730fd 100644 --- a/sdk/pyproject.toml +++ b/sdk/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] -name = "beam-sdk" -version = "0.16.0-rc1" +name = "beta9" +version = "0.1.0" description = "" authors = ["beam.cloud "] packages = [ - { include = "beam", from = "src" }, - { include = "beam/**/*.py", from = "src" }, + { include = "beta9", from = "src" }, + { include = "beta9/**/*.py", from = "src" }, ] [tool.poetry.dependencies] @@ -37,7 +37,7 @@ ruff = "^0.1.11" pydantic = "^2.5.3" [tool.poetry.scripts] -beam = "beam.cli.main:cli" +beta9 = "beta9.cli.main:cli" [build-system] requires = ["poetry-core>=1.0.0"] @@ -49,8 +49,8 @@ pythonpath = ["src"] [tool.ruff] line-length = 100 ignore-init-module-imports = true -exclude = ["src/beam/clients"] +exclude = ["src/beta9/clients"] src = ["src", "test", "bin"] [tool.ruff.per-file-ignores] -"src/beam/__init__.py" = ["F403"] +"src/beta9/__init__.py" = ["F403"] diff --git a/sdk/pytest.ini b/sdk/pytest.ini index 0bb7cd2b8..1a5c089f5 100644 --- a/sdk/pytest.ini +++ b/sdk/pytest.ini @@ -1,3 +1 @@ -[pytest] -env = - BEAM_SERIALIZE_MODE=start +[pytest] \ No newline at end of file diff --git a/sdk/src/beam/__init__.py b/sdk/src/beta9/__init__.py similarity index 100% rename from sdk/src/beam/__init__.py rename to sdk/src/beta9/__init__.py diff --git a/sdk/src/beam/abstractions/__init__.py b/sdk/src/beta9/abstractions/__init__.py similarity index 100% rename from sdk/src/beam/abstractions/__init__.py rename to sdk/src/beta9/abstractions/__init__.py diff --git a/sdk/src/beam/abstractions/base/__init__.py b/sdk/src/beta9/abstractions/base/__init__.py similarity index 92% rename from sdk/src/beam/abstractions/base/__init__.py rename to sdk/src/beta9/abstractions/base/__init__.py index a8647ddce..50d1afa17 100644 --- a/sdk/src/beam/abstractions/base/__init__.py +++ b/sdk/src/beta9/abstractions/base/__init__.py @@ -3,10 +3,9 @@ from asyncio import AbstractEventLoop from typing import Any, Coroutine +from beta9.config import get_gateway_channel from grpclib.client import Channel -from beam.config import get_gateway_channel - class BaseAbstraction(ABC): def __init__(self) -> None: diff --git a/sdk/src/beam/abstractions/base/runner.py b/sdk/src/beta9/abstractions/base/runner.py similarity index 95% rename from sdk/src/beam/abstractions/base/runner.py rename to sdk/src/beta9/abstractions/base/runner.py index e70e93529..eae12c606 100644 --- a/sdk/src/beam/abstractions/base/runner.py +++ b/sdk/src/beta9/abstractions/base/runner.py @@ -2,11 +2,11 @@ import os from typing import Callable, List, Optional, Union -from beam.abstractions.base import BaseAbstraction -from beam.abstractions.image import Image, ImageBuildResult -from beam.abstractions.volume import Volume -from beam.clients.gateway import GatewayServiceStub, GetOrCreateStubResponse -from beam.sync import FileSyncer +from beta9.abstractions.base import BaseAbstraction +from beta9.abstractions.image import Image, ImageBuildResult +from beta9.abstractions.volume import Volume +from beta9.clients.gateway import GatewayServiceStub, GetOrCreateStubResponse +from beta9.sync import FileSyncer FUNCTION_STUB_TYPE = "function" TASKQUEUE_STUB_TYPE = "taskqueue" diff --git a/sdk/src/beam/abstractions/function.py b/sdk/src/beta9/abstractions/function.py similarity index 93% rename from sdk/src/beam/abstractions/function.py rename to sdk/src/beta9/abstractions/function.py index 2eff65f3e..6beea2a0f 100644 --- a/sdk/src/beam/abstractions/function.py +++ b/sdk/src/beta9/abstractions/function.py @@ -3,22 +3,21 @@ from typing import Any, Callable, Iterator, List, Optional, Sequence, Union import cloudpickle - -from beam import terminal -from beam.abstractions.base.runner import ( +from beta9 import terminal +from beta9.abstractions.base.runner import ( FUNCTION_DEPLOYMENT_STUB_TYPE, FUNCTION_STUB_TYPE, RunnerAbstraction, ) -from beam.abstractions.image import Image -from beam.abstractions.volume import Volume -from beam.clients.function import ( +from beta9.abstractions.image import Image +from beta9.abstractions.volume import Volume +from beta9.clients.function import ( FunctionInvokeResponse, FunctionServiceStub, ) -from beam.clients.gateway import DeployStubResponse -from beam.config import GatewayConfig, get_gateway_config -from beam.sync import FileSyncer +from beta9.clients.gateway import DeployStubResponse +from beta9.config import GatewayConfig, get_gateway_config +from beta9.sync import FileSyncer class Function(RunnerAbstraction): @@ -38,7 +37,7 @@ class Function(RunnerAbstraction): The container image used for the task execution. Default is [Image](#image). Example: ```python - from beam import function, Image + from beta9 import function, Image @function(cpu=1.0, memory=128, gpu="T4", image=Image(python_packages=["torch"]), keep_warm_seconds=1000) def transcribe(filename: str): diff --git a/sdk/src/beam/abstractions/image.py b/sdk/src/beta9/abstractions/image.py similarity index 95% rename from sdk/src/beam/abstractions/image.py rename to sdk/src/beta9/abstractions/image.py index 67421ca1d..23f2de878 100644 --- a/sdk/src/beam/abstractions/image.py +++ b/sdk/src/beta9/abstractions/image.py @@ -1,9 +1,9 @@ from typing import List, NamedTuple, Optional, Tuple, Union -from beam import terminal -from beam.abstractions.base import BaseAbstraction -from beam.clients.image import BuildImageResponse, ImageServiceStub, VerifyImageBuildResponse -from beam.type import ( +from beta9 import terminal +from beta9.abstractions.base import BaseAbstraction +from beta9.clients.image import BuildImageResponse, ImageServiceStub, VerifyImageBuildResponse +from beta9.type import ( PythonVersion, ) diff --git a/sdk/src/beam/abstractions/map.py b/sdk/src/beta9/abstractions/map.py similarity index 96% rename from sdk/src/beam/abstractions/map.py rename to sdk/src/beta9/abstractions/map.py index 3a56ab4f4..ac43d8ddd 100644 --- a/sdk/src/beam/abstractions/map.py +++ b/sdk/src/beta9/abstractions/map.py @@ -1,9 +1,8 @@ from typing import Any import cloudpickle - -from beam.abstractions.base import BaseAbstraction -from beam.clients.map import ( +from beta9.abstractions.base import BaseAbstraction +from beta9.clients.map import ( MapCountResponse, MapDeleteResponse, MapGetResponse, @@ -32,7 +31,7 @@ def __init__(self, *, name: str) -> "Map": Example: ```python - from beam import Map + from beta9 import Map # Name the map m = Map(name="test") diff --git a/sdk/src/beam/abstractions/queue.py b/sdk/src/beta9/abstractions/queue.py similarity index 92% rename from sdk/src/beam/abstractions/queue.py rename to sdk/src/beta9/abstractions/queue.py index 63e0bc018..94858caa7 100644 --- a/sdk/src/beam/abstractions/queue.py +++ b/sdk/src/beta9/abstractions/queue.py @@ -1,9 +1,8 @@ from typing import Any import cloudpickle - -from beam.abstractions.base import BaseAbstraction -from beam.clients.simplequeue import ( +from beta9.abstractions.base import BaseAbstraction +from beta9.clients.simplequeue import ( SimpleQueueEmptyResponse, SimpleQueuePeekResponse, SimpleQueuePopResponse, @@ -35,7 +34,7 @@ def __init__(self, *, name: str, max_size=100) -> "SimpleQueue": Example: ```python - from beam import Queue + from beta9 import Queue val = [1, 2, 3] @@ -43,10 +42,10 @@ def __init__(self, *, name: str, max_size=100) -> "SimpleQueue": q = Queue(name="myqueue") for i in range(100): - # Insert something to the queue + # Insert something to the queue q.put(val) while not q.empty(): - # Remove something from the queue + # Remove something from the queue val = q.pop() print(val) ``` diff --git a/sdk/src/beam/abstractions/taskqueue.py b/sdk/src/beta9/abstractions/taskqueue.py similarity index 94% rename from sdk/src/beam/abstractions/taskqueue.py rename to sdk/src/beta9/abstractions/taskqueue.py index 011a49a87..70b126df7 100644 --- a/sdk/src/beam/abstractions/taskqueue.py +++ b/sdk/src/beta9/abstractions/taskqueue.py @@ -2,16 +2,16 @@ import os from typing import Any, Callable, Union -from beam import terminal -from beam.abstractions.base.runner import ( +from beta9 import terminal +from beta9.abstractions.base.runner import ( TASKQUEUE_DEPLOYMENT_STUB_TYPE, TASKQUEUE_STUB_TYPE, RunnerAbstraction, ) -from beam.abstractions.image import Image -from beam.clients.gateway import DeployStubResponse -from beam.clients.taskqueue import TaskQueuePutResponse, TaskQueueServiceStub -from beam.config import GatewayConfig, get_gateway_config +from beta9.abstractions.image import Image +from beta9.clients.gateway import DeployStubResponse +from beta9.clients.taskqueue import TaskQueuePutResponse, TaskQueueServiceStub +from beta9.config import GatewayConfig, get_gateway_config class TaskQueue(RunnerAbstraction): @@ -57,7 +57,7 @@ class TaskQueue(RunnerAbstraction): Default is 100. Example: ```python - from beam import task_queue, Image + from beta9 import task_queue, Image @task_queue(cpu=1.0, memory=128, gpu="T4", image=Image(python_packages=["torch"]), keep_warm_seconds=1000) def transcribe(filename: str): diff --git a/sdk/src/beam/abstractions/volume.py b/sdk/src/beta9/abstractions/volume.py similarity index 86% rename from sdk/src/beam/abstractions/volume.py rename to sdk/src/beta9/abstractions/volume.py index f1c003555..3f4f524e8 100644 --- a/sdk/src/beam/abstractions/volume.py +++ b/sdk/src/beta9/abstractions/volume.py @@ -1,6 +1,6 @@ -from beam.abstractions.base import BaseAbstraction -from beam.clients.gateway import Volume as VolumeConfig -from beam.clients.volume import VolumeServiceStub +from beta9.abstractions.base import BaseAbstraction +from beta9.clients.gateway import Volume as VolumeConfig +from beta9.clients.volume import VolumeServiceStub class Volume(BaseAbstraction): @@ -18,7 +18,7 @@ def __init__(self, name: str, mount_path: str) -> "Volume": Example: ```python - from beam import Volume + from beta9 import Volume # Shared Volume shared_volume = Volume(name="model_weights", mount_path="./my-weights") diff --git a/sdk/src/beam/aio.py b/sdk/src/beta9/aio.py similarity index 100% rename from sdk/src/beam/aio.py rename to sdk/src/beta9/aio.py diff --git a/sdk/src/beam/cli/__init__.py b/sdk/src/beta9/cli/__init__.py similarity index 100% rename from sdk/src/beam/cli/__init__.py rename to sdk/src/beta9/cli/__init__.py diff --git a/sdk/src/beam/cli/configure.py b/sdk/src/beta9/cli/configure.py similarity index 85% rename from sdk/src/beam/cli/configure.py rename to sdk/src/beta9/cli/configure.py index bb7e868f1..4ea2eaefd 100644 --- a/sdk/src/beam/cli/configure.py +++ b/sdk/src/beta9/cli/configure.py @@ -1,7 +1,7 @@ import click -from beam import terminal -from beam.config import ( +from beta9 import terminal +from beta9.config import ( configure_gateway_credentials, load_config_from_file, save_config_to_file, @@ -29,4 +29,4 @@ def configure(name: str, token: str, gateway_host: str, gateway_port: str): name=name, ) - terminal.success("Successfully configured Beam!") + terminal.success("Successfully configured Beta9!") diff --git a/sdk/src/beam/cli/contexts.py b/sdk/src/beta9/cli/contexts.py similarity index 79% rename from sdk/src/beam/cli/contexts.py rename to sdk/src/beta9/cli/contexts.py index c2a08d2cf..7631e7798 100644 --- a/sdk/src/beam/cli/contexts.py +++ b/sdk/src/beta9/cli/contexts.py @@ -1,8 +1,8 @@ from contextlib import contextmanager from typing import Iterator -from beam import config -from beam.clients.gateway import GatewayServiceStub +from beta9 import config +from beta9.clients.gateway import GatewayServiceStub @contextmanager diff --git a/sdk/src/beam/cli/deploy.py b/sdk/src/beta9/cli/deploy.py similarity index 88% rename from sdk/src/beam/cli/deploy.py rename to sdk/src/beta9/cli/deploy.py index b6a3a3b98..228177435 100644 --- a/sdk/src/beam/cli/deploy.py +++ b/sdk/src/beta9/cli/deploy.py @@ -3,10 +3,9 @@ import sys import click - -from beam import terminal -from beam.cli.contexts import get_gateway_service -from beam.clients.gateway import GatewayServiceStub +from beta9 import terminal +from beta9.cli.contexts import get_gateway_service +from beta9.clients.gateway import GatewayServiceStub @click.group( diff --git a/sdk/src/beam/cli/formatters.py b/sdk/src/beta9/cli/formatters.py similarity index 100% rename from sdk/src/beam/cli/formatters.py rename to sdk/src/beta9/cli/formatters.py diff --git a/sdk/src/beam/cli/main.py b/sdk/src/beta9/cli/main.py similarity index 81% rename from sdk/src/beam/cli/main.py rename to sdk/src/beta9/cli/main.py index c5c2dbbe0..824840992 100644 --- a/sdk/src/beam/cli/main.py +++ b/sdk/src/beta9/cli/main.py @@ -1,8 +1,7 @@ import shutil import click - -from beam.cli import configure, deploy, tasks +from beta9.cli import configure, deploy, tasks click.formatting.FORCED_WIDTH = shutil.get_terminal_size().columns diff --git a/sdk/src/beam/cli/tasks.py b/sdk/src/beta9/cli/tasks.py similarity index 88% rename from sdk/src/beam/cli/tasks.py rename to sdk/src/beta9/cli/tasks.py index e7049988d..402ad285d 100644 --- a/sdk/src/beam/cli/tasks.py +++ b/sdk/src/beta9/cli/tasks.py @@ -4,10 +4,15 @@ from betterproto import Casing from rich.table import Column, Table, box -from beam import aio, terminal -from beam.cli.contexts import get_gateway_service -from beam.cli.formatters import EpilogFormatter -from beam.clients.gateway import GatewayServiceStub, ListTasksResponse, StopTaskResponse, StringList +from beta9 import aio, terminal +from beta9.cli.contexts import get_gateway_service +from beta9.cli.formatters import EpilogFormatter +from beta9.clients.gateway import ( + GatewayServiceStub, + ListTasksResponse, + StopTaskResponse, + StringList, +) @click.group( @@ -47,13 +52,13 @@ def parse_filter_values( cls=EpilogFormatter, epilog=""" # List the first 10 tasks - beam tasks list --limit 10 + beta9 tasks list --limit 10 # List tasks with status 'running' or 'pending' and stub-id 'function/test:handler' - beam tasks list --filter status=running,pending --filter stub-id=function/test:handler + beta9 tasks list --filter status=running,pending --filter stub-id=function/test:handler # List tasks and output in JSON format - beam tasks list --format json + beta9 tasks list --format json """, ) @click.option( diff --git a/sdk/src/beam/clients/__init__.py b/sdk/src/beta9/clients/__init__.py similarity index 100% rename from sdk/src/beam/clients/__init__.py rename to sdk/src/beta9/clients/__init__.py diff --git a/sdk/src/beam/clients/endpoint.py b/sdk/src/beta9/clients/endpoint.py similarity index 100% rename from sdk/src/beam/clients/endpoint.py rename to sdk/src/beta9/clients/endpoint.py diff --git a/sdk/src/beam/clients/function.py b/sdk/src/beta9/clients/function.py similarity index 100% rename from sdk/src/beam/clients/function.py rename to sdk/src/beta9/clients/function.py diff --git a/sdk/src/beam/clients/gateway.py b/sdk/src/beta9/clients/gateway.py similarity index 100% rename from sdk/src/beam/clients/gateway.py rename to sdk/src/beta9/clients/gateway.py diff --git a/sdk/src/beam/clients/image.py b/sdk/src/beta9/clients/image.py similarity index 98% rename from sdk/src/beam/clients/image.py rename to sdk/src/beta9/clients/image.py index fc62cc0ac..eb27e2024 100644 --- a/sdk/src/beam/clients/image.py +++ b/sdk/src/beta9/clients/image.py @@ -26,7 +26,7 @@ class VerifyImageBuildResponse(betterproto.Message): @dataclass class BuildImageRequest(betterproto.Message): - # These parameters are used for a "beam" managed image + # These parameters are used for a "beta9" managed image python_version: str = betterproto.string_field(1) python_packages: List[str] = betterproto.string_field(2) commands: List[str] = betterproto.string_field(3) diff --git a/sdk/src/beam/clients/map.py b/sdk/src/beta9/clients/map.py similarity index 100% rename from sdk/src/beam/clients/map.py rename to sdk/src/beta9/clients/map.py diff --git a/sdk/src/beam/clients/simplequeue.py b/sdk/src/beta9/clients/simplequeue.py similarity index 100% rename from sdk/src/beam/clients/simplequeue.py rename to sdk/src/beta9/clients/simplequeue.py diff --git a/sdk/src/beam/clients/taskqueue.py b/sdk/src/beta9/clients/taskqueue.py similarity index 100% rename from sdk/src/beam/clients/taskqueue.py rename to sdk/src/beta9/clients/taskqueue.py diff --git a/sdk/src/beam/clients/volume.py b/sdk/src/beta9/clients/volume.py similarity index 100% rename from sdk/src/beam/clients/volume.py rename to sdk/src/beta9/clients/volume.py diff --git a/sdk/src/beam/config.py b/sdk/src/beta9/config.py similarity index 93% rename from sdk/src/beam/config.py rename to sdk/src/beta9/config.py index d4f405a56..154f8cb1c 100644 --- a/sdk/src/beam/config.py +++ b/sdk/src/beta9/config.py @@ -12,12 +12,12 @@ from multidict import MultiDict from rich import prompt -from beam import terminal -from beam.aio import run_sync -from beam.clients.gateway import AuthorizeResponse, GatewayServiceStub -from beam.exceptions import RunnerException +from beta9 import terminal +from beta9.aio import run_sync +from beta9.clients.gateway import AuthorizeResponse, GatewayServiceStub +from beta9.exceptions import RunnerException -DEFAULT_CONFIG_FILE_PATH = "~/.beam/creds" +DEFAULT_CONFIG_FILE_PATH = "~/.beta9/creds" DEFAULT_PROFILE_NAME = "default" DEFAULT_GATEWAY_HOST = "0.0.0.0" DEFAULT_GATEWAY_PORT = "1993" @@ -102,9 +102,9 @@ def save_config_to_file(*, config: GatewayConfig, name: str) -> None: def get_gateway_config() -> GatewayConfig: - gateway_host = os.getenv("BEAM_GATEWAY_HOST", None) - gateway_port = os.getenv("BEAM_GATEWAY_PORT", None) - token = os.getenv("BEAM_TOKEN", None) + gateway_host = os.getenv("BETA9_GATEWAY_HOST", None) + gateway_port = os.getenv("BETA9_GATEWAY_PORT", None) + token = os.getenv("BETA9_TOKEN", None) if gateway_host and gateway_port and token: return GatewayConfig(gateway_host=gateway_host, gateway_port=gateway_port, token=token) @@ -120,7 +120,7 @@ def configure_gateway_credentials( gateway_port: Optional[str] = None, token: Optional[str] = None, ) -> GatewayConfig: - terminal.header("Welcome to Beam! Let's get started 📡") + terminal.header("Welcome to Beta9! Let's get started 📡") name = name or terminal.prompt(text="Profile name", default=DEFAULT_PROFILE_NAME) gateway_host = gateway_host or terminal.prompt( diff --git a/sdk/src/beam/exceptions.py b/sdk/src/beta9/exceptions.py similarity index 100% rename from sdk/src/beam/exceptions.py rename to sdk/src/beta9/exceptions.py diff --git a/sdk/src/beam/runner/__init__.py b/sdk/src/beta9/runner/__init__.py similarity index 100% rename from sdk/src/beam/runner/__init__.py rename to sdk/src/beta9/runner/__init__.py diff --git a/sdk/src/beam/runner/common.py b/sdk/src/beta9/runner/common.py similarity index 97% rename from sdk/src/beam/runner/common.py rename to sdk/src/beta9/runner/common.py index 9472c75ad..484f527ad 100644 --- a/sdk/src/beam/runner/common.py +++ b/sdk/src/beta9/runner/common.py @@ -4,7 +4,7 @@ from dataclasses import dataclass from typing import Callable, Optional -from beam.exceptions import RunnerException +from beta9.exceptions import RunnerException USER_CODE_VOLUME = "/mnt/code" diff --git a/sdk/src/beam/runner/function.py b/sdk/src/beta9/runner/function.py similarity index 87% rename from sdk/src/beam/runner/function.py rename to sdk/src/beta9/runner/function.py index dcbf2a070..0d0e55f22 100644 --- a/sdk/src/beam/runner/function.py +++ b/sdk/src/beta9/runner/function.py @@ -3,19 +3,18 @@ import time import cloudpickle -from grpclib.client import Channel - -from beam.aio import run_sync -from beam.clients.function import ( +from beta9.aio import run_sync +from beta9.clients.function import ( FunctionGetArgsResponse, FunctionServiceStub, FunctionSetResultResponse, ) -from beam.clients.gateway import EndTaskResponse, GatewayServiceStub, StartTaskResponse -from beam.config import with_runner_context -from beam.exceptions import InvalidFunctionArgumentsException, RunnerException -from beam.runner.common import USER_CODE_VOLUME, config, load_handler -from beam.type import TaskStatus +from beta9.clients.gateway import EndTaskResponse, GatewayServiceStub, StartTaskResponse +from beta9.config import with_runner_context +from beta9.exceptions import InvalidFunctionArgumentsException, RunnerException +from beta9.runner.common import USER_CODE_VOLUME, config, load_handler +from beta9.type import TaskStatus +from grpclib.client import Channel def _load_args(args: bytes) -> dict: diff --git a/sdk/src/beam/runner/taskqueue.py b/sdk/src/beta9/runner/taskqueue.py similarity index 97% rename from sdk/src/beam/runner/taskqueue.py rename to sdk/src/beta9/runner/taskqueue.py index 541d2b6ca..c56868f35 100644 --- a/sdk/src/beam/runner/taskqueue.py +++ b/sdk/src/beta9/runner/taskqueue.py @@ -14,20 +14,19 @@ import cloudpickle import grpc import grpclib -from grpclib.client import Channel -from grpclib.exceptions import StreamTerminatedError - -from beam.aio import run_sync -from beam.clients.taskqueue import ( +from beta9.aio import run_sync +from beta9.clients.taskqueue import ( TaskQueueCompleteResponse, TaskQueueMonitorResponse, TaskQueuePopResponse, TaskQueueServiceStub, ) -from beam.config import with_runner_context -from beam.exceptions import RunnerException -from beam.runner.common import config, load_handler -from beam.type import TaskExitCode, TaskStatus +from beta9.config import with_runner_context +from beta9.exceptions import RunnerException +from beta9.runner.common import config, load_handler +from beta9.type import TaskExitCode, TaskStatus +from grpclib.client import Channel +from grpclib.exceptions import StreamTerminatedError TASK_PROCESS_WATCHDOG_INTERVAL = 0.01 TASK_POLLING_INTERVAL = 0.01 diff --git a/sdk/src/beam/sync.py b/sdk/src/beta9/sync.py similarity index 97% rename from sdk/src/beam/sync.py rename to sdk/src/beta9/sync.py index 40d205118..e6bba216e 100644 --- a/sdk/src/beam/sync.py +++ b/sdk/src/beta9/sync.py @@ -6,15 +6,15 @@ import zipfile from typing import Generator, NamedTuple, Union -from beam import terminal -from beam.clients.gateway import ( +from beta9 import terminal +from beta9.clients.gateway import ( GatewayServiceStub, HeadObjectResponse, ObjectMetadata, PutObjectResponse, ) -IGNORE_FILE_NAME = ".beamignore" +IGNORE_FILE_NAME = ".beta9ignore" class FileSyncResult(NamedTuple): diff --git a/sdk/src/beam/terminal.py b/sdk/src/beta9/terminal.py similarity index 100% rename from sdk/src/beam/terminal.py rename to sdk/src/beta9/terminal.py diff --git a/sdk/src/beam/type.py b/sdk/src/beta9/type.py similarity index 93% rename from sdk/src/beam/type.py rename to sdk/src/beta9/type.py index 634ab6e37..bee2eb8e8 100644 --- a/sdk/src/beam/type.py +++ b/sdk/src/beta9/type.py @@ -27,7 +27,7 @@ class PythonVersion(str, Enum): Example: ```python - from beam import Image, PythonVersion + from beta9 import Image, PythonVersion # with an enum image = Image(python_version=PythonVersion.Python310) @@ -50,7 +50,7 @@ class GpuType(str, Enum): Example: ```python - from beam import GpuType, function + from beta9 import GpuType, function @function(gpu=GpuType.T4) def some_func() diff --git a/sdk/tests/test_function.py b/sdk/tests/test_function.py index 0328db128..e58c0d164 100644 --- a/sdk/tests/test_function.py +++ b/sdk/tests/test_function.py @@ -2,10 +2,9 @@ from unittest.mock import MagicMock import cloudpickle - -from beam import Image -from beam.abstractions.function import Function -from beam.clients.function import FunctionInvokeResponse +from beta9 import Image +from beta9.abstractions.function import Function +from beta9.clients.function import FunctionInvokeResponse class AsyncIterator: diff --git a/sdk/tests/test_map.py b/sdk/tests/test_map.py index b8e930005..7fc916d3e 100644 --- a/sdk/tests/test_map.py +++ b/sdk/tests/test_map.py @@ -2,9 +2,8 @@ from unittest.mock import MagicMock import cloudpickle - -from beam.abstractions.map import Map -from beam.clients.map import ( +from beta9.abstractions.map import Map +from beta9.clients.map import ( MapCountResponse, MapDeleteResponse, MapGetResponse, diff --git a/sdk/tests/test_queue.py b/sdk/tests/test_queue.py index fdd30aae0..d05267b6a 100644 --- a/sdk/tests/test_queue.py +++ b/sdk/tests/test_queue.py @@ -2,9 +2,8 @@ from unittest.mock import MagicMock import cloudpickle - -from beam.abstractions.queue import SimpleQueue, SimpleQueueInternalServerError -from beam.clients.simplequeue import ( +from beta9.abstractions.queue import SimpleQueue, SimpleQueueInternalServerError +from beta9.clients.simplequeue import ( SimpleQueueEmptyResponse, SimpleQueuePeekResponse, SimpleQueuePopResponse, diff --git a/sdk/tests/test_runner.py b/sdk/tests/test_runner.py index b922f78cc..6613214aa 100644 --- a/sdk/tests/test_runner.py +++ b/sdk/tests/test_runner.py @@ -1,6 +1,6 @@ import unittest -from beam.abstractions.base.runner import RunnerAbstraction +from beta9.abstractions.base.runner import RunnerAbstraction class TestRunner(unittest.TestCase): diff --git a/sdk/tests/test_task_queue.py b/sdk/tests/test_task_queue.py index 1f89ee44b..8cf551730 100644 --- a/sdk/tests/test_task_queue.py +++ b/sdk/tests/test_task_queue.py @@ -2,9 +2,9 @@ from unittest import TestCase from unittest.mock import MagicMock -from beam import Image -from beam.abstractions.taskqueue import TaskQueue -from beam.clients.taskqueue import TaskQueuePutResponse +from beta9 import Image +from beta9.abstractions.taskqueue import TaskQueue +from beta9.clients.taskqueue import TaskQueuePutResponse from .utils import mock_coroutine_with_result diff --git a/sdk/tests/test_volumes.py b/sdk/tests/test_volumes.py index 12d7211e0..9fdc48d4a 100644 --- a/sdk/tests/test_volumes.py +++ b/sdk/tests/test_volumes.py @@ -1,8 +1,8 @@ from unittest import TestCase from unittest.mock import MagicMock -from beam.abstractions.volume import Volume -from beam.clients.volume import GetOrCreateVolumeResponse +from beta9.abstractions.volume import Volume +from beta9.clients.volume import GetOrCreateVolumeResponse from .utils import mock_coroutine_with_result