<commit_before>
# Arena supports and simplifies volcano job.

Volcano is a batch system built on Kubernetes. It provides a suite of mechanisms currently missing from
Kubernetes that are commonly required by many classes of batch & elastic workload including:

1. machine learning/deep learning,
2. bioinformatics/genomics, and
3. other "big data" applications.

## pre requisites

- k8s deployment
- deploy the volcano following the steps from kubernetes-artifacts/volcano-operator/README.md

### 1. To run a batch/distributed volcano job, you may need to specify:
--minAvailable int       The minimal available pods to run for this Job. default value is 1 (default 1)
--name string            override name
--queue string           Specifies the queue that will be used in the scheduler, default queue is used this leaves empty (default "default")
--schedulerName string   Specifies the scheduler Name, default is volcano when not specified (default "volcano")
--taskCPU string         cpu request for each task replica / pod. default value is 250m (default "250m")
--taskImages strings     the docker images of different tasks of volcano job. default used 3 tasks with ubuntu,nginx and busybox images (default [ubuntu,nginx,busybox])
--taskMemory string      memory request for each task replica/pod.default value is 128Mi) (default "128Mi")
--taskName string        the task name of volcano job, default value is task (default "task")
--taskPort int           the task port number. default value is 2222 (default 2222)
--taskReplicas int       the task replica's number to run the distributed tasks. default value is 1 (default 1)

### 2. More information related to volcano job.

Arena volcano job is based on (https://github.com/volcano-sh/volcano).
You can get more information related to volcano from https://volcano.sh/

### 3. How to use Arena volcano job

##### install volcano
 
deploy the volcano following the steps from kubernetes-artifacts/volcano-operator/README.md 

To install the chart with the release name `volcano-release`

```bash
$ helm install --name volcano-release kubernetes-artifacts/volcano-operator
```

TO verify all deployments are running use the below command

```bash
    kubectl get deployment --all-namespaces | grep {release_name}
```
We should get similar output like given below, where three deployments for controller, admission, scheduler should be running.


NAME                       READY  UP-TO-DATE  AVAILABLE  AGE
{release_name}-admission    1/1    1           1          4s
{release_name}-controllers  1/1    1           1          4s
{release_name}-scheduler    1/1    1           1          4s

TO verify all pods are running use the below command

```bash
    kubectl get pods --all-namespaces | grep {release_name}
```

We should get similar output like given below, where three pods for controller, admission,admissioninit, scheduler should be running.

NAMESPACE     NAME                                          READY    STATUS             RESTARTS   AGE
default       volcano-release-admission-cbfdb8549-dz5hg      1/1     Running            0          33s
default       volcano-release-admission-init-7xmzd           0/1     Completed          0          33s
default       volcano-release-controllers-7967fffb8d-7vnn9   1/1     Running            0          33s
default       volcano-release-scheduler-746f6557d8-9pfg6     1/1     Running            0          33s


##### submit a volcano job

```$xslt
arena submit volcanojob --name=demo
```

The result is like below.
```$xslt

configmap/demo-volcanojob created
configmap/demo-volcanojob labeled
job.batch.volcano.sh/demo created
INFO[0003] The Job demo has been submitted successfully
INFO[0003] You can run `arena get demo --type volcanojob` to check the job status

```

if we want to provide more command line parameters then
```$xslt
./bin/arena submit volcanojob --name demo12 --taskImages busybox,busybox  --taskReplicas 2
```

in above case it creates two tasks each with 2 replicas  as shown below
```$xslt
arena get --type volcanojob demo12
```
the result is as below
```$xslt<commit_msg>typo of volcano job (#253)<commit_after>
# Arena supports and simplifies volcano job.

Volcano is a batch system built on Kubernetes. It provides a suite of mechanisms currently missing from
Kubernetes that are commonly required by many classes of batch & elastic workload including:

1. machine learning/deep learning,
2. bioinformatics/genomics, and
3. other "big data" applications.

## pre requisites

- k8s deployment
- deploy the volcano following the steps from kubernetes-artifacts/volcano-operator/README.md

### 1. To run a batch/distributed volcano job, you may need to specify:

```
--minAvailable int       The minimal available pods to run for this Job. default value is 1 (default 1)
--name string            override name
--queue string           Specifies the queue that will be used in the scheduler, default queue is used this leaves empty (default "default")
--schedulerName string   Specifies the scheduler Name, default is volcano when not specified (default "volcano")
--taskCPU string         cpu request for each task replica / pod. default value is 250m (default "250m")
--taskImages strings     the docker images of different tasks of volcano job. default used 3 tasks with ubuntu,nginx and busybox images (default [ubuntu,nginx,busybox])
--taskMemory string      memory request for each task replica/pod.default value is 128Mi) (default "128Mi")
--taskName string        the task name of volcano job, default value is task (default "task")
--taskPort int           the task port number. default value is 2222 (default 2222)
--taskReplicas int       the task replica's number to run the distributed tasks. default value is 1 (default 1)
```

### 2. More information related to volcano job.

Arena volcano job is based on (https://github.com/volcano-sh/volcano).
You can get more information related to volcano from https://volcano.sh/

### 3. How to use Arena volcano job

##### install volcano
 
deploy the volcano following the steps from kubernetes-artifacts/volcano-operator/README.md 

To install the chart with the release name `volcano-release`

```bash
$ helm install --name volcano-release kubernetes-artifacts/volcano-operator
```

TO verify all deployments are running use the below command

```bash
    kubectl get deployment --all-namespaces | grep {release_name}
```
We should get similar output like given below, where three deployments for controller, admission, scheduler should be running.

```bash
NAME                       READY  UP-TO-DATE  AVAILABLE  AGE
{release_name}-admission    1/1    1           1          4s
{release_name}-controllers  1/1    1           1          4s
{release_name}-scheduler    1/1    1           1          4s
```

TO verify all pods are running use the below command

```bash
    kubectl get pods --all-namespaces | grep {release_name}
```

We should get similar output like given below, where three pods for controller, admission,admissioninit, scheduler should be running.

```bash
NAMESPACE     NAME                                          READY    STATUS             RESTARTS   AGE
default       volcano-release-admission-cbfdb8549-dz5hg      1/1     Running            0          33s
default       volcano-release-admission-init-7xmzd           0/1     Completed          0          33s
default       volcano-release-controllers-7967fffb8d-7vnn9   1/1     Running            0          33s
default       volcano-release-scheduler-746f6557d8-9pfg6     1/1     Running            0          33s
```

##### submit a volcano job

```$xslt
arena submit volcanojob --name=demo
```

The result is like below.
```$xslt

configmap/demo-volcanojob created
configmap/demo-volcanojob labeled
job.batch.volcano.sh/demo created
INFO[0003] The Job demo has been submitted successfully
INFO[0003] You can run `arena get demo --type volcanojob` to check the job status

```

if we want to provide more command line parameters then
```$xslt
./bin/arena submit volcanojob --name demo12 --taskImages busybox,busybox  --taskReplicas 2
```

in above case it creates two tasks each with 2 replicas  as shown below
```$xslt
arena get --type volcanojob demo12
```
the result is as below
```$xslt
{'fraction_non_alphanumeric': 0.07173965642390516, 'fraction_numerical': 0.02552625211710622, 'mean_word_length': 2.932921027592769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7565450', 'n_tokens_mistral': 2514, 'n_tokens_neox': 2181, 'n_words': 979}