Skip to content

Commit

Permalink
Deploy MinIO/NFS on control node
Browse files Browse the repository at this point in the history
longhorn/longhorn#8425

Signed-off-by: Roger Yao <[email protected]>
  • Loading branch information
roger-ryao authored and yangchiu committed Dec 4, 2024
1 parent 8f51221 commit 39e61f5
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 8 deletions.
4 changes: 2 additions & 2 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ curl -sSfL https://raw.githubusercontent.com/longhorn/longhorn/master/scripts/en

1. Deploy all backupstore servers (including `NFS` server and `Minio` as s3 server) for test purposes.
```
kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/minio-backupstore.yaml \
-f https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/nfs-backupstore.yaml
kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/minio-backupstore.yaml \
-f https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/nfs-backupstore.yaml
```

1. Expose Longhorn API:
Expand Down
4 changes: 2 additions & 2 deletions manager/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Requirement:
Run the test:
1. Deploy all backupstore servers(including `NFS` server and `Minio` as s3 server) for test purposes.
```
kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/minio-backupstore.yaml \
-f https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/nfs-backupstore.yaml
kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/minio-backupstore.yaml \
-f https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/nfs-backupstore.yaml
```
2. Deploy the test script to the Kubernetes cluster.
```
Expand Down
21 changes: 21 additions & 0 deletions manager/integration/deploy/backupstores/minio-backupstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ spec:
labels:
app: longhorn-test-minio
spec:
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoExecute"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoExecute"
- key: "node-role.kubernetes.io/etcd"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/etcd"
operator: "Exists"
effect: "NoExecute"
volumes:
- name: minio-volume
emptyDir: {}
Expand Down
21 changes: 21 additions & 0 deletions manager/integration/deploy/backupstores/nfs-backupstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ spec:
labels:
app: longhorn-test-nfs
spec:
nodeSelector:
node-role.kubernetes.io/control-plane: "true"
tolerations:
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/master"
operator: "Exists"
effect: "NoExecute"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/control-plane"
operator: "Exists"
effect: "NoExecute"
- key: "node-role.kubernetes.io/etcd"
operator: "Exists"
effect: "NoSchedule"
- key: "node-role.kubernetes.io/etcd"
operator: "Exists"
effect: "NoExecute"
volumes:
- name: nfs-volume
emptyDir: {}
Expand Down
4 changes: 2 additions & 2 deletions pipelines/utilities/install_backupstores.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
install_backupstores(){
MINIO_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/minio-backupstore.yaml"
NFS_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/nfs-backupstore.yaml"
MINIO_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/minio-backupstore.yaml"
NFS_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/nfs-backupstore.yaml"
kubectl create -f ${MINIO_BACKUPSTORE_URL} \
-f ${NFS_BACKUPSTORE_URL}
}
4 changes: 2 additions & 2 deletions test_framework/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ create_longhorn_namespace(){


install_backupstores(){
MINIO_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/minio-backupstore.yaml"
NFS_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/nfs-backupstore.yaml"
MINIO_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/minio-backupstore.yaml"
NFS_BACKUPSTORE_URL="https://raw.githubusercontent.com/longhorn/longhorn-tests/master/manager/integration/deploy/backupstores/nfs-backupstore.yaml"
kubectl create -f ${MINIO_BACKUPSTORE_URL} \
-f ${NFS_BACKUPSTORE_URL}
}
Expand Down

0 comments on commit 39e61f5

Please sign in to comment.