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

Commit

Permalink
[Device Plugin] Update device plugin yaml download script (#4563) (#4565
Browse files Browse the repository at this point in the history
)

Update device plugin yaml download script, use svn client instead.
  • Loading branch information
abuccts authored May 26, 2020
1 parent 4f4efac commit ffaf4e0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
8 changes: 5 additions & 3 deletions contrib/kubespray/script/service-boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sudo docker exec -it dev-box-quick-start kubectl get node || { cleanup; exit 1;
sudo docker exec -i dev-box-quick-start /bin/bash << EOF_DEV_BOX
apt-get -y update
apt-get -y install python3 python-dev software-properties-common
apt-get -y install subversion python3 python-dev software-properties-common
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip3 install kubernetes==11.0.0b2 jinja2
Expand All @@ -57,11 +57,13 @@ git checkout ${OPENPAI_BRANCH_NAME}
git pull
echo "starting nvidia device plugin to detect nvidia gpu resource"
kubectl apply --overwrite=true -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/1.0.0-beta4/nvidia-device-plugin.yml || exit $?
svn cat https://github.com/NVIDIA/k8s-device-plugin.git/tags/1.0.0-beta4/nvidia-device-plugin.yml \
| kubectl apply --overwrite=true -f - || exit $?
sleep 5
echo "starting AMD device plugin to detect AMD gpu resource"
kubectl apply --overwrite=true -f https://raw.githubusercontent.com/RadeonOpenCompute/k8s-device-plugin/master/k8s-ds-amdgpu-dp.yaml || exit $?
svn cat https://github.com/RadeonOpenCompute/k8s-device-plugin.git/trunk/k8s-ds-amdgpu-dp.yaml \
| kubectl apply --overwrite=true -f - || exit $?
sleep 5
python3 /root/pai/contrib/kubespray/script/openpai-generator.py -m /quick-start-config/master.csv -w /quick-start-config/worker.csv -c /quick-start-config/config.yml -o /cluster-configuration || exit $?
Expand Down
1 change: 1 addition & 0 deletions src/dev-box/build/dev-box.common.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN apt-get -y update && \
openssh-server \
openssh-client \
git \
subversion \
bash-completion \
inotify-tools \
rsync \
Expand Down
12 changes: 8 additions & 4 deletions src/device-plugin/deploy/start.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,26 @@ kubectl apply --overwrite=true -f device-plugin.yaml || exit $?
# NVIDIA GPU device plugin
{% if 'nvidia.com/gpu' in cluster_cfg['device-plugin']['devices'] %}

kubectl apply --overwrite=true -f https://raw.githubusercontent.com/NVIDIA/k8s-device-plugin/1.0.0-beta4/nvidia-device-plugin.yml || exit $?
svn cat https://github.com/NVIDIA/k8s-device-plugin.git/tags/1.0.0-beta4/nvidia-device-plugin.yml \
| kubectl apply --overwrite=true -f - || exit $?

{% endif %}

# AMD GPU device plugin
{% if 'amd.com/gpu' in cluster_cfg['device-plugin']['devices'] %}

kubectl apply --overwrite=true -f https://raw.githubusercontent.com/RadeonOpenCompute/k8s-device-plugin/master/k8s-ds-amdgpu-dp.yaml || exit $?
svn cat https://github.com/RadeonOpenCompute/k8s-device-plugin.git/trunk/k8s-ds-amdgpu-dp.yaml \
| kubectl apply --overwrite=true -f - || exit $?

{% endif %}

# Mellanox InfiniBand device plugin
{% if 'rdma/hca' in cluster_cfg['device-plugin']['devices'] %}

kubectl apply --overwrite=true -f https://raw.githubusercontent.com/Mellanox/k8s-rdma-sriov-dev-plugin/master/example/hca/rdma-hca-node-config.yaml || exit $?
kubectl apply --overwrite=true -f https://raw.githubusercontent.com/Mellanox/k8s-rdma-sriov-dev-plugin/master/example/device-plugin.yaml || exit $?
svn cat https://github.com/Mellanox/k8s-rdma-sriov-dev-plugin.git/trunk/example/hca/rdma-hca-node-config.yaml \
| kubectl apply --overwrite=true -f - || exit $?
svn cat https://github.com/Mellanox/k8s-rdma-sriov-dev-plugin.git/trunk/example/device-plugin.yaml \
| kubectl apply --overwrite=true -f - || exit $?

{% endif %}

Expand Down

0 comments on commit ffaf4e0

Please sign in to comment.