Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
  • Loading branch information
satoru-takeuchi committed Feb 7, 2024
1 parent fb84afc commit b7c5b38
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 92 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deploy/*
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ A helper script to run the integration test of Rook and launch arbitrary Rook cl

# supported software versions

- rook: v1.10.7 or later
- kubeadm: v1.25.3 or later
- rook: v1.13.2 or later
- minikube: v1.6.24 or later

# Usage

Expand All @@ -14,17 +14,18 @@ This programs is only tests in Ubuntu 22.04 environment.
The following tools should be installed.

- kubectl
- kubeadm
- minikube
- containerd

There should be scratch devices for OSDs. By default("cluster-test.yaml"), Rook consumes all scratch devices for OSDs.

## installation
## Usage

Copy scripts to the test environment.
Copy manifests from Rook source

```console
cp *.sh ${GOPATH}/src/github.com/rook/rook
cd $_
cd rook-helper
cp -a <rook dir>/deploy/examples
```

## Usage
Expand Down
3 changes: 1 addition & 2 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export OPERATOR_DIR=deploy/examples
export CLUSTER_CR=$OPERATOR_DIR/cluster-test.yaml
export KUBECONFIG=~/admin.conf
export CLUSTER_CR=samples/cluster-on-host.yaml
2 changes: 1 addition & 1 deletion k8s-cluster-fini.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

. config.sh

sudo kubeadm reset
minikube delete
8 changes: 1 addition & 7 deletions k8s-cluster-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@

. config.sh

CONFFILE=/etc/kubernetes/admin.conf

sudo kubeadm init --pod-network-cidr 10.244.0.0/16
sudo cp $CONFFILE ~/
sudo chown $(id -u):$(id -g) ~/admin.conf
sudo kubectl --kubeconfig $CONFFILE taint nodes --all node-role.kubernetes.io/control-plane-
sudo kubectl --kubeconfig $CONFFILE apply -f https://raw.githubusercontent.com/flannel-io/flannel/v0.22.2/Documentation/kube-flannel.yml
minikube start --driver=none --container-runtime=containerd
19 changes: 9 additions & 10 deletions samples/cluster-on-host.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
dataDirHostPath: /var/lib/rook
cephVersion:
image: quay.io/ceph/ceph:v17.2.6
image: quay.io/ceph/ceph:v18.2.1
allowUnsupported: true
mon:
count: 1
Expand All @@ -17,19 +17,18 @@ spec:
dashboard:
enabled: false
crashCollector:
disable: true
disable: false
storage:
useAllNodes: true
useAllNodes: false
useAllDevices: false
devices:
- name: /dev/sdb
nodes:
- name: coffee
devices:
- name: /dev/sdb
monitoring:
enabled: false
healthCheck:
daemonHealth:
mon:
interval: 45s
timeout: 600s
priorityClassNames:
all: system-node-critical
mgr: system-cluster-critical
disruptionManagement:
managePodBudgets: true
112 changes: 78 additions & 34 deletions samples/cluster-on-pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,55 +1,99 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: manual
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
---
kind: PersistentVolume
apiVersion: v1
metadata:
name: local-osd
labels:
type: local-osd
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
volumeMode: Block
local:
path: /dev/sdb
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- coffee # Please change this to your node
---
apiVersion: ceph.rook.io/v1
kind: CephCluster
metadata:
name: rook-ceph
namespace: rook-ceph
namespace: rook-ceph # namespace:cluster
spec:
dataDirHostPath: /var/lib/rook
mon:
count: 1
allowMultiplePerNode: false
cephVersion:
image: ceph/ceph:v17.2.6
image: quay.io/ceph/ceph:v18.2.1
allowUnsupported: false
skipUpgradeChecks: false
continueUpgradeAfterChecksEvenIfNotHealthy: false
mgr:
count: 1
dashboard:
enabled: false
network:
hostNetwork: false
crashCollector:
disable: true
storage:
storageClassDeviceSets:
- name: set1
count: 1
portable: false
tuneSlowDeviceClass: true
placement:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
- name: set1
count: 1
portable: false
encrypted: false
placement:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- rook-ceph-osd
- key: app
operator: In
values:
- rook-ceph-osd-prepare
topologyKey: kubernetes.io/hostname
resources:
volumeClaimTemplates:
- metadata:
name: data
spec:
resources:
requests:
storage: 5Gi
storageClassName: manual
volumeMode: Block
accessModes:
- ReadWriteOnce
- key: app
operator: In
values:
- rook-ceph-osd
- rook-ceph-osd-prepare
preparePlacement:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- rook-ceph-osd
- key: app
operator: In
values:
- rook-ceph-osd-prepare
topologyKey: kubernetes.io/hostname
volumeClaimTemplates:
- metadata:
name: data
spec:
resources:
requests:
storage: 5Gi
storageClassName: manual
volumeMode: Block
accessModes:
- ReadWriteOnce
onlyApplyOSDPlacement: false
31 changes: 0 additions & 31 deletions samples/local.yaml

This file was deleted.

0 comments on commit b7c5b38

Please sign in to comment.