18
18
# ##########################################################################
19
19
# ___INFO__MARK_END_NEW__
20
20
21
- # This Makefile is used for development and testing purposes only.
21
+ # --------------------------------------------------------------------
22
+ # This configuration is intended for local development on Darwin/macOS
23
+ # with ARM architecture (such as M4).
24
+ #
25
+ # Usage on Linux systems and/or AMD64 architectures may require
26
+ # adjustments to ensure images build and run correctly.
27
+ #
28
+ # Contributions to broaden compatibility are welcome!
29
+ # --------------------------------------------------------------------
22
30
23
31
IMAGE_NAME = $(shell basename $(CURDIR ) )
24
32
IMAGE_TAG = V902_TAG
@@ -36,14 +44,14 @@ build:
36
44
run-privileged : build
37
45
@echo " Running the Open Cluster Scheduler container in privileged mode..."
38
46
mkdir -p ./installation
39
- docker run -p 7070:7070 --rm -it -h master --privileged -v /dev/fuse:/dev/fuse --cap-add SYS_ADMIN --name $(CONTAINER_NAME ) -v . /installation:/opt/cs-install -v . /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash
47
+ docker run -p 7070:7070 --rm -it -h master --privileged -v /dev/fuse:/dev/fuse --cap-add SYS_ADMIN --name $(CONTAINER_NAME ) -v ${PWD} /installation:/opt/cs-install -v ${PWD} /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash
40
48
41
49
.PHONY : run
42
50
run : build
43
51
@echo " Running the Open Cluster Scheduler container..."
44
52
@echo " For a new installation, you need to remove the ./installation subdirectory first."
45
53
mkdir -p ./installation
46
- docker run --platform=linux/amd64 -p 7070:7070 -p 9464:9464 --rm -it -h master --name $(CONTAINER_NAME ) -v . /installation:/opt/cs-install -v . /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash
54
+ docker run --platform=linux/amd64 -p 7070:7070 -p 9464:9464 --rm -it -h master --name $(CONTAINER_NAME ) -v ${PWD} /installation:/opt/cs-install -v ${PWD} /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash
47
55
48
56
# Running apptainers in containers requires more permissions. You can drop
49
57
# the --privileged flag and the --cap-add SYS_ADMIN flag if you don't need
@@ -55,7 +63,7 @@ simulate:
55
63
rm -rf ./installation
56
64
@echo " Creating new subdirectory for installation..."
57
65
mkdir -p ./installation
58
- docker run --platform=linux/amd64 --rm -it -h master --privileged --cap-add SYS_ADMIN -p 9464:9464 -p 8888:8888 --name $(CONTAINER_NAME ) -v . /installation:/opt/cs-install -v . /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash -c " cd /root/go/src/github.com/hpc-gridware/go-clusterscheduler/cmd/simulator && go build . && ./simulator run ../../cluster.json && /bin/bash"
66
+ docker run --platform=linux/amd64 --rm -it -h master --privileged --cap-add SYS_ADMIN -p 9464:9464 -p 8888:8888 --name $(CONTAINER_NAME ) -v ${PWD} /installation:/opt/cs-install -v ${PWD} /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash -c " cd /root/go/src/github.com/hpc-gridware/go-clusterscheduler/cmd/simulator && GOFLAGS=-buildvcs=false go build . && ./simulator run ../../cluster.json && /bin/bash"
59
67
60
68
# .PHONY: simulate
61
69
# simulate:
@@ -68,14 +76,14 @@ adapter:
68
76
@echo " Running the adapter on port 8282...POST to http://localhost:8282/api/v0/command"
69
77
@echo " Example: curl -X POST http://localhost:8282/api/v0/command -d '{\" method\" : \" ShowSchedulerConfiguration\" }'"
70
78
mkdir -p ./installation
71
- docker run --platform=linux/amd64 --rm -it -h master -p 8282:8282 --name $(CONTAINER_NAME ) -v . /installation:/opt/cs-install -v . /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash -c " cd /root/go/src/github.com/hpc-gridware/go-clusterscheduler/cmd/adapter && go build . && ./adapter"
79
+ docker run --platform=linux/amd64 --rm -it -h master -p 8282:8282 --name $(CONTAINER_NAME ) -v ${PWD} /installation:/opt/cs-install -v ${PWD} /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash -c " cd /root/go/src/github.com/hpc-gridware/go-clusterscheduler/cmd/adapter && GOFLAGS=-buildvcs=false go build . && ./adapter"
72
80
73
81
.PHONY : run-rest
74
82
run-rest : build
75
83
@echo " Running the Open Cluster Scheduler container with REST adapter..."
76
84
@echo " For a new installation, you need to remove the ./installation subdirectory first."
77
85
mkdir -p ./installation
78
- docker run --platform=linux/amd64 -p 7070:7070 -p 9464:9464 -p 9898:9898 --rm -it -h master --name $(CONTAINER_NAME ) -v . /installation:/opt/cs-install -v . /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash -c " cd /root/go/src/github.com/hpc-gridware/go-clusterscheduler/cmd/adapter && go build . && ./adapter --port 9898 & exec bash"
86
+ docker run --platform=linux/amd64 -p 7070:7070 -p 9464:9464 -p 9898:9898 --rm -it -h master --name $(CONTAINER_NAME ) -v ${PWD} /installation:/opt/cs-install -v ${PWD} /:/root/go/src/github.com/hpc-gridware/go-clusterscheduler $(IMAGE_NAME ) :$(IMAGE_TAG ) /bin/bash -c " cd /root/go/src/github.com/hpc-gridware/go-clusterscheduler/cmd/adapter && GOFLAGS=-buildvcs=false go build . && ./adapter --port 9898 & exec bash"
79
87
80
88
.PHONY : clean
81
89
clean :
0 commit comments