volcano.sh/volcano@v1.9.0/docs/user-guide/how_to_use_task_topology_plugin.md (about) 1 # Task Topology Plugin User Guide 2 3 ## Environment setup 4 5 ### Install volcano 6 7 Refer to [Install Guide](../../installer/README.md) to install volcano. 8 9 ### Update scheduler configmap 10 11 After installed, update the scheduler configuration: 12 13 ```shell 14 kubectl edit configmap -n volcano-system volcano-scheduler-configmap 15 ``` 16 17 Register `task-topology` plugin in configmap 18 19 ```yaml 20 kind: ConfigMap 21 apiVersion: v1 22 metadata: 23 name: volcano-scheduler-configmap 24 namespace: volcano-system 25 data: 26 volcano-scheduler.conf: | 27 actions: "enqueue, allocate, backfill" 28 tiers: 29 - plugins: 30 - name: priority 31 - name: gang 32 - name: conformance 33 - plugins: 34 - name: drf 35 - name: predicates 36 - name: task-topology 37 arguments: 38 task-topology.weight: 10 39 - name: proportion 40 - name: nodeorder 41 - name: binpack 42 ``` 43 44 ### Running Jobs 45 46 Take tensorflow job as sample. 47 48 #### Install kubeflow/tf-operator 49 50 Refer to [Install Guide](https://www.kubeflow.org/docs/started/getting-started/) to install kubeflow, tf-operator included. 51 52 #### Edit yaml of tfjob 53 54 1. add annotations in volcano job or tensorflow job in format below. 55 1. `affinity` annotation indicates that tasks have connections between each other, so they should be set on same nodes; 56 2. `anti-affinity` annotation indicates that tasks do not have connections between each other, so they should be set on different nodes; 57 3. `task-order` annotation indicates the order that tasks should be allocated. For example, `ps,worker` means scheduler should schedule `ps` tasks first. After all `ps` tasks were allocated, scheduler started to schedule `worker` tasks. **This annotation is not a required field.** 58 59 ```yaml 60 volcano.sh/task-topology-affinity: "ps,worker;ps,evaluator" 61 volcano.sh/task-topology-anti-affinity: "ps;worker,chief;chief,evaluator" 62 volcano.sh/task-topology-task-order: "ps,worker,chief,evaluator" 63 ```