Using Trident to Automate Azure NetApp Files from OpenShift

Published 05-21-2021 03:38 AM 850 Views
Microsoft

Some time ago I wrote this post about different storage options in Azure Red Hat OpenShift. One of the options discussed was using Azure NetApp Files for persistent storage of your pods. As discussed in that post, Azure NetApp Files (ANF) has some advantages:

 

  • ReadWriteMany support
  • Does not count against the limit of Azure Disks per VM
  • Different performance tiers, the most performant one being 128MiB/s per TiB of volume capacity
  • The NetApp tooling ecosystem

There is one situation where Azure NetApp Files will not be a great fit: if you only need a small share, since the minimum pool size in which Azure NetApp Files can be ordered is 4 TiB. You can carve out many small volumes out of that pool with 4 TiB of capacity, but if the only thing you need is a small share, other options might be more cost effective.

 

The three different performance tiers of Azure NetApp Files can be very flexible, offering between 16 and 128 MiB/s per provisioned TiB. For example, at 1 TiB a Premium SSD (P30) would give you 200 MiB/s, while a an ANF volume would give you up to 128 MiB/s. Not quite the performance of a Premium SSD, but it doesn’t fall too far behind either.

 

But’s let’s go back to our post title: what is Trident? In a standard setup, you would have to create the ANF volume manually, and assign it to the different pods that need it. However, with the project Trident NetApp offers the possibility for the Kubernetes clusters of creating and destroying those volumes automatically, tied to the Persistent Volume Claim lifecycle. Hence, when the application is deployed to OpenShift, nobody needs to go to the Azure Portal and provision storage in advance, but the volumes are created using the Kubernetes API, through the functionality of Trident.

 

As the Trident documentation says, OpenShift is a supported platform. I did not find any blog about whether it would work on Azure RedHat OpenShift (why shouldn’t it?), so I decided to give it a go. I installed Trident on my ARO cluster following this great post by Sean Luce: Azure NetApp Files + Trident, and it was a breeze. You need the client tooling tridentctl, which will do some of the required operations for you (more to this further down).

 

I created the ANF account and pool with the Azure CLI (Sean is using the Azure Portal). Trident needs a Service Principal to interact with Azure NetApp Files. In my case I am using the cluster SP, to which I granted contributor access for the ANF account:

 

az netappfiles account create -g $rg -n $anf_name -l $anf_location
az netappfiles pool create -g $rg -a $anf_name -n $anf_name -l $anf_location --size 4 --service-level Standard
anf_account_id=$(az netappfiles account show -n $anf_name -g $rg --query id -o tsv)
az role assignment create --scope $anf_account_id --assignee $sp_app_id --role 'Contributor'

Now you need to install the Trident software (unsurprisingly, Helm is your friend here), and add a “backend”, which will teach Trident how to access that Azure NetApp Files pool you created a minute ago:

 

# Create ANF backend
# Credits to https://github.com/seanluce/ANF_Trident_AKS
subscription_id=$(az account show --query id -o tsv)
tenant_id=$(az account show --query tenantId -o tsv)
trident_backend_file=/tmp/trident_backend.json
cat <<EOF > $trident_backend_file
{
  "version": 1,
  "storageDriverName": "azure-netapp-files",
  "subscriptionID": "$subscription_id",
  "tenantID": "$tenant_id",
  "clientID": "$sp_app_id",
  "clientSecret": "$sp_app_secret",
  "location": "$anf_location",
  "serviceLevel": "Standard",
  "virtualNetwork": "$vnet_name",
  "subnet": "$anf_subnet_name",
  "nfsMountOptions": "vers=3,proto=tcp,timeo=600",
  "limitVolumeSize": "500Gi",
  "defaults": {
    "exportRule": "0.0.0.0/0",
    "size": "200Gi"
  }
}
EOF
tridentctl -n $trident_ns create backend -f $trident_backend_file

 

After this, we need a way for OpenShift to use this backend, through standard Kubernetes constructs as any other OpenShift storage technology: with a storage class.

 

