From 6bafe8b25cf32e3af7b776ff2ff2fa5c1beb4927 Mon Sep 17 00:00:00 2001 From: shaoqiu <516595344@qq.com> Date: Thu, 11 Aug 2022 16:45:46 +0800 Subject: [PATCH] fix README.md comments to make clearly, add example/jobflow/README.md; Signed-off-by: shaoqiu <516595344@qq.com> --- README.md | 8 --- docs/design/jobflow/{jobflow.md => README.md} | 0 example/jobflow/README.md | 63 +++++++++++++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) rename docs/design/jobflow/{jobflow.md => README.md} (100%) create mode 100644 example/jobflow/README.md diff --git a/README.md b/README.md index 72159b1a48..3b0ab94d13 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,6 @@ are looking forward to your participation. **NOTE**: the scheduler is built based on [kube-batch](https://github.com/kubernetes-sigs/kube-batch); refer to [#241](https://github.com/volcano-sh/volcano/issues/241) and [#288](https://github.com/volcano-sh/volcano/pull/288) for more detail. -[JobFlow](./docs/design/jobflow/jobflow.md) is a workflow engine based on volcano Job. It proposes two concepts to automate running multiple batch jobs, named JobTemplate and JobFlow, so end users can easily declare their jobs and run them using complex control primitives such as sequential or parallel execution, if-then -else statement, switch-case statement, loop execution, etc. - ![cncf_logo](docs/images/cncf-logo.png) Volcano is an incubating project of the [Cloud Native Computing Foundation](https://cncf.io/) (CNCF). Please consider joining the CNCF if you are an organization that wants to take an active role in supporting the growth and evolution of the cloud native ecosystem. @@ -40,8 +38,6 @@ Volcano is an incubating project of the [Cloud Native Computing Foundation](http ![volcano](docs/images/volcano-architecture.png) -![jobflow-1.png](./docs/design/images/jobflow-1.png) - ## Talks - [Intro: Kubernetes Batch Scheduling @ KubeCon 2019 EU](https://sched.co/MPi7) @@ -114,10 +110,6 @@ job.batch/volcano-admission-init 1/1 48s 96s ``` -### Disable JobFlow - -Disable JobFlow related components if necessary. You need to add --forbid-jobflow=true to the startup parameters of the controller and admission respectively. The default is false to enable the state. - ### Install from code If you don't have a kubernetes cluster, try one-click install from code base: diff --git a/docs/design/jobflow/jobflow.md b/docs/design/jobflow/README.md similarity index 100% rename from docs/design/jobflow/jobflow.md rename to docs/design/jobflow/README.md diff --git a/example/jobflow/README.md b/example/jobflow/README.md new file mode 100644 index 0000000000..a262c2910b --- /dev/null +++ b/example/jobflow/README.md @@ -0,0 +1,63 @@ +## JobFlow + +#### These examples shows how to run JobFlow via Volcano. + +[JobFlow](../../docs/design/jobflow) is a workflow engine based on volcano Job. It proposes two concepts to automate running multiple batch jobs, named JobTemplate and JobFlow, so end users can easily declare their jobs and run them using complex control primitives such as sequential or parallel execution, if-then -else statement, switch-case statement, loop execution, etc. + +read design at [here](../../docs/design/jobflow). + +### Prerequisites + +- docker: `18.06` +- Kubernetes: >`1.17` + +## startup steps + +build image from local +```bash +# get volcano and jobflow source code from github +git clone http://github.com/volcano-sh/volcano.git +git clone https://github.com/BoCloud/JobFlow.git + +# build image beyondcent/jobflow:v0.0.1 from local +cd JobFlow +make +make docker-build +``` + +##### deploy JobFlow from [here](https://github.com/BoCloud/JobFlow#deploy) +```bash +kubectl apply -f https://raw.githubusercontent.com/BoCloud/JobFlow/main/deploy/jobflow.yaml +``` + +##### deploy Volcano from [here](https://volcano.sh/en/docs/installation/#install-with-yaml-files) +```bash +kubectl apply -f https://raw.githubusercontent.com/volcano-sh/volcano/master/installer/volcano-development.yaml +``` + +if cert of `jobflow-webhook-service.kube-system.svc` has expired, generate one to replace it. +```bash +# delete expired cert in secrets +kubectl delete secret jobflow-webhook-server-cert -nkube-system + +# use gen-admission-secret.sh register new secret +cd volcano +./installer/dockerfile/webhook-manager/gen-admission-secret.sh --service jobflow-webhook-service --namespace kube-system --secret jobflow-webhook-server-cert + +# restart jobflow-controller-manager +kubectl delete pod/jobflow-controller-manager-67847d59dd-j8dmc -nkube-system +``` + +##### run jobflow example +```bash +# deploy jobTemplate first +cd volcano +kubectl apply -f example/jobflow/JobTemplate.yaml +# deploy jobFlow second +kubectl apply -f example/jobflow/JobFlow.yaml + +# check them +kubectl get jt +kubectl get jf +kubectl get po +``` \ No newline at end of file