-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* save: wip to add ssl, not working yet Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
24 changed files
with
448 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
HERE ?= $(shell pwd) | ||
LOCALBIN ?= $(shell pwd)/bin | ||
CERTBIN ?= $(LOCALBIN)/certs | ||
VERSION :=$(shell cat .version) | ||
YAML_FILES :=$(shell find . ! -path "./vendor/*" -type f -regex ".*y*ml" -print) | ||
REGISTRY ?= ghcr.io/converged-computing | ||
|
@@ -11,39 +12,47 @@ all: help | |
$(LOCALBIN): | ||
mkdir -p $(LOCALBIN) | ||
|
||
.PHONY: $(CERTBIN) | ||
$(CERTBIN): | ||
mkdir -p $(CERTBIN) | ||
|
||
.PHONY: protoc | ||
protoc: $(LOCALBIN) | ||
GOBIN=$(LOCALBIN) go install google.golang.org/protobuf/cmd/[email protected] | ||
GOBIN=$(LOCALBIN) go install google.golang.org/grpc/cmd/[email protected] | ||
|
||
.PHONY: build | ||
.PHONY: build ## Build client and server | ||
build: build-cli build-rainbow | ||
|
||
.PHONY: build-cli | ||
build-cli: $(LOCALBIN) | ||
build-cli: $(LOCALBIN) ## Build rainbow Go client | ||
GO111MODULE="on" go build -o $(LOCALBIN)/rainbow cmd/rainbow/rainbow.go | ||
|
||
.PHONY: build-rainbow | ||
build-rainbow: $(LOCALBIN) | ||
build-rainbow: $(LOCALBIN) ## Build rainbow scheduler (server) | ||
GO111MODULE="on" go build -o $(LOCALBIN)/rainbow-scheduler cmd/server/server.go | ||
|
||
.PHONY: docker | ||
.PHONY: docker ## Make all docker images | ||
docker: docker-flux docker-ubuntu | ||
|
||
.PHONY: docker-flux | ||
docker-flux: | ||
docker-flux: ## Make docker ubuntu + flux image | ||
docker build --build-arg base=fluxrm/flux-sched:jammy -t $(REGISTRY)/rainbow-flux:latest . | ||
|
||
.PHONY: docker-ubuntu | ||
docker-ubuntu: | ||
docker-ubuntu: ## Make docker ubuntu images | ||
docker build -t $(REGISTRY)/rainbow-scheduler:latest . | ||
|
||
.PHONY: docker-arm | ||
docker-arm: | ||
docker buildx build --build-arg arch=arm64 --platform linux/arm64 --tag $(REGISTRY)/rainbow-scheduler:arm --load . | ||
|
||
.PHONY: certs | ||
certs: $(CERTBIN) ## Make self-signed certificates | ||
$(HERE)/hack/generate-certs.sh $(CERTBIN) | ||
|
||
.PHONY: proto | ||
proto: protoc ## Generates the API code and documentation | ||
proto: protoc ## Make protobuf files | ||
mkdir -p pkg/api/v1 | ||
PATH=$(LOCALBIN):${PATH} protoc --proto_path=api/v1 --go_out=pkg/api/v1 --go_opt=paths=source_relative --go-grpc_out=pkg/api/v1 --go-grpc_opt=paths=source_relative rainbow.proto | ||
PATH=$(LOCALBIN):${PATH} protoc --proto_path=plugins/backends/memory/service --go_out=plugins/backends/memory/service --go_opt=paths=source_relative --go-grpc_out=plugins/backends/memory/service --go-grpc_opt=paths=source_relative memory.proto | ||
|
@@ -83,6 +92,10 @@ test: tidy ## Runs unit tests | |
server: ## Runs uncompiled version of the server | ||
go run cmd/server/server.go --global-token rainbow | ||
|
||
.PHONY: server-tls | ||
server-tls: ## Runs uncompiled version of the server with self-signed certs | ||
go run cmd/server/server.go --global-token rainbow -cert $(CERTBIN)/server-cert.pem -ca-cert $(CERTBIN)/ca-cert.pem --key $(CERTBIN)/server-key.pem | ||
|
||
.PHONY: server-verbose | ||
server-verbose: ## Runs uncompiled version of the server | ||
go run cmd/server/server.go --loglevel 6 --global-token rainbow | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.