DBurkland.com
  • Home
  • About
  • Twitter
  • LinkedIn
  • Search Icon

DBurkland.com

All Things Technology & Tesla

How To Setup NetApp Harvest Using Kubernetes (Using Pre-Built Container Image)

How To Setup NetApp Harvest Using Kubernetes (Using Pre-Built Container Image)

August 13, 2017 dburkland Comments 0 Comment

*2018-03-18: Updated for version 1.4.1 of my container image which includes bug fixes, Grafana 4.5.2 and NetApp Harvest 1.4

This post is based on the original “How To Setup NetApp Harvest Using Docker” blog post however it has been tweaked to reflect the use of Kubernetes and the NetApp Trident plugin. It is assumed both Kubernetes and NetApp Trident are already deployed so if you have questions on deploying these technologies see here.
    • Image download and distribution
      • Create the appropriate directories which will house the docker container build files
        Shell
        1
        # mkdir -pv /root/docker/harvest
      • Download the custom NetApp Harvest Docker image (dburkland/harvest)
        • Download the following files to your workstation and upload them to the “/root/docker/harvest/“ directory on the Kubernetes master node
          • dburkland_harvest_v1.4.1aa
          • dburkland_harvest_v1.4.1ab
          • dburkland_harvest_v1.4.1ac
          • dburkland_harvest_v1.4.1ad
          • dburkland_harvest_v1.4.1ae
          • dburkland_harvest_v1.4.1af
          • dburkland_harvest_v1.4.1ag
          • dburkland_harvest_v1.4.1ah
          • dburkland_harvest_v1.4.1ai
          • dburkland_harvest_v1.4.1aj
          • dburkland_harvest_v1.4.1ak
          • dburkland_harvest_v1.4.1al
        • Uncompress the multi-part zip file
          Shell
          1
          2
          3
          4
          5
          cd /root/docker/harvest
          cat dburkland_harvest_v1.4.1a* > dburkland_harvest_v1.4.1.zip
          unzip dburkland_harvest_v1.4.1.zip
           
          NOTE: At this point enter NTAPHarvestDocker2016 for the password in order to properly unzip the aforementioned zip file.
        • Import the Docker image file
          Shell
          1
          2
          3
          docker load < dburkland_harvest_v1.4.1.tar
           
          NOTE: You MUST perform this step on EVERY node in the Kubernetes cluster. It is recommended to deploy a local Docker image repository. For instructions on how to deploy one, see the "Sources" section below.
        • Verify you can now see the “dburkland/harvest” image in the Docker image inventory
          Shell
          1
          docker images
    • Deploy NetApp Harvest in the Kubernetes Environment
      • Login to your kubernetes master node and create the harvest namespace
        Shell
        1
        # kubectl create namespace harvest
      • Define the persistent volume claims (PVCs) on your kubernetes master node
        Shell
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        # cd trident-installer
        # vi setup/pvc-dburkland_harvest_carbon.yaml
        kind: PersistentVolumeClaim
        apiVersion: v1
        metadata:
        name: var-lib-carbon
        namespace: harvest
        annotations:
        volume.beta.kubernetes.io/storage-class: default-dburkland
        trident.netapp.io/exportPolicy: "prod_kubernetes_nodes"
        trident.netapp.io/snapshotPolicy: "default-dburkland"
        spec:
        accessModes:
        - ReadWriteMany
        resources:
        requests:
        storage: 5Gi
         
        # vi setup/pvc-dburkland_harvest_conf.yaml
         
        kind: PersistentVolumeClaim
        apiVersion: v1
        metadata:
        name: opt-netapp-harvest-conf
        namespace: harvest
        annotations:
        volume.beta.kubernetes.io/storage-class: default-dburkland
        trident.netapp.io/exportPolicy: "prod_kubernetes_nodes"
        trident.netapp.io/snapshotPolicy: "default-dburkland"
        spec:
        accessModes:
        - ReadWriteMany
        resources:
        requests:
        storage: 5Gi
      • Create the PVCs
        Shell
        1
        2
        # kubectl create -f pvc-dburkland_harvest_carbon.yaml
        # kubectl create -f pvc-dburkland_harvest_conf.yaml
      • Define the deployment which relies on the aforementioned persistent volume claims
        Shell
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21
        22
        23
        24
        25
        26
        27
        28
        29
        30
        31
        32
        33
        34
        35
        36
        37
        38
        39
        40
        41
        42
        43
        44
        45
        46
        47
        48
        49
        50
        51
        52
        53
        54
        55
        56
        57
        58
        59
        60
        61
        62
        63
        64
        65
        66
        67
        68
        69
        70
        71
        72
        73
        74
        75
        76
        77
        78
        79
        80
        81
        82
        83
        # vi setup/deployment-dburkland_harvest.yaml
         
        apiVersion: extensions/v1beta1
        kind: Deployment
        metadata:
          name: harvest
          namespace: harvest
        spec:
          replicas: 1
          template:
            metadata:
              labels:
                app: harvest
            spec:
              volumes:
                - name: volume-var-lib-carbon
                  persistentVolumeClaim:
                    claimName: var-lib-carbon
                - name: volume-opt-netapp-harvest-conf
                  persistentVolumeClaim:
                    claimName: opt-netapp-harvest-conf
                - name: volume-tmpfs-run
                  emptyDir:
                    medium: "Memory"
                - name: volume-tmpfs-run-lock
                  emptyDir:
                    medium: "Memory"
                - name: volume-tmpfs-tmp
                  emptyDir:
                    medium: "Memory"
              containers:
                - name: harvest
                  image: mn1s21000.dburkland.com:5000/dburkland/harvest:latest
                  ports:
                    - containerPort: 80
                    - containerPort: 8080
                  volumeMounts:
                    - mountPath: "/opt/netapp-harvest-conf"
                      name: volume-opt-netapp-harvest-conf
                    - mountPath: "/var/lib/carbon"
                      name: volume-var-lib-carbon
                    - mountPath: "/run"
                      name: volume-tmpfs-run
                    - mountPath: "/run/lock"
                      name: volume-tmpfs-run-lock
                    - mountPath: "/tmp"
                      name: volume-tmpfs-tmp
                  readinessProbe:
                    httpGet:
                      path: /
                      port: 80
                    initialDelaySeconds: 120
                    timeoutSeconds: 1
                    periodSeconds: 15
                  livenessProbe:
                    httpGet:
                      path: /
                      port: 80
                    initialDelaySeconds: 120
                    timeoutSeconds: 1
                    periodSeconds: 15
                  securityContext:
                    capabilities:
                      add:
                        - SYS_ADMIN          
        ---
          kind: Service
          metadata:
            name: harvest
            namespace: harvest
            labels:
              app: harvest
          spec:
            type: NodePort
            ports:
              - name: grafana
                port: 80
                nodePort: 30080
              - name: graphite
                port: 8080
                nodePort: 30081
            selector:
              app: harvest
      • Create the deployment
        Shell
        1
        2
        3
        4
        # kubectl create -f setup/deployment-dburkland_harvest.yaml
        # kubectl get deployment --all-namespaces --watch=true
        <CTRL+C>
        # kubectl get pod --all-namespaces --watch=true
    • NetApp Controller / OCUM Appliance Preparation Steps
      • Create the Harvest role on each NetApp system you wish to monitor
        • 7mode
          Shell
          1
          2
          useradmin role add role-harvest -c "Role for performance monitoring by NetApp Harvest" -a login-http-admin,api-system-get-version,api-system-get-info,api-perf-object-*,api-ems- autosupport-log
          useradmin group add group-harvest -c "Group for performance monitoring by NetApp Harvest" -r role-harvest
        • cDOT
          Shell
          1
          2
          3
          4
          5
          6
          7
          8
          9
          security login role create -role role-harvest -access readonly -cmddirname "version"
          security login role create -role role-harvest -access readonly -cmddirname "cluster identity show"
          security login role create -role role-harvest -access readonly -cmddirname "cluster show"
          security login role create -role role-harvest -access readonly -cmddirname "system node show"
          security login role create -role role-harvest -access readonly -cmddirname "statistics"
          security login role create -role role-harvest -access readonly -cmddirname "lun show"
          security login role create -role role-harvest -access readonly -cmddirname "network interface show"
          security login role create -role role-harvest -access readonly -cmddirname "network interface show"
          security login role create -role role-harvest -access readonly -cmddirname "qos workload show"
      • Create the Harvest user on each NetApp system you wish to monitor
        • 7mode
          Shell
          1
          useradmin user add netapp-harvest -c "User account for performance monitoring by NetApp Harvest" -n "NetApp Harvest" -g group-harvest
        • cDOT 8.2 or earlier
          Shell
          1
          security login create -username harvest -application ontapi -role role-harvest -authmethod password
        • cDOT 8.3 or greater
          Shell
          1
          security login create -user-or-group-name harvest -application ontapi -role role-harvest -authmethod password
        • OCUM 6.x/7.x (Required for capacity data)
          • Login to the OCUM web interface as the “admin” user
          • Navigate to “Administration” -> “Manage Users”
          • Click “Add” to bring up the “Add User” window and create the “harvest” user as seen in the screenshot
            8B4D735D-9DBD-43FA-B7AA-EB4398318A66
        • For certificate authentication see the “NetApp Harvest Installation and Administration Guide” located here for more information
    • Final NetApp Harvest Container Configuration & Validation Steps
      • Login to the container and add all applicable NetApp 7mode or cDOT systems to the bottom of “/opt/netapp-harvest-conf/netapp-harvest.conf” and then restart the Harvest service to apply the changes
        Shell
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        # kubectl get pod --all-namespaces (Grab the harvest pod name)
         
        # kubectl exec -n harvest -ti harvest-1257702773-j1qzg -- /bin/bash
        # vi /opt/netapp-harvest-conf/netapp-harvest.conf
        [mn1d41000]
        host_type = FILER
        hostname = mn1d41000
        site = mn1
         
        [mn1s41007]
        host_type               = OCUM
        hostname                = mn1s41007.dburkland.com
        site = mn1
        data_update_freq        = 900
         
        # /etc/init.d/netapp-harvest restart
        # exit
    • You should now be able to login to Grafana by pointing your web browser at http://Kubernetes_Master_Node_IP:30080
      • Default Username: admin
      • Default Password: admin
    • Within a half hour the dashboards should be correctly displaying realtime statistics as seen in the following example screenshot:26AD5E36-0F46-4D23-B04C-725872977033
  • Sources
    • [GitHub] dburkland/harvest Repository
    • [GitHub] Tech ONTAP Live: NetApp Performance Tools Update Slide Deck
    • NetApp Harvest Installation and Administration Guide
    • Christopher Madden’s Blog
    • 2258-3: Real-time Monitoring of Clustered Data ONTAP
    • [DBurkland.com] How To Setup Graphite To Visualize OnCommand Performance Manager Data
    • [DBurkland.com] How To Setup Grafana with Graphite And Create Basic Dashboards
    • What is Docker?
    • Docker Volumes Using NetApp Storage
    • Deploy a registry server

NetApp

Post navigation

NEXT
Trusted Platform Module (TPM) Supported Platforms
PREVIOUS
How To Deploy Kubernetes With NetApp Trident Persistent Storage

Categories

  • Batteries (7)
  • EVs (9)
  • FreeBSD (1)
  • Linux (5)
  • Microsoft (2)
  • NetApp (12)
  • Red Hat (5)
  • Security (1)
  • Tech (15)
  • Tesla (15)
  • Tools (4)
  • VMware (1)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2022   All Rights Reserved.