Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kube-batch to scheduler #313

Merged
merged 4 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BIN_DIR=_output/bin
REL_OSARCH=linux/amd64
REPO_PATH=volcano.sh/volcano
IMAGE_PREFIX=volcanosh/vk
IMAGE_PREFIX=volcanosh/vc
TAG=latest
RELEASE_VER=v0.1
GitSHA=`git rev-parse HEAD`
Expand All @@ -13,13 +13,13 @@ LD_FLAGS=" \

.EXPORT_ALL_VARIABLES:

all: kube-batch vc-controllers vc-admission vkctl
all: scheduler vc-controllers vc-admission vkctl
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vc-scheduler


init:
mkdir -p ${BIN_DIR}

kube-batch: init
go build -ldflags ${LD_FLAGS} -o=${BIN_DIR}/vc-kube-batch ./cmd/kube-batch
scheduler: init
go build -ldflags ${LD_FLAGS} -o=${BIN_DIR}/vc-scheduler ./cmd/scheduler

vc-controllers: init
go build -ldflags ${LD_FLAGS} -o=${BIN_DIR}/vc-controllers ./cmd/controllers
Expand All @@ -33,12 +33,12 @@ vkctl: init
image_bins:
go get github.com/mitchellh/gox
CGO_ENABLED=0 gox -osarch=${REL_OSARCH} -ldflags ${LD_FLAGS} -output ${BIN_DIR}/${REL_OSARCH}/vkctl ./cmd/cli
for name in controllers kube-batch admission; do\
for name in controllers scheduler admission; do\
CGO_ENABLED=0 gox -osarch=${REL_OSARCH} -ldflags ${LD_FLAGS} -output ${BIN_DIR}/${REL_OSARCH}/vc-$$name ./cmd/$$name; \
done

images: image_bins
for name in controllers kube-batch admission; do\
for name in controllers scheduler admission; do\
cp ${BIN_DIR}/${REL_OSARCH}/vc-$$name ./installer/dockerfile/$$name/; \
docker build --no-cache -t $(IMAGE_PREFIX)-$$name:$(TAG) ./installer/dockerfile/$$name; \
rm installer/dockerfile/$$name/vc-$$name; \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ make images
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
volcanosh/vc-admission latest a83338506638 8 seconds ago 41.4MB
volcanosh/vc-kube-batch latest faa3c2a25ac3 9 seconds ago 49.6MB
volcanosh/vc-scheduler latest faa3c2a25ac3 9 seconds ago 49.6MB
volcanosh/vc-controllers latest 7b11606ebfb8 10 seconds ago 44.2MB

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/golang/glog"
"github.com/prometheus/client_golang/prometheus/promhttp"
"volcano.sh/volcano/cmd/kube-batch/app/options"
"volcano.sh/volcano/cmd/scheduler/app/options"
"volcano.sh/volcano/pkg/scheduler"
"volcano.sh/volcano/pkg/version"

Expand Down
4 changes: 2 additions & 2 deletions cmd/kube-batch/main.go → cmd/scheduler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/util/flag"

"volcano.sh/volcano/cmd/kube-batch/app"
"volcano.sh/volcano/cmd/kube-batch/app/options"
"volcano.sh/volcano/cmd/scheduler/app"
"volcano.sh/volcano/cmd/scheduler/app/options"

// Import default actions/plugins.
_ "volcano.sh/volcano/pkg/scheduler/actions"
Expand Down
4 changes: 2 additions & 2 deletions hack/run-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function install-volcano {

echo "Loading docker images into kind cluster"
kind load docker-image ${IMAGE_PREFIX}-controllers:${TAG} ${CLUSTER_CONTEXT}
kind load docker-image ${IMAGE_PREFIX}-kube-batch:${TAG} ${CLUSTER_CONTEXT}
kind load docker-image ${IMAGE_PREFIX}-scheduler:${TAG} ${CLUSTER_CONTEXT}
kind load docker-image ${IMAGE_PREFIX}-admission:${TAG} ${CLUSTER_CONTEXT}
kind load docker-image ${MPI_EXAMPLE_IMAGE} ${CLUSTER_CONTEXT}

Expand All @@ -77,7 +77,7 @@ function generate-log {
echo "Generating volcano log files"
kubectl logs deployment/${CLUSTER_NAME}-admission -n kube-system > volcano-admission.log
kubectl logs deployment/${CLUSTER_NAME}-controllers -n kube-system > volcano-controller.log
kubectl logs deployment/${CLUSTER_NAME}-kube-batch -n kube-system > volcano-kube-batch.log
kubectl logs deployment/${CLUSTER_NAME}-scheduler -n kube-system > volcano-kube-batch.log

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@

FROM alpine:latest

ADD vc-kube-batch /vc-kube-batch
ENTRYPOINT ["/vc-kube-batch"]
ADD vc-scheduler /vc-scheduler
ENTRYPOINT ["/vc-scheduler"]
2 changes: 1 addition & 1 deletion pkg/cli/job/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func InitRunFlags(cmd *cobra.Command) {
cmd.Flags().IntVarP(&launchJobFlags.Replicas, "replicas", "r", 1, "the total tasks of job")
cmd.Flags().StringVarP(&launchJobFlags.Requests, "requests", "R", "cpu=1000m,memory=100Mi", "the resource request of the task")
cmd.Flags().StringVarP(&launchJobFlags.Limits, "limits", "L", "cpu=1000m,memory=100Mi", "the resource limit of the task")
cmd.Flags().StringVarP(&launchJobFlags.SchedulerName, "scheduler", "S", "kube-batch", "the scheduler for this job")
cmd.Flags().StringVarP(&launchJobFlags.SchedulerName, "scheduler", "S", "volcano-scheduler", "the scheduler for this job")
cmd.Flags().StringVarP(&launchJobFlags.FileName, "filename", "f", "", "the yaml file of job")
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
"k8s.io/kubernetes/pkg/scheduler/volumebinder"

"volcano.sh/volcano/cmd/kube-batch/app/options"
"volcano.sh/volcano/cmd/scheduler/app/options"
"volcano.sh/volcano/pkg/apis/scheduling/v1alpha1"
kbver "volcano.sh/volcano/pkg/client/clientset/versioned"
"volcano.sh/volcano/pkg/client/clientset/versioned/scheme"
Expand Down