サービスマネージメントグループの秋元です。
今回は2019年12月の初旬にリリースされましたCSI Driver for Dell EMC Isilonを試してみましたのでご紹介したいと思います。
CSI Driver for Dell EMC Isilonとは
Dell EMC IsilonのCSIドライバーは、Dell EMC Isilonを使用した永続ストレージのプロビジョニングをサポートするContainer Storage Interface(CSI)ドライバーです。
CSI Driver for Dell EMC Isilon
FAQ / CSI Driver for Isilon
以降のCSI Driver for Dell EMC Isilonのインストールについての内容は上記レポジトリにある
CSI Driver for Dell EMC Isilon Product Guide and Release Notes v1.0.pdf
を参照しています。(※以降Product Guide)
インストールの必要要件
Product GuideではCSI Driverインストールに必要な要件として下記が挙げられています。
- Supports CSI 1.1
- Supports Kubernetes version 1.14.x
- Supports Red Hat Enterprise Linux 7.6 host operating system
- Supports Isilon OneFS 8.1 and 8.2
また、推奨として下記が挙げられています。
- The recommended docker version is 18.06.
- The recommended Helm and Tiller package version is 2.14.0.
今回検証を行った環境では仮想マシン3台を用意し、CSI Driver for Dell EMC Isilonをインストールする為の下準備として、それぞれ下記のバージョンでセットアップを行いました。本記事ではKubernetes等のセットアップについては触れませんので、検証環境構築の際には下記のバージョンを参考にしてください。
OS
[root@node1 ~]# cat /etc/centos-release CentOS Linux release 7.6.1810 (Core) [root@node1 ~]#
今回は検証目的の為CentOSを使用しています。本番環境での運用の際にはCSI Driver for Dell EMC IsilonのサポートOSであるRed Hat Enterprise Linuxをご利用ください。
Docker
[root@node1 ~]# docker version Client: Version: 18.09.9 API version: 1.39 Go version: go1.11.13 Git commit: 039a7df9ba Built: Wed Sep 4 16:51:21 2019 OS/Arch: linux/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 18.09.9 API version: 1.39 (minimum version 1.12) Go version: go1.11.13 Git commit: 039a7df Built: Wed Sep 4 16:22:32 2019 OS/Arch: linux/amd64 Experimental: false [root@node1 ~]#
Kubernetes
[root@node1 ~]# yum list installed | grep kube cri-tools.x86_64 1.13.0-0 @kubernetes kubeadm.x86_64 1.14.10-0 @kubernetes kubectl.x86_64 1.14.10-0 @kubernetes kubelet.x86_64 1.14.10-0 @kubernetes kubernetes-cni.x86_64 0.7.5-0 @kubernetes [root@node1 ~]# [root@node1 ~]# kubectl version Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.10", GitCommit:"575467a0eaf3ca1f20eb86215b3bde40a5ae617a", GitTreeState:"clean", BuildDate:"2019-12-11T12:41:00Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.10", GitCommit:"575467a0eaf3ca1f20eb86215b3bde40a5ae617a", GitTreeState:"clean", BuildDate:"2019-12-11T12:32:32Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"} [root@node1 ~]#
Isilon OneFS
H400-1# uname -r v8.1.2.0 H400-1#
インストールの前提条件
Product Guideでは前提条件として下記の記述があります。
- Install Kubernetes
- Enable Kubernetes feature gates
- Configure Docker service
- Install the Helm and Tiller package manager
Install Kubernetes
Kubernetesについてはインストールが終わっているものとします。検証環境では下記のようになっています。
[root@node1 ~]# kubectl get node NAME STATUS ROLES AGE VERSION node1 Ready master 4d3h v1.14.10 node2 Ready 4d3h v1.14.10 node3 Ready 4d3h v1.14.10 [root@node1 ~]# kubectl describe node | grep -A1 Internal InternalIP: 172.16.26.24 Hostname: node1 -- InternalIP: 172.16.26.25 Hostname: node2 -- InternalIP: 172.16.26.26 Hostname: node3 [root@node1 ~]#
Kubernetes以外の項目についてはProduct Guideにそれぞれ手順が記載されているのでこれを進めていきます。
Enable Kubernetes feature gates
Kuberntesのfeature gateの下記の機能を有効にしていきます。
- VolumeSnapshotDataSource
- KubeletPluginsWatcher
- CSINodeInfo
- CSIDriverRegistry
1. 各Kubernetes nodeの/var/lib/kubelet/config.yamlに設定を追加します。
[root@node1 ~]# cat << EOF > feature-gate.txt VolumeSnapshotDataSource: true KubeletPluginsWatcher: true CSINodeInfo: true CSIDriverRegistry: true EOF [root@node1 ~]# [root@node1 ~]# for i in 172.16.26.{25,26};do scp feature-gate.txt $i:/root/;done [root@node1 ~]# for i in 172.16.26.{24..26};do ssh $i 'cat /root/feature-gate.txt >> /var/lib/kubelet/config.yaml';done
2. master nodeの/etc/kubernetes/manifests/kube-apiserver.yamlに設定を追加します。
[root@node1 ~]# vim /etc/kubernetes/manifests/kube-apiserver.yaml
spec:
containers:
- command:
- kube-apiserver
- --advertise-address=172.16.26.24
..snip..
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
- --feature-gates=VolumeSnapshotDataSource=true,KubeletPluginsWatcher=true,CSINodeInfo=true,CSIDriverRegistry=true
spec:containers:commandの最後にfeature-gatesの設定を追加しています。
3. master nodeの/etc/kubernetes/manifests/kube-controller-manager.yamlに設定を追加します。
[root@node1 ~]# vim /etc/kubernetes/manifests/kube-controller-manager.yaml
spec:
containers:
- command:
- kube-controller-manager
- --allocate-node-cidrs=true
..snip..
- --use-service-account-credentials=true
- --feature-gates=VolumeSnapshotDataSource=true,KubeletPluginsWatcher=true,CSINodeInfo=true,CSIDriverRegistry=true
spec:containers:commandの最後にfeature-gatesの設定を追加しています。
4. master nodeの/etc/kubernetes/manifests/kube-scheduler.yamlに設定を追加します。
[root@node1 ~]# vim /etc/kubernetes/manifests/kube-scheduler.yaml
spec:
containers:
- command:
- kube-scheduler
- --authentication-kubeconfig=/etc/kubernetes/scheduler.conf
..snip..
- --leader-elect=true
- --feature-gates=VolumeSnapshotDataSource=true,KubeletPluginsWatcher=true,CSINodeInfo=true,CSIDriverRegistry=true
spec:containers:commandの最後にfeature-gatesの設定を追加しています。
5. 各nodeの/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.confのKUBELET_KUBECONFIG_ARGSに設定を追加します。
[root@node1 ~]# vim /usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
[Service] Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
↓
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf --allow-privileged=true --feature-gates=VolumeSnapshotDataSource=true,KubeletPluginsWatcher=true,CSINodeInfo=true,CSIDriverRegistry=true"
6. 各nodeでsystemctlの設定を再読み込みして、kubeletを再起動します。
[root@node1 ~]# for i in 172.16.26.{24..26};do ssh $i 'systemctl daemon-reload && systemctl restart kubelet';done
Configure Docker service
1. 各nodeの/etc/systemd/system/multi-user.target.wants/docker.serviceに設定を追加します。
[root@node1 ~]# for i in 172.16.26.{24..26};do ssh $i \ "sed -i '/\[Service\]/ aMountFlags=shared' /etc/systemd/system/multi-user.target.wants/docker.service";done
2. 各nodeでsystemctlの設定を再読み込みして、dockerを再起動します。
[root@node1 ~]# for i in 172.16.26.{24..26};do ssh $i 'systemctl daemon-reload && systemctl restart docker';done
Install the Helm and Tiller package manager
1. master nodeにHelmをインストールします。
[root@node1 ~]# curl https://raw.githubusercontent.com/helm/helm/master/scripts/get > get_helm.sh [root@node1 ~]# chmod 700 get_helm.sh [root@node1 ~]# ./get_helm.sh [root@node1 ~]# helm init
[root@node1 ~]# helm version Client: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.16.1", GitCommit:"bbdfe5e7803a12bbdf97e94cd847859890cf4050", GitTreeState:"clean"} [root@node1 ~]#
推奨のバージョンは2.14.0となっていますが、最新の2.16.1でも動作を確認できたので特にバージョンは下げずこのまま進めます。
2. TillerのServiceAccountを設定します。
[root@node1 ~]# cat << EOF > rbac-config.yaml apiVersion: v1 kind: ServiceAccount metadata: name: tiller namespace: kube-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: tiller roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: tiller namespace: kube-system EOF [root@node1 ~]# [root@node1 ~]# kubectl create -f rbac-config.yaml
3. TillerのServiceAccountを更新します。
[root@node1 ~]# helm init --upgrade --service-account tiller
ここまででCSI driver for Dell EMC Isilonをインストールする為の下準備は終了です。
Install the CSI driver for Dell EMC Isilon
続いてCSI driver for Dell EMC Isilonのインストールを行います。
1. master nodeでgit cloneします。
[root@node1 ~]# git clone https://github.com/dell/csi-isilon.git
2. CSI driverインストール用のmyvalues.yamlを作成します。
[root@node1 ~]# cd csi-isilon/helm && cp csi-isilon/values.yaml ./myvalues.yaml
3. myvalues.yaml内のOneFSのエンドポイント(isiIP)を設定します。
myvalues.yamlのisiIPの初期値は下記となっている為、これを環境に合わせ設定します。
# "isiIP" defines the HTTPs endpoint of the Isilon OneFS API server isiIP: 1.1.1.1
[root@node1 helm]# sed -ri 's/isiIP: .+$/isiIP: 172.16.27.157/' myvalues.yaml
4. myvalues.yamlのisiPathを確認し、Isilon側にディレクトリを作成してください。
# The default base path for the volumes to be created, this will be used if a storage class does not have the IsiPath parameter specified # Ensure that this path exists on Isilon. isiPath: "/ifs/data/csi"
Isilon側にisiPathで指定されているディレクトリを作成します。
H400-1# mkdir /ifs/data/csi H400-1# ls -l /ifs/data/ | grep csi drwxr-xr-x 2 root wheel 0 Jan 10 10:17 csi H400-1#
myvalues.yamlにはその他設定項目がありますが詳細はProduct Guideを参照してください。
5. Isilonにアクセスする際に使用するSecretファイルを作成します。
secret.yamlの初期状態は下記のようになっています。
[root@node1 helm]# cat secret.yaml apiVersion: v1 kind: Secret metadata: name: isilon-creds namespace: isilon type: Opaque data: # set username to the base64 encoded username username: YWRtaW4= # set password to the base64 encoded password password: UGFzc3dvcmQxMjMh [root@node1 helm]#
Isilonのusernameとpasswordをbase64でエンコードしたものでsecret.yaml内の設定を書き換えてください。
[root@node1 helm]# echo -n "myusername" | base64 [root@node1 helm]# echo -n "mypassword" | base64
6. Kubernetesにisilonのnamespaceを作成します。
[root@node1 helm]# kubectl create namespace isilon namespace/isilon created [root@node1 helm]#
7. Secretを作成します。
[root@node1 helm]# kubectl create -f secret.yaml secret/isilon-creds created [root@node1 helm]#
8. CSI driverをインストールします。
[root@node1 helm]# sh install.isilon
正常にインストールが完了すると下記のような出力となります。
[root@node1 helm]# sh install.isilon Kubernetes version v1.14.10 Kubernetes master nodes: 172.16.26.24 Kubernetes minion nodes: 172.16.26.25 172.16.26.26 Verifying the feature gates. Verification Succeded. *** Couldn't find isilon-certs. Creating an empty secret. Delete it and re-create it if you want to validate OneFS API server's certificates *** secret/isilon-certs created NAME: isilon LAST DEPLOYED: Fri Jan 10 10:42:08 2020 NAMESPACE: isilon STATUS: DEPLOYED RESOURCES: ==> v1/ClusterRole NAME AGE isilon-controller 0s isilon-node 0s ==> v1/ClusterRoleBinding NAME AGE isilon-controller 0s isilon-node 0s ==> v1/Pod(related) NAME AGE isilon-controller-0 0s isilon-node-46s6m 0s isilon-node-lktmc 0s ==> v1/ServiceAccount NAME AGE isilon-controller 0s isilon-node 0s ==> v1/StorageClass NAME AGE isilon 0s ==> v1beta1/CSIDriver NAME AGE isilon 0s ==> v1beta1/StatefulSet NAME AGE isilon-controller 0s ==> v1beta2/DaemonSet NAME AGE isilon-node 0s NAME READY STATUS RESTARTS AGE isilon-controller-0 4/4 Running 0 10s isilon-node-46s6m 2/2 Running 0 10s isilon-node-lktmc 2/2 Running 0 10s NAME READY STATUS RESTARTS AGE isilon-controller-0 4/4 Running 0 15s isilon-node-46s6m 2/2 Running 0 15s isilon-node-lktmc 2/2 Running 0 15s NAME READY STATUS RESTARTS AGE isilon-controller-0 4/4 Running 0 20s isilon-node-46s6m 2/2 Running 0 20s isilon-node-lktmc 2/2 Running 0 20s CSIDrivers: NAME CREATED AT isilon 2020-01-10T01:42:08Z CSINodeInfos: No resources found. StorageClasses: NAME PROVISIONER AGE isilon (default) csi-isilon.dellemc.com 21s No resources found. installing volumesnapshotclass volumesnapshotclass.snapshot.storage.k8s.io/isilon-snapclass created VolumeSnapshotClasses: NAME AGE isilon-snapclass 0s [root@node1 helm]#
“*** Couldn’t find isilon-certs. Creating an empty secret. Delete it and re-create it if you want to validate OneFS API server’s certificates ***”
上記のメッセージは初回のインストール時には出力されますが、インストールスクリプト内でisilon-certsが無い場合にはisilon-certsを作成するようになっている為このまま進めて問題ありません。
Kubernetes側の状況を確認すると下記のようにCSI Driverがインストールされていることが確認できます。
CSI Driver
[root@node1 helm]# kubectl get csidriver NAME CREATED AT isilon 2020-01-10T01:42:08Z [root@node1 helm]# [root@node1 helm]# kubectl describe csidriver isilon Name: isilon Namespace: Labels: Annotations: API Version: storage.k8s.io/v1beta1 Kind: CSIDriver Metadata: Creation Timestamp: 2020-01-10T01:42:08Z Resource Version: 3099 Self Link: /apis/storage.k8s.io/v1beta1/csidrivers/isilon UID: 69d12eb3-334a-11ea-a609-0050569cf7a7 Spec: Attach Required: true Pod Info On Mount: false Events: [root@node1 helm]#
StorageClass
[root@node1 helm]# kubectl get storageclass NAME PROVISIONER AGE isilon (default) csi-isilon.dellemc.com 2m3s [root@node1 helm]# [root@node1 helm]# kubectl describe storageclass isilon Name: isilon IsDefaultClass: Yes Annotations: storageclass.beta.kubernetes.io/is-default-class=true Provisioner: csi-isilon.dellemc.com Parameters: AccessZone=System,AzServiceIP=172.16.27.157,IsiPath=/ifs/data/csi AllowVolumeExpansion: MountOptions: ReclaimPolicy: Delete VolumeBindingMode: Immediate Events: [root@node1 helm]#
PODs
[root@node1 helm]# kubectl get pods -n isilon NAME READY STATUS RESTARTS AGE isilon-controller-0 4/4 Running 0 3m21s isilon-node-46s6m 2/2 Running 0 3m21s isilon-node-lktmc 2/2 Running 0 3m21s [root@node1 helm]#
ここまででCSI Driver for Dell EMC Isilonのインストールは終了です。
CSI driver for Dell EMC Isilonにはテストツールも含まれています。
Test the CSI driver for Dell EMC Isilon
- Test the CSI driver for Dell EMC Isilon
- Test creating snapshots
- Test restoring from a snapshot
次回は上記のテストがどのような動作となるかIsilon側も挙動も含めご紹介したいと思います。
本ブログの情報につきましては、自社の検証に基づいた結果からの情報提供であり、
品質保証を目的としたものではございません。