Skip to content

Commit

Permalink
Enable CSI Driver Remote Install (#52)
Browse files Browse the repository at this point in the history
* enable remote install

* update master to main
  • Loading branch information
vinli-cn authored Aug 2, 2022
1 parent 0fbfe62 commit b2bc1d0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 20 deletions.
20 changes: 18 additions & 2 deletions deploy/install-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,25 @@

set -euo pipefail

repo="$(git rev-parse --show-toplevel)/deploy"
ver="main"
if [[ "$#" -gt 0 ]]; then
ver="$1"
fi

echo "Installing Azure Lustre CSI driver, repo: $repo ..."
repo="https://raw.githubusercontent.com/kubernetes-sigs/azurelustre-csi-driver/$ver/deploy"

if [[ "$#" -gt 1 ]]; then
if [[ "$2" == *"local"* ]]; then
echo "use local deploy"
repo="./deploy"
fi
fi

if [ $ver != "main" ]; then
repo="$repo/$ver"
fi

echo "Installing Azure Lustre CSI driver, version: $ver, repo: $repo ..."
kubectl apply -f $repo/rbac-csi-azurelustre-controller.yaml
kubectl apply -f $repo/rbac-csi-azurelustre-node.yaml
kubectl apply -f $repo/csi-azurelustre-driver.yaml
Expand Down
42 changes: 24 additions & 18 deletions docs/install-csi-driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,33 @@ This document explains how to install Azure Lustre CSI driver on a kubernetes cl

## Install with kubectl

* install
- Option 1: Remote install

```shell
git clone https://github.com/kubernetes-sigs/azurelustre-csi-driver.git
cd azurelustre-csi-driver
./deploy/install-driver.sh
```
```shell
curl -skSL https://raw.githubusercontent.com/kubernetes-sigs/azurelustre-csi-driver/main/deploy/install-driver.sh | bash -s main --
```

* check pods status:
- Option 2: Local install

```shell
$ kubectl get -n kube-system pod -l app=csi-azurelustre-controller
```shell
git clone https://github.com/kubernetes-sigs/azurelustre-csi-driver.git
cd azurelustre-csi-driver
./deploy/install-driver.sh
```

NAME READY STATUS RESTARTS AGE
csi-azurelustre-controller-778bf84cc5-4vrth 3/3 Running 0 30s
csi-azurelustre-controller-778bf84cc5-5zqhl 3/3 Running 0 30s
- check pods status:

$ kubectl get -n kube-system pod -l app=csi-azurelustre-node
```shell
$ kubectl get -n kube-system pod -l app=csi-azurelustre-controller
NAME READY STATUS RESTARTS AGE
csi-azurelustre-node-7lw2n 3/3 Running 0 30s
csi-azurelustre-node-drlq2 3/3 Running 0 30s
csi-azurelustre-node-g6sfx 3/3 Running 0 30s
```
NAME READY STATUS RESTARTS AGE
csi-azurelustre-controller-778bf84cc5-4vrth 3/3 Running 0 30s
csi-azurelustre-controller-778bf84cc5-5zqhl 3/3 Running 0 30s
$ kubectl get -n kube-system pod -l app=csi-azurelustre-node
NAME READY STATUS RESTARTS AGE
csi-azurelustre-node-7lw2n 3/3 Running 0 30s
csi-azurelustre-node-drlq2 3/3 Running 0 30s
csi-azurelustre-node-g6sfx 3/3 Running 0 30s
```

0 comments on commit b2bc1d0

Please sign in to comment.