IOMesh安装教程

2021/06/29 10:14
阅读数 504

IOMesh快速安装指南

根据操作系统选择正确的脚本执行:

NOTE: Helm3 将会自动安装(如果没有找到的话).

RHEL7/CentOS7
RHEL8/CentOS8/CoreOS
# Every node running IOMesh must have an IP address belongs to IOMESH_DATA_CIDR
export IOMESH_DATA_CIDR=10.234.1.0/24; curl -sSL https://iomesh.run/install_iomesh_el7.sh | sh -

然后等待IOMesh Cluster pods 就绪:

watch kubectl get --namespace iomesh-system pods

IOMesh 已经成功安装!

NOTE: If any error occurs during the installation process, the IOMesh resources which installed by the script will be reserved for troubleshooting. You can use the uninstall script to clean up all IOMesh resources installed in the k8s cluster: curl -sSL https://iomesh.run/uninstall_iomesh.sh | sh -

自定义安装

高级安装指南,用于自定义安装:

Install CSI Snapshotter

CSI snapshotter 是 Kubernetes 实现的Container Storage Interface (CSI)的一部分。安装 CSI snapshotter 启用卷快照( Volume Snapshot)功能。

NOTE: CSI Snapshotter should be installed once per cluster

下载并提取CSI external-snapshotter:

curl -LO https://github.com/kubernetes-csi/external-snapshotter/archive/release-2.1.tar.gz
tar -xf release-2.1.tar.gz && cd external-snapshotter-release-2.1

安装 Snapshot CRDs:

kubectl create -f ./config/crd

编辑 deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml 添加一个 namespace, eg. kube-system:

sed -i "s/namespace: default/namespace: kube-system/g" deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml

安装 snapshot controller, eg. kube-system:

kubectl apply -n kube-system -f ./deploy/kubernetes/snapshot-controller
  • 等待 snapshot controller 就绪:
kubectl get sts snapshot-controller -n kube-system
NAME                  READY   AGE
snapshot-controller   1/1     32s

安装 Helm3

NOTE: 如果 Helm3 已经安装略过本步骤.

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

更多细节参考 Install Helm.

设置 Helm Repo

helm repo add iomesh http://iomesh.com/charts

安装 IOMesh Operator

下载 iomesh-operator.yaml 包含缺省配置参数:

helm show values iomesh/operator > iomesh-operator.yaml

定制 iomesh-operator.yaml:

安装 IOMesh Operator:

NOTE: replace my-iomesh-operator with your release name.

helm install my-iomesh-operator iomesh/operator \
            --namespace iomesh-system \
            --create-namespace \
            --wait

等待 IOMesh Operator就绪:

watch kubectl get --namespace iomesh-system pods

安装 IOMesh Cluster

下载 iomesh-values.yaml 包含缺省参数:

helm show values iomesh/iomesh > iomesh-values.yaml

定制 iomesh-values.yaml:

chunk:
  dataCIDR: "10.234.1.0/24" # change to data network CIDR

安装 IOMesh Cluster:

NOTE: replace my-iomesh with your release name.

helm install my-iomesh iomesh/iomesh \
    --create-namespace \
    --namespace iomesh-system \
    --values iomesh-values.yaml \
    --wait

等待IOMesh Cluster pods就绪:

watch kubectl get --namespace iomesh-system pods

安装 IOMesh CSI driver

下载 iomesh-csi-driver.yaml 包含缺省参数:

helm show values iomesh/csi-driver > iomesh-csi-driver.yaml

获取 IOMesh 访问服务地址:

kubectl -n iomesh-system get svc iomesh-access

得到 ip address 在 CLUSTER_IP 段中:

NAME            TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                        AGE
iomesh-access   ClusterIP   10.233.1.125   <none>        3260/TCP,10206/TCP,10201/TCP   12m

编辑 iomesh-csi-driver.yaml ,加入字段 metaAddr

例如:

driver:
  metaAddr: "10.233.1.125:10206"

定制 iomesh-csi-driver.yaml:

NOTE: For Kubernetes worker node OS is CentOS8 or CoreOS, set mountIscsiLock to true. Otherwise, set it to false.

driver:
  node:
    driver:
      mountIscsiLock: true

安装 IOMesh CSI driver:

NOTE: replace my-iomesh-csi-driver with your release name.

helm install my-iomesh-csi-driver iomesh/csi-driver \
    --create-namespace \
    --namespace iomesh-system \
    --values iomesh-csi-driver.yaml \
    --wait

等待 IOMesh Cluster pods就绪.

watch kubectl get --namespace iomesh-system pods
展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部