Code Monkey home page Code Monkey logo

netappfiles-powershell-dual-protocol-script-sample's Introduction

page_type languages products description
sample
powershell
azure
azure-netapp-files
This project demonstrates how to create a dual-protocol Volume for Microsoft.NetApp resource provider using PowerShell SDK.

Azure NetAppFiles SDK Sample - Dual-Protocol for PowerShell

This project demonstrates how to create a dual-protocol Volume (uses both SMB/NFSv3 protocol types) for Microsoft.NetApp resource provider using PowerShell SDK.

In this sample application we perform the following operations:

  • Creations
    • Azure NetApp Files Account
    • Capacity Pool
    • Dual-Protocol Volume
  • Deletions
    • Dual-Protocol Volume
    • Capacity Pool
    • Azure NetApp Files Account

Note: The cleanup execution is disabled by default. If you want to run this end to end with the cleanup, please change value of boolean variable 'CleanupResources' in CreateANFDualProtocolVolume.ps1

If you don't already have a Microsoft Azure subscription, you can get a FREE trial account here.

Prerequisites

  1. Azure Subscription
  2. Subscription needs to have Azure NetApp Files resource provider registered. For more information, see Register for NetApp Resource Provider.
  3. Make sure you comply with the dual-protocol items described here before you proceed.
  4. Have the Root CA certificate used by the AD Domain Controller and the Windows clients exported as Base64 encoded X.509 certificate file. If unsure, steps 2-3 in this document shows how to export the certificate. Make sure this file is stored at the root of the project.
  5. Resource Group created
  6. Virtual Network with a delegated subnet to Microsoft.Netapp/volumes resource. For more information, please refer to Guidelines for Azure NetApp Files network planning

What is netappfiles-powershell-dual-protocol-script-sample doing?

This sample is dedicated to demonstrate how to create a dual-protocol Volume using an ANF Account name in Azure NetApp Files. Dual-protocol volumes use both SMB and NFS protocol types. ANF Account with an Active Directory object using the Root CA certificate mentioned in the prerequisites section. Then a capacity pool is created, and finally a single dual-protocol volume using Standard service level tier.

There is a section in the code dedicated to remove created resources. By default this script will not remove all created resources; this behavior is controlled by a boolean variable called 'CleanupResources' in the CreateANFDualProtocolVolume.ps1 class. If you want to erase all resources right after the creation operations, set this variable to 'true'. If any of the earlier operations fail for any reason, the cleanup of resources will have to be done manually.

How the project is structured

The following table describes all files within this solution:

Folder FileName Description
Root CreateANFDualProtocolVolume.ps1 Authenticates and executes all operations

How to run the console application

  1. Clone it locally
    git clone https://github.com/Azure-Samples/netappfiles-powershell-dual-protocol-script-sample.git
  2. Change folder to .netappfiles-powershell-dual-protocol-script-sample\src
  3. Open CreateANFDualProtocolVolume.ps1 and edit all the parameters
    • Save and close
    • Run the following command
    CreateANFDualProtocolVolume.ps1

Sample output e2e execution

References

netappfiles-powershell-dual-protocol-script-sample's People

Contributors

adelghabb avatar adelghabboun avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.