Sign inSign up

kpapreck/solidfire-ps-powershell-build

By kpapreck

Updated over 8 years ago

Image
1

1.1K

kpapreck/solidfire-ps-powershell-build repository overview

NetApp SolidFire PowerShell Modules Version 1.4.0.98

VMware PowerCLI Core 1.0 build 5327113

Component Versions

VMware vSphere PowerCLI Component 1.22 build 5327113 VMware VDS PowerCLI Component 5.1 build 5327113 VMware VDS PowerCLI Component 1.21 build 5327113

This is an image to be built with minimal customization required. After it is built, you can run it as follows (using the name you gave it during the build process): docker run -it -v $(pwd):/scripts --rm solidfire-ps-powershell bash

To run, type powershell at the command line.

Setup Instructions for Image:

(1) Install Docker (docker.com)

(2) Clone github repository (https://github.com/kpapreck/test-plan) NOTE: If using MacOS, you will need developer tools - xcode-select --install

$ git clone https://github.com/kpapreck/test-plan

(3) Download the latest VMware PowerCLI Core: https://labs.vmware.com/flings/powercli-core or at: wget https://download3.vmware.com/software/vmw-tools/powerclicore/PowerCLI_Core.zip

(4) Copy the PowerCLI_Core.zip into the same directory as the test-plan folder that you cloned (/NetApp/scripts/test-plan): cp PowerCLI_Core.zip $(pwd)/test-plan

(5) Optionally, you can edit the dockerfile named dockerfile-ps-build to un-comment and enter credentials for the Connect-SFCluster and Connect-VIServer commands

$ vi dockerfile-ps-build #RUN echo "connect-sfcluster -target -user -password " >> /opt/microsoft/powershell/6.0.0-alpha.18/profile.ps1 #RUN echo "connect-viserver -server -user -password " >> /opt/microsoft/powershell/6.0.0-alpha.18/profile.ps1

(6) Run the docker build: ./docker-build.sh

(7) This will build your container and start the image. Type powershell to open powershell and run additional scripts: #powershell

NOTE: If it did not automatically open the container image, verify that you have PowerCLI downloaded in the same directory as your scripts where you are running the docker-build.sh command from

For subsequent runs, you can either kick off the script again, or just type the following: docker run -it -v $(pwd):/scripts solidfire-ps-powershell bash

Open PowerShell from the container image: powershell

If you are not connected to the environments, you can type the following: Connect to SolidFire cluster: PS /scripts/test-plan> connect-sfcluster -target -user -password

Connect to vSphere: PS /scripts/test-plan> connect-viserver -server -user -password

Verify scripts are there PS /scripts/test-plan> ls

Instructions for Running Scripts

New-TenantOrCluster-NetAppHCI.ps1 This script will auto-create storage volumes, storage account, assign the volumes to a volume access group, and create VMware datastores for these volumes. This script is pre-created for NetApp HCI which has a Volume Access Group pre-created named NetApp-HCI. If you are using a different VAG group, these lines will need to be updated.

For this script, you first need to pre-load the script by running the first command (. ./New-TenantOrCluster-NetAppHCI.ps1 before calling the function to create the datastores):

PS /scripts/test-plan> . ./New-TenantOrCluster-NetAppHCI.ps1 PS /scripts/test-plan> New-TenantOrCluster -Cluster -Tenant -qtyVolumes -sizeGB -min -max -burst

Example: New-TenantOrCluster -Cluster Compute -Tenant HCI-Auto -qtyVolumes 2 -sizeGB 1024 -min 3000 -max 100000 -burst 100000

change-datastore-qos.ps1 Change a datastore's storage QoS. The script will ask for volume name, minIOPs, maxIOPs, burst IOPs Example: PS /scripts/test-plan> ./change-datastore-qos.ps1

Volume Name: HCI-Auto-02 Min IOPS: 3000 Max IOPS: 4000 Burst IOPS: 20000

datastore-snap.ps1 PS /scripts/test-plan> ./datastore-snap.ps1 Volume Name: Snapshot Name:

get-vol-efficiency.ps1 PS /scripts/test-plan> ./get-vol-efficiency.ps1 Volume Name:

sf-efficiency.ps1 Shows overall storage efficiency metrics PS /scripts/test-plan> ./sf-efficiency.ps1

Create QoS Policy with Postman Link for Postman SolidFire Modules: https://github.com/solidfire/postman

CreateQoSPolicy Create environment with key: MVIP and the IP of the Management VIP of the cluster Select the newly created environment to run API calls against it Use basic authentication Edit Body as required

Example: { "method": "CreateQoSPolicy", "params": { "name": "kp101", "qos": { "minIOPS": 2000, "maxIOPS": 150000, "burstIOPS": 200000 } }, "id": 1 }

Create Volume Clone with Postman CloneVolume Select the NetApp HCI environment that you created to run API calls against it Use basic authentication Edit Body as required Example: { "method": "CloneVolume", "params": { "volumeID": 397, "name": "hcibenchclone1", "attributes": {} }, "id": 1 }

Tag summary

Content type

Image

Digest

Size

218.5 MB

Last updated

over 8 years ago

docker pull kpapreck/solidfire-ps-powershell-build