Starting the Volcano
This section describes how to install the Volcano components (vc-scheduler and vc-controller-manager) used for cluster scheduling. If you need to use other Volcano components, install them by yourself and ensure their security.
Procedure
- Log in to the Kubernetes master node as the root user and run the following command to check whether the Volcano image and version are correct:
docker images | grep volcanosh
Example:root@ubuntu:# docker images | grep volcanosh volcanosh/vc-controller-manager v1.4.0 84c73128cc55 3 days ago 44.5MB volcanosh/vc-scheduler v1.4.0 e90c114c75b1 3 days ago 188MB
- If yes, go to 2.
- If no, create an image. For details, see Creating an Image.
- Copy the YAML file in the directory (for example, /home/ascend-volcano) where the Volcano software package is decompressed to any directory (for example, /home/ascend-volcano) on the Kubernetes master node. If the Volcano software package is decompressed on the Kubernetes master node, you do not need to copy the YAML file.
cd /home/ascend-volcano scp root@{IP_address_of_the_node_where_the_software_package_is_decompressed}:/home/ascend-volcano/volcano-*.yaml ./ - Skip this step if you do not need to modify the component startup parameters. Otherwise, modify the Volcano startup parameters in the corresponding startup YAML file based on your requirements. For details about the common startup parameters, see Table 1 and Table 2.
- Configure Volcano log dump.During the installation, Volcano logs are mounted to the drive space (/var/log/mindx-dl). To prevent the drive space from being used up, configure log dump for the Volcano. For details, see Table 3.
- In the /etc/logrotate.d directory on the master node, run the following command to create a log dump configuration file:
vim /etc/logrotate.d/file_name
Example:
vim /etc/logrotate.d/volcano
Add the following content to the file and run the :wq command to save the file:/var/log/mindx-dl/volcano-*/*.log{ daily rotate 8 size 50M compress dateext missingok notifempty copytruncate create 0640 hwMindX hwMindX sharedscripts postrotate chmod 640 /var/log/mindx-dl/volcano-*/*.log chmod 440 /var/log/mindx-dl/volcano-*/*.log-* endscript } - Run the following commands to set the configuration file permission to 640 and owner to root:
chmod 640 /etc/logrotate.d/file_name chown root /etc/logrotate.d/file_name
Example:
chmod 640 /etc/logrotate.d/volcano chown root /etc/logrotate.d/volcano
- In the /etc/logrotate.d directory on the master node, run the following command to create a log dump configuration file:
- Run the following command to start the Volcano:
kubectl apply -f volcano-*.yaml
Example:
root@ubuntu:/home/ascend-volcano# kubectl apply -f volcano-*.yaml namespace/volcano-system created namespace/volcano-monitoring 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 service/volcano-scheduler-service 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.volcano.sh created customresourcedefinition.apiextensions.K8s.io/queues.scheduling.volcano.sh created customresourcedefinition.apiextensions.K8s.io/numatopologies.nodeinfo.volcano.sh created root@ubuntu:/home/ascend-volcano# kubectl get pod -n volcano-system NAME READY STATUS RESTARTS AGE volcano-controllers-5cf8d788d5-qdpzq 1/1 Running 0 1m volcano-scheduler-6cffd555c9-45k7c 1/1 Running 0 1m
Parameters
Parameter |
Type |
Default Value |
Description |
|---|---|---|---|
--log-dir |
string |
/var/log/mindx-dl/volcano-scheduler |
Log directory. |
--log-file |
string |
/var/log/mindx-dl/volcano-scheduler/volcano-scheduler.log |
Log file name. |
--logtostderr |
bool |
false |
Whether to print logs in the standard output. |
-v |
int |
2 |
Log output level.
|
--plugins-dir |
string |
plugins |
Path for loading the scheduler plugin. |
--version |
bool |
false |
Volcano scheduler binary version number. |
Parameter |
Type |
Default Value |
Description |
|---|---|---|---|
--log-dir |
string |
/var/log/mindx-dl/volcano-controller |
Log directory. |
--log-file |
string |
/var/log/mindx-dl/volcano-controller/volcano-controller.log |
Log file name. |
--logtostderr |
bool |
false |
Whether to print logs in the standard output. |
-v |
int |
4 |
Log output level.
|
--version |
bool |
false |
Volcano controller binary version number. |
The Volcano is open-source software. Only the startup parameters in use are listed. For details about other startup parameters, see the open-source software description.
Configuration Item |
Description |
Possible Value |
|---|---|---|
daily |
Log dump frequency |
|
rotate x |
Number of times that log files are dumped before they are deleted |
x indicates the number of backups. Examples:
|
size xx |
A log file is dumped only when its size reaches the value of this parameter. |
The size unit can be specified as follows:
For example, size 50M indicates that a log file is dumped when its size reaches 50 MB. NOTE:
logrotate periodically checks the sizes of log files based on the configured dump frequency. Dump is triggered only when the size of a log file exceeds the value of Size. This means that logrotate does not dump a log file as soon as it reaches its size limit. |
compress |
Whether to compress dumped logs using gzip |
|
notifempty |
Whether to dump empty files |
|