# Create Storage Class
# Credits to https://github.com/seanluce/ANF_Trident_AKS
cat <<EOF | kubectl apply -f -
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: azurenetappfiles
provisioner: netapp.io/trident
parameters:
  backendType: "azure-netapp-files"
EOF

 

So OpenShift now will have now 2 storage classes: the default one, which leverages managed Azure Premium disks, plus the new one that has been created to interact with ANF:

 

$ kubectl get sc
NAME                        PROVISIONER                RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION
azurenetappfiles            csi.trident.netapp.io      Delete          Immediate              false
managed-premium (default)   kubernetes.io/azure-disk   Delete          WaitForFirstConsumer   true

 

And here the magic comes: when a Persistent Volume Claim is created and associated to that storage class, an ANF volume will be instantiated too, matching the parameters specified in the PVC. To create the PVC I will stick to Sean’s example, with a 100 GiB volume:

 

# Create PVC
# Credits to https://github.com/seanluce/ANF_Trident_AKS
cat <<EOF | kubectl apply -f -
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: azurenetappfiles
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 100Gi
  storageClassName: azurenetappfiles
EOF

 

The PVC is now visible in OpenShift:

 

$ kubectl get pvc
NAME               STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS       AGE
azurenetappfiles   Bound    pvc-adc0348d-5752-4e44-82c2-8205f39c376d   100Gi      RWX            azurenetappfiles   8h

And sure enough, you can use the Azure Portal to browse your account, pool, and the newly created volume:

 
 

 

The Azure CLI will give us as well information about the created volume. The default output was a bit busy and didn’t fit in my screen width, so I created my own set of options that I was interested in:

 

$ az netappfiles volume list -g $rg -a $anf_name -p $anf_name -o table --query '[].{Name:name, ProvisioningState:provisioningState, ThroughputMibps:throughputMibps, ServiceLevel:serviceLevel, Location:location}'

Name                                                      ProvisioningState    ThroughputMibps    ServiceLevel    Location
--------------------------------------------------------  -------------------  -----------------  --------------  -----------
anf5550/anf5550/pvc-adc0348d-5752-4e44-82c2-8205f39c376d  Succeeded            1.6                Standard        northeurope

 

Interestingly enough, I couldn’t see the volume size in the object properties, but it can be easily inferred: the volume is Standard, and from the Azure NetApp Files performance tiers we know that Standard means 16 MiB/s per provisioned TiB. Hence, 1.6 MiB/s means 100 GiBs: Maths still work!

 

I used my sqlapi image, which includes a rudimentary I/O performance benchmark tool based on this code by thodnev, to verify those expected 1.6 MiB/s:

 

# Deployment
name=api
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
  name: $name
  labels:
    app: $name
    deploymethod: trident
spec:
  replicas: 1
  selector:
    matchLabels:
      app: $name
  template:
    metadata:
      labels:
        app: $name
        deploymethod: trident
    spec:
      containers:
      - name: $name
        image: erjosito/sqlapi:1.0
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: disk01
          mountPath: /mnt/disk
      volumes:
      - name: disk01
        persistentVolumeClaim:
          claimName: azurenetappfiles
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: $name
  name: $name
spec:
  ports:
  - port: 8080
    protocol: TCP
    targetPort: 8080
  selector:
    app: $name
  type: LoadBalancer
EOF

And here the results of the I/O benchmark (not sure about why the read bandwidth is 10x, I might have a bug in the I/O benchmarking code or there is some caching involved somewhere, I will update this post when I find out more):

 

❯ curl 'http://40.127.231.103:8080/api/ioperf?size=512&file=%2Fmnt%2Fdisk%2Fiotest'
{
"Filepath": "/mnt/disk/iotest",
"Read IOPS": 201567.0,
"Read bandwidth in MB/s": 1574.75,
"Read block size (KB)": 8,
"Read blocks": 65536,
"Read time (sec)": 0.33,
"Write IOPS": 13.0,
"Write bandwidth in MB/s": 1.62,
"Write block size (KB)": 128,
"Write time (sec)": 315.51,
"Written MB": 512,
"Written blocks": 4096
}

