Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Multiple Hardwares] [Installation] Check if resource matches layout.yaml #5181

Merged
merged 3 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions contrib/kubespray/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ docker_image_tag: v1.5.0

###########################################################################################
# Pre-check setting #
# By default, we assume your gpu environment is nvidia. So your runtime should be nvidia. #
# If you are using AMD or other environment, you should modify it. #
###########################################################################################
# worker_default_docker_runtime: nvidia
# docker_check: true

# resource_check: true

# gpu_type: nvidia

########################################################################################
# Advanced docker configuration. If you are not familiar with them, don't change them. #
########################################################################################
Expand Down
7 changes: 5 additions & 2 deletions contrib/kubespray/config/layout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
machine-sku:
master-machine: # define a machine sku
# the resource requirements for all the machines of this sku
mem: 60GB
# We use the same memory format as Kubernetes, e.g. Gi, Mi
# Reference: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory
mem: 60Gi
cpu:
# the number of CPU vcores
vcore: 24
gpu-machine:
computing-device:
type: nvidia.com/gpu
model: K80
count: 4
mem: 220GB
mem: 220Gi
cpu:
vcore: 24

Expand Down
26 changes: 26 additions & 0 deletions contrib/kubespray/environment-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,32 @@
roles:
- { role: requirement/worker }

# basic-resource role checks whether the host's basic resource meets the user input in layout.yaml
# For now, we only check CPU and memory in this role.
- hosts: all
become: true
become_user: root
gather_facts: true
roles:
- { role: requirement/basic-resource }

# In the following, we do different checks according to different kinds of computing device.
# To add a new kind of computing device, please add it as an ansible role in "requirement/computing-devices",
# and include the role here.
- hosts: "nvidia.com/gpu"
become: true
become_user: root
gather_facts: true
roles:
- { role: requirement/computing-devices/nvidia.com_gpu }

- hosts: "amd.com/gpu"
become: true
become_user: root
gather_facts: true
roles:
- { role: requirement/computing-devices/amd.com_gpu }

- hosts: all,localhost
tasks:
- name: "display unmet requirements"
Expand Down
84 changes: 0 additions & 84 deletions contrib/kubespray/example/config.yml

This file was deleted.

Loading