Skip to content

Commit

Permalink
Rename project to beta9 (#62)
Browse files Browse the repository at this point in the history
* rename to beta9

* remove todo

* fix gateway okteto

---------

Co-authored-by: Luke Lombardi <[email protected]>
  • Loading branch information
luke-lombardi and Luke Lombardi authored Jan 23, 2024
1 parent 2a0d6fb commit 8236f5e
Show file tree
Hide file tree
Showing 157 changed files with 460 additions and 468 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bin/beam
bin/gateway
bin/runner
bin/worker
tmp/*
Expand All @@ -15,4 +15,4 @@ venv
terraform.tfstate*
terraform.tfvars
sdk/src/build
sdk/src/Beam.egg-info
sdk/src/beta9.egg-info
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img alt="Logo" src="https://github.com/beam-cloud/beam/assets/10925686/860052a1-2a96-4bad-a991-dd2b24e3b524"/ width="40%">
<img alt="Logo" src="https://github.com/beam-cloud/beta9/assets/10925686/860052a1-2a96-4bad-a991-dd2b24e3b524"/ width="40%">
</p>

<p align="center">
Expand All @@ -12,8 +12,8 @@
<a href="https://twitter.com/beam_cloud">
<img alt="Twitter" src="https://img.shields.io/twitter/follow/beam_cloud.svg?style=social&logo=twitter">
</a>
<a href="https://github.com/beam-cloud/beam/actions">
<img alt="Tests Passing" src="https://github.com/beam-cloud/beam/actions/workflows/ci.yml/badge.svg?branch=master">
<a href="https://github.com/beam-cloud/beta9/actions">
<img alt="Tests Passing" src="https://github.com/beam-cloud/beta9/actions/workflows/ci.yml/badge.svg?branch=master">
</a>
<img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-ff69b4"/>
</p>
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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)
1 change: 0 additions & 1 deletion TODO.md

This file was deleted.

4 changes: 2 additions & 2 deletions bin/k3d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions cmd/beam/main.go → cmd/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os/signal"
"syscall"

"github.com/beam-cloud/beam/internal/gateway"
"github.com/beam-cloud/beta9/internal/gateway"
)

func main() {
Expand All @@ -22,5 +22,5 @@ func main() {

<-stop

log.Println("beam stopped")
log.Println("gateway stopped")
}
2 changes: 1 addition & 1 deletion cmd/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"log"

"github.com/beam-cloud/beam/internal/worker"
"github.com/beam-cloud/beta9/internal/worker"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion deploy/aws-dev/modules/cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ variable "k3s_worker_count" {
}

variable "k3s_cluster_name" {
default = "beamtest-cluster"
default = "beta9test-cluster"
}
16 changes: 8 additions & 8 deletions deploy/aws-dev/modules/k8s-resources/config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -52,7 +52,7 @@ imageService:
python3.12: py312-latest
worker:
pools:
beam-cpu:
default:
jobSpec:
nodeSelector: {}
poolSizing:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions deploy/aws-dev/modules/k8s-resources/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion deploy/aws-dev/variables.tf
Original file line number Diff line number Diff line change
@@ -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" {
Expand Down
4 changes: 2 additions & 2 deletions deploy/crusoe/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions deploy/crusoe/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
name = "beam-arc"
name = "beam-beta9"
ssh_key_content = file(var.ssh_key_path)
}

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.beam → docker/Dockerfile.gateway
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
4 changes: 2 additions & 2 deletions docker/Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ make binaries
EOT


# beam worker
# beta9 worker
# ========================
FROM golang AS worker

Expand Down Expand Up @@ -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"
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/beam-cloud/beam
module github.com/beam-cloud/beta9

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion hack/k3d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions hack/okteto.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/abstractions/endpoint/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/abstractions/endpoint/endpoint.proto
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
16 changes: 8 additions & 8 deletions internal/abstractions/function/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/abstractions/function/function.proto
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Loading

0 comments on commit 8236f5e

Please sign in to comment.