安裝Astra Data Store
您可以使用Kubernetes原生命令或使用Astra Control Center中的UI來安裝Astra Data Store。
安裝選項
您的需求
-
存取 "NetApp 支援網站"。 "註冊" 如果您尚未擁有完整存取權限的NetApp支援網站帳戶、請下載試用版。
-
答 "NetApp授權檔案(NLF)" 適用於Astra資料儲存區。下載授權的指示將會在您完成後寄送給您 "註冊"。
-
具有作用中內容叢集管理權限的作用中Kbeconfig。
-
瞭解 "角色與權限" 由Astra Data Store使用。
安裝Astra Data Store
標準Kubernetes叢集的Astra Data Store安裝程序會引導您完成下列高層級步驟。此外、也會說明Red Hat OpenShift Container Platform(OCP)環境的其他安裝步驟。
|
若要搭配Google Anthos使用Astra Data Store、請完成這些安裝步驟、並將Astra Data Store叢集新增至您的Anthos環境。 |
|
若要在Rancher RKE環境中安裝Astra Data Store、請完成下列安裝步驟、並以Rancher命令取代KECBECtl命令。 |
下載Astra Data Store產品組合並擷取映像
-
登入 "NetApp 支援網站" 並下載Astra Data Store套裝組合(「Astra Data_Store_2022.05.01.tar」)。
如果您要尋找舊版套裝組合的說明、請參閱 "該版本的文件"。 -
(可選)使用以下命令驗證套件的簽名:
openssl dgst -sha256 -verify Astra_Data_Store_2022.05.01.pub -signature Astra_Data_Store_2022.05.01.sig 2022.12.01_ads.tar
-
建立目錄:
mkdir Astra_Data_Store_2022.05.01 cd Astra_Data_Store_2022.05.01
-
擷取影像:
tar -xvf <path to tar file>/Astra_Data_Store_2022.05.01.tar
影像將擷取至工作目錄中建立的「astrads/images/」目錄。
複製二進位檔並將映像推送至本機登錄
-
從您用來擷取映像的目錄、將Kkbecl-astra二進位檔複製到安裝k8s kkbecl二進位檔的標準路徑(以下範例中使用「usr/bin/」)。Kustbecl-astrads是自訂的Kvecll擴充功能、可安裝及管理Astra Data Store叢集。
使用「which kubecll」命令尋找安裝kubecl二進位檔的路徑。 cp -p ./astrads/bin/kubectl-astrads /usr/bin/.
-
將Astra Data Store映像目錄中的檔案新增至本機登錄。
請參閱以下自動載入影像的範例指令碼。 -
登入您的登錄:
docker login [your_registry_path]
-
將環境變數設為您要推送Astra Data Store映像的登錄路徑、例如「REpo.company.com`」。
export REGISTRY=repo.company.com/astrads
-
執行指令碼、將影像載入Docker、標記影像、然後[Subforte_image_local_register_pip]將影像推送到本機登錄:
for astraImageFile in $(ls astrads/images/*.tar) ; do astraImage=$(docker load --input ${astraImageFile} | sed 's~Loaded image: ~~') astraImageShort=`echo $astraImage | sed 's~.*/~~'` docker tag ${astraImage} ${REGISTRY}/${astraImageShort} docker push ${REGISTRY}/${astraImageShort} done sed -i 's~\[YOUR REGISTRY\]~'${REGISTRY}'~' ./astrads/manifests/*.yaml
-
OpenShift程序
下列程序僅適用於Red Hat OpenShift Container Platform(OCP)上的部署。在非OCP Kubernetes叢集上部署時、請跳過此程序。
-
建立命名空間以部署Astra Data Store
-
建立自訂的SCC
-
建立角色與角色繫結
建立名稱空間「astrads系統」、以便安裝所有Astra Data Store元件。
只有在Red Hat OpenShift Container Platform(OCP)上部署時才需要執行下列步驟。
-
建立命名空間:
kubectl create -f ads_namespace.yaml
範例:ads_names.yaml
apiVersion: v1 kind: Namespace metadata: labels: control-plane: operator name: astrads-system
OpenShift使用安全內容限制(SCC)來控制Pod可以執行的動作。根據預設、任何容器的執行都會被授予受限的SCC、而且只會授予該SCC所定義的功能。
受限的SCC不提供Astra Data Store叢集Pod所需的權限。使用此程序可提供Astra Data Store所需的權限(列於範例中)。
將自訂SCC指派給Astra Data Store命名空間的預設服務帳戶。
只有在Red Hat OpenShift Container Platform(OCP)上部署時、才需要執行下列步驟。
-
建立自訂SCC:
kubectl create -f ads_privileged_scc.yaml
範例:ads_特權_scc.yaml
allowHostDirVolumePlugin: true allowHostIPC: true allowHostNetwork: true allowHostPID: true allowHostPorts: true allowPrivilegeEscalation: true allowPrivilegedContainer: true allowedCapabilities: - '*' allowedUnsafeSysctls: - '*' apiVersion: security.openshift.io/v1 defaultAddCapabilities: null fsGroup: type: RunAsAny groups: [] kind: SecurityContextConstraints metadata: annotations: kubernetes.io/description: 'ADS privileged. Grant with caution.' release.openshift.io/create-only: "true" name: ads-privileged priority: null readOnlyRootFilesystem: false requiredDropCapabilities: null runAsUser: type: RunAsAny seLinuxContext: type: RunAsAny seccompProfiles: - '*' supplementalGroups: type: RunAsAny users: - system:serviceaccount:astrads-system:default volumes: - '*'
-
使用「occ Get SCC」命令顯示新增的SCC:
# oc get scc/ads-privileged NAME PRIV CAPS SELINUX RUNASUSER FSGROUP SUPGROUP PRIORITY READONLYROOTFS VOLUMES ads-privileged true ["*"] RunAsAny RunAsAny RunAsAny RunAsAny <no value> false ["*"] #
建立Astra Data Store預設服務帳戶所需的角色和角色繫結。
下列yaml定義會指派「astrads.netapp.io` API」群組中Astra Data Store資源所需的各種角色(透過角色繫結)。
只有在Red Hat OpenShift Container Platform(OCP)上部署時、才需要執行下列步驟。
-
建立定義的角色和角色繫結:
kubectl create -f oc_role_bindings.yaml
範例:oc_roue_binings。yaml
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: privcrole rules: - apiGroups: - security.openshift.io resourceNames: - ads-privileged resources: - securitycontextconstraints verbs: - use --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: default-scc-rolebinding namespace: astrads-system roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: privcrole subjects: - kind: ServiceAccount name: default namespace: astrads-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: ownerref namespace: astrads-system rules: - apiGroups: - astrads.netapp.io resources: - '*/finalizers' verbs: - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: or-rb namespace: astrads-system roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: ownerref subjects: - kind: ServiceAccount name: default namespace: astrads-system
設定私有映像登錄
對於某些環境而言、您可以將組態變更為從使用機密的私有登錄中擷取映像、做為選用步驟。
-
除非您已在上一步中建立「astrads系統」命名空間:
kubectl create namespace astrads-system
-
建立秘密:
kubectl create secret docker-registry <secret-name> -n astrads-system --docker-server=<registry name> --docker-username= <registry username> --docker-password=<registry user password>
-
將機密組態資訊新增至服務帳戶:
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "<secret-name>"}]}' -n astrads-system
這些變更將會在您執行時套用 安裝Astra Data Store營運者。
安裝Astra Data Store營運者
-
列出Astra資料儲存區清單:
ls astrads/manifests/*yaml
回應:
astrads/manifests/monitoring_operator.yaml astrads/manifests/astradscluster.yaml astrads/manifests/astradsversion.yaml astrads/manifests/astradsoperator.yaml astrads/manifests/vasa_asup_certs.yaml astrads/manifests/manifest.yaml astrads/manifests/configuration.yaml
-
使用「kubecll apply」部署營運者:
kubectl apply -f ./astrads/manifests/astradsoperator.yaml
回應:
命名空間回應可能會因執行標準安裝或而有所不同 "OpenShift Container Platform安裝"。 namespace/astrads-system created customresourcedefinition.apiextensions.k8s.io/astradsadddrives.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsautosupports.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradscloudsnapshots.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsclusters.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsexportpolicies.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsfaileddrives.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradskeyproviders.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradslicenses.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsnfsoptions.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsnodeinfoes.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsnodemanagements.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsqospolicies.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradssearkeyrotaterequests.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsversions.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsvolumefiles.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsvolumes.astrads.netapp.io created customresourcedefinition.apiextensions.k8s.io/astradsvolumesnapshots.astrads.netapp.io created role.rbac.authorization.k8s.io/astrads-astrads-system-admin-role created role.rbac.authorization.k8s.io/astrads-astrads-system-reader-role created role.rbac.authorization.k8s.io/astrads-astrads-system-writer-role created role.rbac.authorization.k8s.io/astrads-leader-election-role created role.rbac.authorization.k8s.io/astrads-manager-role created clusterrole.rbac.authorization.k8s.io/astrads-astrads-admin-clusterrole created clusterrole.rbac.authorization.k8s.io/astrads-astrads-reader-clusterrole created clusterrole.rbac.authorization.k8s.io/astrads-astrads-writer-clusterrole created clusterrole.rbac.authorization.k8s.io/astrads-astradsautosupport-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsautosupport-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradscloudsnapshot-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradscloudsnapshot-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradscluster-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradscluster-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsexportpolicy-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsexportpolicy-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsfaileddrive-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsfaileddrive-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradslicense-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradslicense-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsnfsoption-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsnfsoption-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsnodeinfo-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsnodeinfo-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsnodemanagement-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsnodemanagement-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsqospolicy-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsversion-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsversion-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsvolume-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsvolume-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsvolumefile-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsvolumefile-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsvolumesnapshot-editor-role created clusterrole.rbac.authorization.k8s.io/astrads-astradsvolumesnapshot-viewer-role created clusterrole.rbac.authorization.k8s.io/astrads-manager-role created rolebinding.rbac.authorization.k8s.io/astrads-astrads-admin-rolebinding created rolebinding.rbac.authorization.k8s.io/astrads-astrads-reader-rolebinding created rolebinding.rbac.authorization.k8s.io/astrads-astrads-writer-rolebinding created rolebinding.rbac.authorization.k8s.io/astrads-leader-election-rolebinding created rolebinding.rbac.authorization.k8s.io/astrads-manager-rolebinding created clusterrolebinding.rbac.authorization.k8s.io/astrads-astrads-admin-rolebinding created clusterrolebinding.rbac.authorization.k8s.io/astrads-astrads-reader-rolebinding created clusterrolebinding.rbac.authorization.k8s.io/astrads-astrads-writer-rolebinding created clusterrolebinding.rbac.authorization.k8s.io/astrads-manager-rolebinding created configmap/astrads-autosupport-cm created configmap/astrads-firetap-cm created configmap/astrads-kevents-asup created configmap/astrads-metrics-cm created secret/astrads-autosupport-certs created secret/astrads-webhook-server-cert created service/astrads-webhook-service created deployment.apps/astrads-operator created
-
確認Astra Data Store營運者Pod已啟動且正在執行:
kubectl get pods -n astrads-system
回應:
NAME READY STATUS RESTARTS AGE astrads-operator-5ffb94fbf-7ln4h 1/1 Running 0 17m
部署Astra Data Store版本Yaml
-
使用「kubecl apply」部署:
kubectl apply -f ./astrads/manifests/astradsversion.yaml
-
確認Pod正在執行:
kubectl get pods -n astrads-system
回應:
NAME READY STATUS RESTARTS AGE astrads-cluster-controller-7f6f884645-xxf2n 1/1 Running 0 117s astrads-ds-nodeinfo-2jqnk 1/1 Running 0 2m7s astrads-ds-nodeinfo-dbk7v 1/1 Running 0 2m7s astrads-ds-nodeinfo-rn9tt 1/1 Running 0 2m7s astrads-ds-nodeinfo-vsmhv 1/1 Running 0 2m7s astrads-license-controller-fb8fd56bc-bxq7j 1/1 Running 0 2m2s astrads-operator-5ffb94fbf-7ln4h 1/1 Running 0 2m10s
套用Astra Data Store授權
-
套用您從NetApp取得的NetApp授權檔案(NLF)。執行命令之前、請輸入您所在的叢集名稱(「<Astra Data-Store-cluster名稱>」) 即將部署 或已部署及授權檔案路徑(「<file_path/file.txt>`):
kubectl astrads license add --license-file-path <file_path/file.txt> --ads-cluster-name <Astra-Data-Store-cluster-name> -n astrads-system
-
確認已新增授權:
kubectl astrads license list
回應:
NAME ADSCLUSTER VALID PRODUCT EVALUATION ENDDATE VALIDATED e100000006-ads-capacity astrads-example-cluster true Astra Data Store true 2023-01-23 2022-04-04T14:38:54Z
安裝Astra Data Store叢集
-
開啟Yaml檔案:
vim ./astrads/manifests/astradscluster.yaml
-
在Yaml檔案中編輯下列值。
以下步驟為Yaml檔案的簡化範例。 -
(必填)中繼資料:在「metadata」中、將「name」字串變更為叢集名稱。這必須與您在使用時使用的叢集名稱相同 套用授權。
-
(必填)規格:在「show」中變更下列必要值:
-
視授權和Astra Data Store安裝大小而定、將「adsNodeConfig」值變更為安裝所需的值:
-
小型:9個CPU和38個記憶體
-
中:23個CPU和94個記憶體
-
-
(選用)移除「adsNodeSelector」區段的註解。如果您想要限制Astra Data Store只安裝在選取的工作節點集區、請設定此選項。
-
(選用)指定Astra Data Store叢集應使用的特定節點數、範圍介於4-16之間。
-
將「mVIP」字串變更為可從叢集中任何工作節點路由傳送之浮動管理IP的IP位址。
-
在「adsDataNetworks」中、新增一個以逗號分隔的浮動IP位址清單(「Addresses」)、這些位址可從您要掛載NetApp Volume的任何主機路由傳送。每個節點使用一個浮動IP位址。資料網路IP位址應至少與Astra Data Store節點一樣多。對於Astra Data Store、這表示如果您打算稍後擴充叢集、至少需要4個位址或最多16個位址。
-
在「adsDataNetworks」中、指定資料網路使用的網路遮罩。
-
在「adsNetworks介面」中、將「<mgmt_interface_name>'」和「<cluster與_storage介面名稱>'值取代為您要用於管理、叢集與儲存的網路介面名稱。如果未指定名稱、則節點的主要介面將用於管理、叢集和儲存網路。請務必移除「adsNetworks介面」一節的註解。
叢集和儲存網路必須位於相同的介面上。Astra Data Store管理介面應與Kubernetes節點的管理介面相同。
-
-
(選用)監控組態:如果您要設定 監控營運者 (若您未使用Astra Control Center進行監控、則為選用)、從區段移除註解、新增套用代理程式CR(監控操作員資源)的命名空間(預設為「NetApp-Monitoring」(NetApp監控)、並新增您在先前步驟中使用的登錄(「您的登錄路徑」)的repo路徑。
-
(可選)* autosupSupportConfig*:保留 "AutoSupport" 除非您需要設定Proxy、否則預設值為:
-
對於「proxyURL」、請使用連接埠來設定Proxy的URL、以便AutoSupport 進行套裝組合傳輸。
為了簡單起見、以下Yaml範例中已移除部分意見。 -
apiVersion: astrads.netapp.io/v1beta1 kind: AstraDSCluster metadata: name: astrads-cluster-name namespace: astrads-system spec: adsNodeConfig: cpu: 9 memory: 38 # [Optional] Specify node selector labels to select the nodes for creating ADS cluster # adsNodeSelector: # matchLabels: # customLabelKey: customLabelValue adsNodeCount: 4 mvip: "" adsDataNetworks: - addresses: "" netmask: # Specify the network interface names to use for management, cluster and storage networks. # If none are specified, the node's primary interface will be used for management, cluster and storage networking. # To move the cluster and storage networks to a different interface than management, specify all three interfaces to use here. # NOTE: The cluster and storage networks need to be on the same interface. adsNetworkInterfaces: managementInterface: "<mgmt_interface_name>" clusterInterface: "<cluster_and_storage_interface_name>" storageInterface: "<cluster_and_storage_interface_name>" # [Optional] Provide a monitoring config to be used to setup/configure a monitoring agent. # monitoringConfig: # namespace: "netapp-monitoring" # repo: "[YOUR REGISTRY]" autoSupportConfig: autoUpload: true enabled: true coredumpUpload: false historyRetentionCount: 25 destinationURL: "https://support.netapp.com/put/AsupPut" # ProxyURL defines the URL of the proxy with port to be used for AutoSupport bundle transfer # proxyURL: periodic: - schedule: "0 0 * * *" periodicconfig: - component: name: storage event: dailyMonitoring userMessage: Daily Monitoring Storage AutoSupport bundle nodes: all - component: name: controlplane event: daily userMessage: Daily Control Plane AutoSupport bundle
-
-
使用「kubecll apply」部署叢集:
kubectl apply -f ./astrads/manifests/astradscluster.yaml
-
等待幾分鐘、讓叢集建立作業完成、然後確認Pod正在執行:
kubectl get pods -n astrads-system
回應範例:
NAME READY STATUS RESTARTS AGE astrads-cluster-controller-7c67cc7f7b-2jww2 1/1 Running 0 7h31m astrads-deployment-support-788b859c65-2qjkn 3/3 Running 19 12d astrads-ds-astrads-cluster-1ab0dbc-j9jzc 1/1 Running 0 5d2h astrads-ds-astrads-cluster-1ab0dbc-k9wp8 1/1 Running 0 5d1h astrads-ds-astrads-cluster-1ab0dbc-pwk42 1/1 Running 0 5d2h astrads-ds-astrads-cluster-1ab0dbc-qhvc6 1/1 Running 0 8h astrads-ds-nodeinfo-gcmj8 1/1 Running 1 12d astrads-ds-nodeinfo-j826x 1/1 Running 3 12d astrads-ds-nodeinfo-vdthh 1/1 Running 3 12d astrads-ds-nodeinfo-xwgsf 1/1 Running 0 12d astrads-ds-support-828vw 2/2 Running 2 5d2h astrads-ds-support-astrads-example-cluster-cfzts 2/2 Running 0 8h astrads-ds-support-astrads-example-cluster-nzkkr 2/2 Running 15 7h49m astrads-ds-support-astrads-example-cluster-xxbnp 2/2 Running 1 5d2h astrads-license-controller-86c69f76bb-s6fb7 1/1 Running 0 8h astrads-operator-79ff8fbb6d-vpz9m 1/1 Running 0 8h
-
驗證叢集部署進度:
kubectl get astradscluster -n astrads-system
回應範例:
NAME STATUS VERSION SERIAL NUMBER MVIP AGE astrads-example-cluster created 2022.05.0-X e100000006 10.x.x.x 13m
瞭解與部署相關的事件
在叢集部署期間、作業狀態應從「空白」變更為「進行中」、改為「已建立」。叢集部署將持續約8至10分鐘。若要在部署期間監控叢集事件、您可以執行下列任一命令:
kubectl get events --field-selector involvedObject.kind=AstraDSCluster -n astrads-system
kubectl describe astradscluster <cluster name> -n astrads-system
以下是部署期間的重要事件:
活動 | 訊息與重要性 |
---|---|
控制面板無選項 |
成功選取[number]個控制面板節點以加入ADS叢集。Astra Data Store營運者利用CPU、記憶體、儲存設備和網路來識別足夠的節點、以建立Astra Data Store叢集。 |
ADSClusterCreateInProgress |
Astra Data Store叢集控制器已啟動叢集建立作業。 |
ADSClusterCreeSuccess |
已成功建立叢集。 |
如果叢集的狀態並未變更為「進行中」、請查看操作員記錄、以取得節點選擇的詳細資料:
kubectl logs -n astrads-system <astrads operator pod name>
如果叢集的狀態卡在「In Progress(進行中)」、請檢查叢集控制器的記錄:
kubectl logs -n astrads-system <astrads cluster controller pod name>
使用Astra Control Center安裝Astra資料儲存區
若要搭配Astra Control Center部署及使用Astra Data Store、請執行下列步驟。
-
您已檢閱過 一般Astra資料儲存區先決條件。
-
您已安裝Astra Control Center。