Running Ubuntu in WSL2
ubuntu@WSLBOX:~/volcano$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-5c98db65d4-c4p2w 1/1 Running 0 4m28s
kube-system coredns-5c98db65d4-xs7ll 1/1 Running 0 4m28s
kube-system etcd-kind-control-plane 1/1 Running 0 3m37s
kube-system kindnet-8wj2t 1/1 Running 0 4m28s
kube-system kube-apiserver-kind-control-plane 1/1 Running 0 3m45s
kube-system kube-controller-manager-kind-control-plane 1/1 Running 0 3m44s
kube-system kube-proxy-wkjst 1/1 Running 0 4m28s
kube-system kube-scheduler-kind-control-plane 1/1 Running 0 3m25s
Pulled the volcano 0.2 distribution down
ubuntu@WSLBOX:~/volcano$ ls
LICENSE README.md bin helm v0.2 volcano-0.2-linux-gnu.tar.gz volcano-0.2.yaml
Installing Volcano is easy
ubuntu@WSLBOX:~/volcano$ kubectl apply -f volcano-0.2.yaml
namespace/volcano-system created
configmap/volcano-scheduler-configmap created
serviceaccount/volcano-scheduler created
clusterrole.rbac.authorization.k8s.io/volcano-scheduler created
clusterrolebinding.rbac.authorization.k8s.io/volcano-scheduler-role created
deployment.apps/volcano-scheduler created
serviceaccount/volcano-admission created
clusterrole.rbac.authorization.k8s.io/volcano-admission created
clusterrolebinding.rbac.authorization.k8s.io/volcano-admission-role created
deployment.apps/volcano-admission created
service/volcano-admission-service created
job.batch/volcano-admission-init created
serviceaccount/volcano-controllers created
clusterrole.rbac.authorization.k8s.io/volcano-controllers created
clusterrolebinding.rbac.authorization.k8s.io/volcano-controllers-role created
deployment.apps/volcano-controllers created
customresourcedefinition.apiextensions.k8s.io/jobs.batch.volcano.sh created
customresourcedefinition.apiextensions.k8s.io/commands.bus.volcano.sh created
customresourcedefinition.apiextensions.k8s.io/podgroups.scheduling.incubator.k8s.io created
customresourcedefinition.apiextensions.k8s.io/queues.scheduling.incubator.k8s.io created
customresourcedefinition.apiextensions.k8s.io/podgroups.scheduling.sigs.dev created
customresourcedefinition.apiextensions.k8s.io/queues.scheduling.sigs.dev created
Verify the Volcano system installation
ubuntu@WSLBOX:~/volcano$ kubectl get all -n volcano-system
NAME READY STATUS RESTARTS AGE
pod/volcano-admission-d89bb594-b2jhk 1/1 Running 0 70s
pod/volcano-admission-init-9lmm6 0/1 Completed 0 70s
pod/volcano-controllers-6f95f57fc-cjzdr 1/1 Running 0 70s
pod/volcano-scheduler-545cb4fb-chnxf 1/1 Running 0 70s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/volcano-admission-service ClusterIP 10.97.169.235
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/volcano-admission 1/1 1 1 70s
deployment.apps/volcano-controllers 1/1 1 1 70s
deployment.apps/volcano-scheduler 1/1 1 1 70s
NAME DESIRED CURRENT READY AGE
replicaset.apps/volcano-admission-d89bb594 1 1 1 70s
replicaset.apps/volcano-controllers-6f95f57fc 1 1 1 70s
replicaset.apps/volcano-scheduler-545cb4fb 1 1 1 70s
NAME COMPLETIONS DURATION AGE
job.batch/volcano-admission-init 1/1 12s 70s
ubuntu@WSLBOX:~/volcano$
Volcano source comes with its own go client so setup VSCode to build Volcano
- must install go 1.12ubuntu@WSLBOX:~/go/src/github.com/volcano-sh$ go get golang.org/dl/go1.12
ubuntu@WSLBOX:~/go/src/github.com/volcano-sh$ go1.12
go1.12: not downloaded. Run 'go1.12 download' to install to /home/ubuntu/sdk/go1.12
ubuntu@WSLBOX:~/go/src/github.com/volcano-sh$ go1.12 download
Downloaded 0.0% ( 15173 / 127228112 bytes) ...
Downloaded 6.8% ( 8617984 / 127228112 bytes) ...
Downloaded 22.0% ( 27983872 / 127228112 bytes) ...
Downloaded 36.5% ( 46465024 / 127228112 bytes) ...
Downloaded 51.6% ( 65639018 / 127228112 bytes) ...
Downloaded 66.9% ( 85070442 / 127228112 bytes) ...
Downloaded 82.2% (104567402 / 127228112 bytes) ...
Downloaded 98.0% (124686954 / 127228112 bytes) ...
Downloaded 100.0% (127228112 / 127228112 bytes)
Unpacking /home/ubuntu/sdk/go1.12/go1.12.linux-amd64.tar.gz ...
Success. You may now run 'go1.12'
Edit the makeFile to use go1.12
ubuntu@WSLBOX:~/go/src/volcano-sh/volcano$ pwd
/home/ubuntu/go/src/volcano-sh/volcano
ubuntu@WSLBOX:~/go/src/volcano-sh/volcano$ dep ensure
dep: WARNING: Unknown field in manifest: prune
ubuntu@WSLBOX:~/go/src/volcano-sh/volcano$ make
mkdir -p _output/bin
mkdir -p _output/release
go1.12 build -ldflags " -X 'volcano.sh/volcano/pkg/version.GitSHA=`git rev-parse HEAD`' -X 'volcano.sh/volcano/pkg/version.Built=`date "+%Y-%m-%d %H:%M:%S"`' -X 'volcano.sh/volcano/pkg/version.Version=v0.2'" -o=_output/bin/vc-scheduler ./cmd/scheduler
go1.12 build -ldflags " -X 'volcano.sh/volcano/pkg/version.GitSHA=`git rev-parse HEAD`' -X 'volcano.sh/volcano/pkg/version.Built=`date "+%Y-%m-%d %H:%M:%S"`' -X 'volcano.sh/volcano/pkg/version.Version=v0.2'" -o=_output/bin/vc-controllers ./cmd/controllers
go1.12 build -ldflags " -X 'volcano.sh/volcano/pkg/version.GitSHA=`git rev-parse HEAD`' -X 'volcano.sh/volcano/pkg/version.Built=`date "+%Y-%m-%d %H:%M:%S"`' -X 'volcano.sh/volcano/pkg/version.Version=v0.2'" -o=_output/bin/vc-admission ./cmd/admission
go1.12 build -ldflags " -X 'volcano.sh/volcano/pkg/version.GitSHA=`git rev-parse HEAD`' -X 'volcano.sh/volcano/pkg/version.Built=`date "+%Y-%m-%d %H:%M:%S"`' -X 'volcano.sh/volcano/pkg/version.Version=v0.2'" -o=_output/bin/vcctl ./cmd/cli
Use clientset and create jobs programmatically
the project has 2 versioned client sets alpha1 and alpha2
schedulingv1alpha2 "volcano.sh/volcano/pkg/client/clientset/versioned/typed/scheduling/v1alpha2"
Looking at the code you can you see
test/e2e/util.go
test/e2e/admission.go
test/e2e/util.go
It seems that the synchronization set controller would use the client API to create jobs.
No comments:
Post a Comment