When you delete the application from OpenShift, including the PVC, the Azure NetApp Files will disappear as well, without anybody having to log to Azure to do anything.

 

So that concludes this post, with a boring “it works as expected”. Thanks for reading!

%3CLINGO-SUB%20id%3D%22lingo-sub-2367351%22%20slang%3D%22en-US%22%3EUsing%20Trident%20to%20Automate%20Azure%20NetApp%20Files%20from%20OpenShift%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2367351%22%20slang%3D%22en-US%22%3E%3CP%3ESome%20time%20ago%20I%20wrote%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fblog.cloudtrooper.net%2F2020%2F11%2F10%2Fazure-red-hat-openshift-storage-concepts%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ethis%20post%20about%20different%20storage%20options%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ein%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fopenshift%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Red%20Hat%20OpenShift%3C%2FA%3E.%20One%20of%20the%20options%20discussed%20was%20using%20Azure%20NetApp%20Files%20for%20persistent%20storage%20of%20your%20pods.%20As%20discussed%20in%20that%20post%2C%20Azure%20NetApp%20Files%20(ANF)%20has%20some%20advantages%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EReadWriteMany%20support%3C%2FLI%3E%0A%3CLI%3EDoes%20not%20count%20against%20the%20limit%20of%20Azure%20Disks%20per%20VM%3C%2FLI%3E%0A%3CLI%3EDifferent%20performance%20tiers%2C%20the%20most%20performant%20one%20being%20128MiB%2Fs%20per%20TiB%20of%20volume%20capacity%3C%2FLI%3E%0A%3CLI%3EThe%20NetApp%20tooling%20ecosystem%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThere%20is%20one%20situation%20where%20Azure%20NetApp%20Files%20will%20not%20be%20a%20great%20fit%3A%20if%20you%20only%20need%20a%20small%20share%2C%20since%20the%20minimum%20pool%20size%20in%20which%20Azure%20NetApp%20Files%20can%20be%20ordered%20is%204%20TiB.%20You%20can%20carve%20out%20many%20small%20volumes%20out%20of%20that%20pool%20with%204%20TiB%20of%20capacity%2C%20but%20if%20the%20only%20thing%20you%20need%20is%20a%20small%20share%2C%20other%20options%20might%20be%20more%20cost%20effective.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-netapp-files%2Fazure-netapp-files-service-levels%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ethree%20different%20performance%20tiers%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eof%20Azure%20NetApp%20Files%20can%20be%20very%20flexible%2C%20offering%20between%2016%20and%20128%20MiB%2Fs%20per%20provisioned%20TiB.%20For%20example%2C%20at%201%20TiB%20a%20Premium%20SSD%20(P30)%20would%20give%20you%20200%20MiB%2Fs%2C%20while%20a%20an%20ANF%20volume%20would%20give%20you%20up%20to%20128%20MiB%2Fs.%20Not%20quite%20the%20performance%20of%20a%20Premium%20SSD%2C%20but%20it%20doesn%E2%80%99t%20fall%20too%20far%20behind%20either.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%E2%80%99s%20let%E2%80%99s%20go%20back%20to%20our%20post%20title%3A%20what%20is%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FNetApp%2Ftrident%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ETrident%3C%2FA%3E%3F%20In%20a%20standard%20setup%2C%20you%20would%20have%20to%20create%20the%20ANF%20volume%20manually%2C%20and%20assign%20it%20to%20the%20different%20pods%20that%20need%20it.%20However%2C%20with%20the%20project%20Trident%20NetApp%20offers%20the%20possibility%20for%20the%20Kubernetes%20clusters%20of%20creating%20and%20destroying%20those%20volumes%20automatically%2C%20tied%20to%20the%20Persistent%20Volume%20Claim%20lifecycle.%20Hence%2C%20when%20the%20application%20is%20deployed%20to%20OpenShift%2C%20nobody%20needs%20to%20go%20to%20the%20Azure%20Portal%20and%20provision%20storage%20in%20advance%2C%20but%20the%20volumes%20are%20created%20using%20the%20Kubernetes%20API%2C%20through%20the%20functionality%20of%20Trident.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20the%20Trident%20documentation%20says%2C%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fnetapp-trident.readthedocs.io%2Fen%2Fstable-v20.10%2Fsupport%2Frequirements.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EOpenShift%20is%20a%20supported%20platform%3C%2FA%3E.%20I%20did%20not%20find%20any%20blog%20about%20whether%20it%20would%20work%20on%20Azure%20RedHat%20OpenShift%20(why%20shouldn%E2%80%99t%20it%3F)%2C%20so%20I%20decided%20to%20give%20it%20a%20go.%20I%20installed%20Trident%20on%20my%20ARO%20cluster%20following%20this%20great%20post%20by%20Sean%20Luce%3A%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fanfcommunity.com%2F2021%2F02%2F16%2Fazure-netapp-files-trident-dynamic-and-persistent-storage-for-kubernetes%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3EAzure%20NetApp%20Files%20%2B%20Trident%3C%2FA%3E%2C%20and%20it%20was%20a%20breeze.%20You%20need%20the%20client%20tooling%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CCODE%3Etridentctl%3C%2FCODE%3E%2C%20which%20will%20do%20some%20of%20the%20required%20operations%20for%20you%20(more%20to%20this%20further%20down).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20created%20the%20ANF%20account%20and%20pool%20with%20the%20Azure%20CLI%20(Sean%20is%20using%20the%20Azure%20Portal).%20Trident%20needs%20a%20Service%20Principal%20to%20interact%20with%20Azure%20NetApp%20Files.%20In%20my%20case%20I%20am%20using%20the%20cluster%20SP%2C%20to%20which%20I%20granted%20contributor%20access%20for%20the%20ANF%20account%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Eaz%20netappfiles%20account%20create%20-g%20%24rg%20-n%20%24anf_name%20-l%20%24anf_location%0Aaz%20netappfiles%20pool%20create%20-g%20%24rg%20-a%20%24anf_name%20-n%20%24anf_name%20-l%20%24anf_location%20--size%204%20--service-level%20Standard%0Aanf_account_id%3D%24(az%20netappfiles%20account%20show%20-n%20%24anf_name%20-g%20%24rg%20--query%20id%20-o%20tsv)%0Aaz%20role%20assignment%20create%20--scope%20%24anf_account_id%20--assignee%20%24sp_app_id%20--role%20'Contributor'%0A%3C%2FPRE%3E%0A%3CP%3ENow%20you%20need%20to%20install%20the%20Trident%20software%20(unsurprisingly%2C%20Helm%20is%20your%20friend%20here)%2C%20and%20add%20a%20%E2%80%9Cbackend%E2%80%9D%2C%20which%20will%20teach%20Trident%20how%20to%20access%20that%20Azure%20NetApp%20Files%20pool%20you%20created%20a%20minute%20ago%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22wp-block-preformatted%22%3E%23%20Create%20ANF%20backend%0A%23%20Credits%20to%20https%3A%2F%2Fgithub.com%2Fseanluce%2FANF_Trident_AKS%0Asubscription_id%3D%24(az%20account%20show%20--query%20id%20-o%20tsv)%0Atenant_id%3D%24(az%20account%20show%20--query%20tenantId%20-o%20tsv)%0Atrident_backend_file%3D%2Ftmp%2Ftrident_backend.json%0Acat%20%26lt%3B%26lt%3BEOF%20%26gt%3B%20%24trident_backend_file%0A%7B%0A%20%20%22version%22%3A%201%2C%0A%20%20%22storageDriverName%22%3A%20%22azure-netapp-files%22%2C%0A%20%20%22subscriptionID%22%3A%20%22%24subscription_id%22%2C%0A%20%20%22tenantID%22%3A%20%22%24tenant_id%22%2C%0A%20%20%22clientID%22%3A%20%22%24sp_app_id%22%2C%0A%20%20%22clientSecret%22%3A%20%22%24sp_app_secret%22%2C%0A%20%20%22location%22%3A%20%22%24anf_location%22%2C%0A%20%20%22serviceLevel%22%3A%20%22Standard%22%2C%0A%20%20%22virtualNetwork%22%3A%20%22%24vnet_name%22%2C%0A%20%20%22subnet%22%3A%20%22%24anf_subnet_name%22%2C%0A%20%20%22nfsMountOptions%22%3A%20%22vers%3D3%2Cproto%3Dtcp%2Ctimeo%3D600%22%2C%0A%20%20%22limitVolumeSize%22%3A%20%22500Gi%22%2C%0A%20%20%22defaults%22%3A%20%7B%0A%20%20%20%20%22exportRule%22%3A%20%220.0.0.0%2F0%22%2C%0A%20%20%20%20%22size%22%3A%20%22200Gi%22%0A%20%20%7D%0A%7D%0AEOF%0Atridentctl%20-n%20%24trident_ns%20create%20backend%20-f%20%24trident_backend_file%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfter%20this%2C%20we%20need%20a%20way%20for%20OpenShift%20to%20use%20this%20backend%2C%20through%20standard%20Kubernetes%20constructs%20as%20any%20other%20OpenShift%20storage%20technology%3A%20with%20a%20storage%20class.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22wp-block-preformatted%22%3E%23%20Create%20Storage%20Class%0A%23%20Credits%20to%20https%3A%2F%2Fgithub.com%2Fseanluce%2FANF_Trident_AKS%0Acat%20%26lt%3B%26lt%3BEOF%20%7C%20kubectl%20apply%20-f%20-%0AapiVersion%3A%20storage.k8s.io%2Fv1%0Akind%3A%20StorageClass%0Ametadata%3A%0A%20%20name%3A%20azurenetappfiles%0Aprovisioner%3A%20netapp.io%2Ftrident%0Aparameters%3A%0A%20%20backendType%3A%20%22azure-netapp-files%22%0AEOF%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20OpenShift%20now%20will%20have%20now%202%20storage%20classes%3A%20the%20default%20one%2C%20which%20leverages%20managed%20Azure%20Premium%20disks%2C%20plus%20the%20new%20one%20that%20has%20been%20created%20to%20interact%20with%20ANF%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%24%20kubectl%20get%20sc%0ANAME%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20PROVISIONER%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20RECLAIMPOLICY%20%20%20VOLUMEBINDINGMODE%20%20%20%20%20%20ALLOWVOLUMEEXPANSION%0Aazurenetappfiles%20%20%20%20%20%20%20%20%20%20%20%20csi.trident.netapp.io%20%20%20%20%20%20Delete%20%20%20%20%20%20%20%20%20%20Immediate%20%20%20%20%20%20%20%20%20%20%20%20%20%20false%0Amanaged-premium%20(default)%20%20%20kubernetes.io%2Fazure-disk%20%20%20Delete%20%20%20%20%20%20%20%20%20%20WaitForFirstConsumer%20%20%20true%0A%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20here%20the%20magic%20comes%3A%20when%20a%20Persistent%20Volume%20Claim%20is%20created%20and%20associated%20to%20that%20storage%20class%2C%20an%20ANF%20volume%20will%20be%20instantiated%20too%2C%20matching%20the%20parameters%20specified%20in%20the%20PVC.%20To%20create%20the%20PVC%20I%20will%20stick%20to%20Sean%E2%80%99s%20example%2C%20with%20a%20100%20GiB%20volume%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22wp-block-preformatted%22%3E%23%20Create%20PVC%0A%23%20Credits%20to%20https%3A%2F%2Fgithub.com%2Fseanluce%2FANF_Trident_AKS%0Acat%20%26lt%3B%26lt%3BEOF%20%7C%20kubectl%20apply%20-f%20-%0Akind%3A%20PersistentVolumeClaim%0AapiVersion%3A%20v1%0Ametadata%3A%0A%20%20name%3A%20azurenetappfiles%0Aspec%3A%0A%20%20accessModes%3A%0A%20%20%20%20-%20ReadWriteMany%0A%20%20resources%3A%0A%20%20%20%20requests%3A%0A%20%20%20%20%20%20storage%3A%20100Gi%0A%20%20storageClassName%3A%20azurenetappfiles%0AEOF%0A%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20PVC%20is%20now%20visible%20in%20OpenShift%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%24%20kubectl%20get%20pvc%0ANAME%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20STATUS%20%20%20VOLUME%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20CAPACITY%20%20%20ACCESS%20MODES%20%20%20STORAGECLASS%20%20%20%20%20%20%20AGE%0Aazurenetappfiles%20%20%20Bound%20%20%20%20pvc-adc0348d-5752-4e44-82c2-8205f39c376d%20%20%20100Gi%20%20%20%20%20%20RWX%20%20%20%20%20%20%20%20%20%20%20%20azurenetappfiles%20%20%208h%0A%3C%2FPRE%3E%0A%3CP%3EAnd%20sure%20enough%2C%20you%20can%20use%20the%20Azure%20Portal%20to%20browse%20your%20account%2C%20pool%2C%20and%20the%20newly%20created%20volume%3A%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorJose%20Moreno_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%20id%3D%22tinyMceEditorJose%20Moreno_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CIMG%20class%3D%22wp-image-2475%22%20src%3D%22https%3A%2F%2F1138blog.files.wordpress.com%2F2021%2F05%2Fimage-28.png%3Fw%3D1024%22%20border%3D%220%22%20alt%3D%22%22%20data-attachment-id%3D%222475%22%20data-permalink%3D%22https%3A%2F%2Fblog.cloudtrooper.net%2Fimage-28-2%2F%22%20data-orig-file%3D%22https%3A%2F%2F1138blog.files.wordpress.com%2F2021%2F05%2Fimage-28.png%22%20data-orig-size%3D%223762%2C1363%22%20data-comments-opened%3D%221%22%20data-image-meta%3D%22%7B%26quot%3Baperture%26quot%3B%3A%26quot%3B0%26quot%3B%2C%26quot%3Bcredit%26quot%3B%3A%26quot%3B%26quot%3B%2C%26quot%3Bcamera%26quot%3B%3A%26quot%3B%26quot%3B%2C%26quot%3Bcaption%26quot%3B%3A%26quot%3B%26quot%3B%2C%26quot%3Bcreated_timestamp%26quot%3B%3A%26quot%3B0%26quot%3B%2C%26quot%3Bcopyright%26quot%3B%3A%26quot%3B%26quot%3B%2C%26quot%3Bfocal_length%26quot%3B%3A%26quot%3B0%26quot%3B%2C%26quot%3Biso%26quot%3B%3A%26quot%3B0%26quot%3B%2C%26quot%3Bshutter_speed%26quot%3B%3A%26quot%3B0%26quot%3B%2C%26quot%3Btitle%26quot%3B%3A%26quot%3B%26quot%3B%2C%26quot%3Borientation%26quot%3B%3A%26quot%3B0%26quot%3B%7D%22%20data-image-title%3D%22image-28%22%20data-image-description%3D%22%22%20data-medium-file%3D%22https%3A%2F%2F1138blog.files.wordpress.com%2F2021%2F05%2Fimage-28.png%3Fw%3D300%22%20data-large-file%3D%22https%3A%2F%2F1138blog.files.wordpress.com%2F2021%2F05%2Fimage-28.png%3Fw%3D710%22%20%2F%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Azure%20CLI%20will%20give%20us%20as%20well%20information%20about%20the%20created%20volume.%20The%20default%20output%20was%20a%20bit%20busy%20and%20didn%E2%80%99t%20fit%20in%20my%20screen%20width%2C%20so%20I%20created%20my%20own%20set%20of%20options%20that%20I%20was%20interested%20in%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%24%20az%20netappfiles%20volume%20list%20-g%20%24rg%20-a%20%24anf_name%20-p%20%24anf_name%20-o%20table%20--query%20'%5B%5D.%7BName%3Aname%2C%20ProvisioningState%3AprovisioningState%2C%20ThroughputMibps%3AthroughputMibps%2C%20ServiceLevel%3AserviceLevel%2C%20Location%3Alocation%7D'%0A%0AName%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ProvisioningState%20%20%20%20ThroughputMibps%20%20%20%20ServiceLevel%20%20%20%20Location%0A--------------------------------------------------------%20%20-------------------%20%20-----------------%20%20--------------%20%20-----------%0Aanf5550%2Fanf5550%2Fpvc-adc0348d-5752-4e44-82c2-8205f39c376d%20%20Succeeded%20%20%20%20%20%20%20%20%20%20%20%201.6%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Standard%20%20%20%20%20%20%20%20northeurope%0A%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInterestingly%20enough%2C%20I%20couldn%E2%80%99t%20see%20the%20volume%20size%20in%20the%20object%20properties%2C%20but%20it%20can%20be%20easily%20inferred%3A%20the%20volume%20is%20Standard%2C%20and%20from%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-netapp-files%2Fazure-netapp-files-service-levels%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20NetApp%20Files%20performance%20tiers%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Ewe%20know%20that%20Standard%20means%2016%20MiB%2Fs%20per%20provisioned%20TiB.%20Hence%2C%201.6%20MiB%2Fs%20means%20100%20GiBs%3A%20Maths%20still%20work!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20used%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fhub.docker.com%2Frepository%2Fdocker%2Ferjosito%2Fsqlapi%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Emy%20sqlapi%20image%3C%2FA%3E%2C%20which%20includes%20a%20rudimentary%20I%2FO%20performance%20benchmark%20tool%20based%20on%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fthodnev%2FMonkeyTest%2Fblob%2Fmaster%2Fmonkeytest.py%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%20code%20by%20thodnev%3C%2FA%3E%2C%20to%20verify%20those%20expected%201.6%20MiB%2Fs%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22wp-block-preformatted%22%3E%23%20Deployment%0Aname%3Dapi%0Acat%20%26lt%3B%26lt%3BEOF%20%7C%20kubectl%20apply%20-f%20-%0AapiVersion%3A%20apps%2Fv1%0Akind%3A%20Deployment%0Ametadata%3A%0A%20%20name%3A%20%24name%0A%20%20labels%3A%0A%20%20%20%20app%3A%20%24name%0A%20%20%20%20deploymethod%3A%20trident%0Aspec%3A%0A%20%20replicas%3A%201%0A%20%20selector%3A%0A%20%20%20%20matchLabels%3A%0A%20%20%20%20%20%20app%3A%20%24name%0A%20%20template%3A%0A%20%20%20%20metadata%3A%0A%20%20%20%20%20%20labels%3A%0A%20%20%20%20%20%20%20%20app%3A%20%24name%0A%20%20%20%20%20%20%20%20deploymethod%3A%20trident%0A%20%20%20%20spec%3A%0A%20%20%20%20%20%20containers%3A%0A%20%20%20%20%20%20-%20name%3A%20%24name%0A%20%20%20%20%20%20%20%20image%3A%20erjosito%2Fsqlapi%3A1.0%0A%20%20%20%20%20%20%20%20ports%3A%0A%20%20%20%20%20%20%20%20-%20containerPort%3A%208080%0A%20%20%20%20%20%20%20%20volumeMounts%3A%0A%20%20%20%20%20%20%20%20-%20name%3A%20disk01%0A%20%20%20%20%20%20%20%20%20%20mountPath%3A%20%2Fmnt%2Fdisk%0A%20%20%20%20%20%20volumes%3A%0A%20%20%20%20%20%20-%20name%3A%20disk01%0A%20%20%20%20%20%20%20%20persistentVolumeClaim%3A%0A%20%20%20%20%20%20%20%20%20%20claimName%3A%20azurenetappfiles%0A---%0AapiVersion%3A%20v1%0Akind%3A%20Service%0Ametadata%3A%0A%20%20labels%3A%0A%20%20%20%20app%3A%20%24name%0A%20%20name%3A%20%24name%0Aspec%3A%0A%20%20ports%3A%0A%20%20-%20port%3A%208080%0A%20%20%20%20protocol%3A%20TCP%0A%20%20%20%20targetPort%3A%208080%0A%20%20selector%3A%0A%20%20%20%20app%3A%20%24name%0A%20%20type%3A%20LoadBalancer%0AEOF%3C%2FPRE%3E%0A%3CP%3EAnd%20here%20the%20results%20of%20the%20I%2FO%20benchmark%20(not%20sure%20about%20why%20the%20read%20bandwidth%20is%2010x%2C%20I%20might%20have%20a%20bug%20in%20the%20I%2FO%20benchmarking%20code%20or%20there%20is%20some%20caching%20involved%20somewhere%2C%20I%20will%20update%20this%20post%20when%20I%20find%20out%20more)%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22wp-block-preformatted%22%3E%E2%9D%AF%20curl%20'http%3A%2F%2F40.127.231.103%3A8080%2Fapi%2Fioperf%3Fsize%3D512%26amp%3Bfile%3D%252Fmnt%252Fdisk%252Fiotest'%3CBR%20%2F%3E%7B%3CBR%20%2F%3E%20%20%22Filepath%22%3A%20%22%2Fmnt%2Fdisk%2Fiotest%22%2C%3CBR%20%2F%3E%20%20%22Read%20IOPS%22%3A%20201567.0%2C%3CBR%20%2F%3E%20%20%22Read%20bandwidth%20in%20MB%2Fs%22%3A%201574.75%2C%3CBR%20%2F%3E%20%20%22Read%20block%20size%20(KB)%22%3A%208%2C%3CBR%20%2F%3E%20%20%22Read%20blocks%22%3A%2065536%2C%3CBR%20%2F%3E%20%20%22Read%20time%20(sec)%22%3A%200.33%2C%3CBR%20%2F%3E%20%20%22Write%20IOPS%22%3A%2013.0%2C%3CBR%20%2F%3E%20%20%3CSTRONG%3E%22Write%20bandwidth%20in%20MB%2Fs%22%3A%201.62%2C%3CBR%20%2F%3E%3C%2FSTRONG%3E%20%20%22Write%20block%20size%20(KB)%22%3A%20128%2C%3CBR%20%2F%3E%20%20%22Write%20time%20(sec)%22%3A%20315.51%2C%3CBR%20%2F%3E%20%20%22Written%20MB%22%3A%20512%2C%3CBR%20%2F%3E%20%20%22Written%20blocks%22%3A%204096%3CBR%20%2F%3E%7D%20%20%3C%2FPRE%3E%0A%3CP%3EWhen%20you%20delete%20the%20application%20from%20OpenShift%2C%20including%20the%20PVC%2C%20the%20Azure%20NetApp%20Files%20will%20disappear%20as%20well%2C%20without%20anybody%20having%20to%20log%20to%20Azure%20to%20do%20anything.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20that%20concludes%20this%20post%2C%20with%20a%20boring%20%E2%80%9Cit%20works%20as%20expected%E2%80%9D.%20Thanks%20for%20reading!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2367351%22%20slang%3D%22en-US%22%3E%3CP%3EAzure%20NetApp%20Files%20is%20a%20reliable%20option%20for%20persistent%20storage%20in%20Azure%20RedHat%20OpenShift%2C%20and%20Trident%20makes%20it%20easier%20to%20use%20than%20ever.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎May 19 2021 07:06 AM
Updated by: