Par défaut

Interview by Erwan Quelin: made in Nantes develops scripts for UNITY Dell EMC arrays.

Interview with Erwan Quelin about the development of his PowerShell module

Erwan, based in Nantes, has been a Systems engineer at Cheops Technology for 6 years. He works in multiple ways with a wide variety of clients in the Western region. A specialist in virtualization with VMware products and in storage using the VNX, Unity and VPLEX product families from Dell EMC, Erwan is certified as a VMware Certified Professional-Data center virtualization 4, 5 and 6 and as an EMC Implementation Engineer-VNX and Unity, and has recently joined the vExpert VMWare program and Dell EMC Elect for the year 2017.

Erwan, could you tell us a little more about the development of this script?

Automation of the IT system is a major topic which is not limited only to GAFA. As part of my service and my work I always try to automate tasks which can sometimes be repetitive but necessary to create a storage array or a virtualization infrastructure in an optimal and permanent way. This has created a real time savings on tasks that bring no added value for my customers (like creating X LUNs…) and also ensures me consistency in my deployments, for example, by ensuring such that both arrays are configured strictly identically.

When Dell EMC released Unity arrays on the market, I quickly took an interest in the fact that they had a RESTFul API which makes it possible to administer them via simple http requests. Having noticed this, I started developing a PowerShell module which would make it possible to fully administer EMC Unity arrays from the command line.


Can you give us more details about this module?

Before we get into the details of the Unity-PowerShell module, it may be necessary to explain what PowerShell is and why it is interesting compared with other languages.

PowerShell is both a scripting language based on .NET and an online command interface. It is developed by Microsoft and replaces the venerable cmd.exe console, providing additional commands to manage any type of compatible device.

PowerShell is of course mainly used to manage the Microsoft ecosystem (Windows Server, Exchange, SharePoint, etc.) ecosystem, but some vendors make additional commands available in the form of modules to administer their product.

One of the most popular extensions is PowerCLI. This is developed by VMware, and uses the PowerShell command line to administer a range of products from the vendor (vSphere ESXi, vSphere vCenter, etc.). A few months ago, Microsoft made the PowerShell project Open Source, and extended it to the Linux and Mac OS operating systems.

So what does ‘cmdlet’ mean?

PowerShell commands are called Commandlets. When launched unilaterally, they can be used to execute a specific action, such as the Get-Service command, which, as its name indicates, is used to view information about Windows services.

In your opinion, what differentiates PowerShell from its peers?

What makes PowerShell powerful and easy to use is the concepts of object and pipeline. The Get-Service command doesn’t just display text, but generates an object that can be manipulated (for example by applying a filter to show only started services), or to pipe the output into another command. The command below can be used to restart the DnsCache service online:

> Get-Service -Name DnsCache | Restart Service

By adding a little logic with If arguments and other loops, it is possible to develop powerful scripts that can be used to administer a system much more easily.


What is your script used for exactly?

The Unity-PowerShell module has been developed using the same mechanisms. It allows administrators to retrieve information about one or more Unity arrays and to configure them. When a LUN is created, which requires more than ten clicks, the module can be used to perform the same operation with a single command line, and to do this consistently for each LUN created.

The module can be used on any Windows desktop or server as soon as PowerShell 5 is available. It is possible (and recommended) to download and activate the module with the following commands:


> Install Module -Name Unity-PowerShell -Scope Current User
> Import-Module -Name Unity PowerShell

When the module is available, the new commands it provides can be listed:

If in doubt, help is available for each command:

> Get-Help -Name Get-UnityPool

Now we have an overview of the subject, let’s get into the meat of the matter and connect to a Unity array. You will need to know its FQDN or IP address and a username and password.

> connect-Unity -Server unity01.okcomputer.lab

If everything goes well, the command will display information to you about the array you are connected to, such as such as the name and model, for example. Now let’s try to retrieve information concerning storage pools. The commands used to query an array all start with GET. Logically enough, you can list the pools with the following command:

> Get-UnityPool

It is possible to limit your search to a specific pool.

In these commands we can see an important part of the operation of unity: IDs. Each item is listed not by name but by a unique ID. Consequently, this ID is used in virtually all commands with the module.

For example, if you want to add a description to the first pool, you need to populate the command Set-Unity Pool with the ID ‘pool_1’:

> Set-UnityPool -ID ‘pool_1’ -Description ‘Pool avec FastVP active’

We have seen that with a little practice, these commands are relatively easy to use and can be used advantageously instead of the graphical user interface. The module is developed in PowerShell will give you the ability to integrate it in scripts, which can be used, for example, to create multiple LUNs at a time, then automatically present them to the servers concerned. You could also develop a script to automatically increase the size of a LUN based on criteria that you define.

By using other existing as PowerShell modules, such as Pester (https://github.com/pester/pester), it is possible to define a testing framework which you might use to make sure that your Unity arrays are always configured according to a pre-designed mold.

It would be difficult to describe all possible use cases since the possibilities are great.

I hope this article will help you see the attraction of using the Unity-PowerShell module to administer your Unity arrays, and that it will make you want to take it further. The module is still in development and is open to all contributions, if you feel the desire to write code and documentation, report a bug or simply to provide feedback on the module.

Don’t hesitate to contact Erwan on Twitter:

or on GitHub: https://github.com/equelin

Address of Unity-PowerShell project: https://github.com/equelin/unity-PowerShell

Documentation: http://Unity-PowerShell.readthedocs.IO/en/latest/?badge=latest

Unity-Powershell : Les premiers pas vers l’automatisation

Par défaut

Interview d’Erwan Quelin : made in Nantes développe des scripts pour les baies UNITY Dell EMC.

Entretien avec Erwan Quélin sur le développement de ton module PowerShell

Basé sur Nantes, Erwan est depuis près de 6 ans Ingénieur Systèmes chez Cheops Technology. Ses interventions sont multiples et auprès de clients très diversifiés dans la région Ouest. Spécialisé dans la virtualisation autour des produits VMware et dans le stockage autour des gammes VNX, Unity et VPLEX de Dell EMC, Erwan est certifié VMware Certified Professional – Datacenter virtualization 4, 5 et 6 ainsi que EMC Implementation Engineer – VNX et Unity et vient d’intégrer le programme VMware vExpert et Dell EMC Elect pour l’année 2017.

Erwan, pourrais tu nous en dire un peu plus sur le développement de ce script ?

L’automatisation du système d’information est un sujet prépondérant qui ne s’inscrit pas uniquement au sein des GAFA. Dans le cadre de mes missions et de mes prestations  je cherche systématiquement à automatiser de façon optimum et permanente les tâches parfois répétitives mais nécessaires à la mise en place d’une baie de stockage ou d’une infrastructure de virtualisation. Cela génère un véritable gain de temps sur des tâches qui n’ont pas de valeur ajoutée pour mes clients (comme créer X LUN…) et me garantit également une cohérence dans mes déploiements en m’assurant par exemple que deux baies sont configurées strictement de manière identique.

Lorsque Dell EMC a mis sur le marché les baies Unity, je me suis rapidement intéressé au fait qu’elles disposaient d’API RESTFul qui permettait de les administrer via de simples requêtes http. Face à ce constat, je me suis lancé dans le développement d’un module PowerShell qui permettra d’administrer entièrement les baies EMC Unity en ligne de commande.


Tu nous donnes plus de détails sur ce module ?

Avant de rentrer dans les détails du module Unity-Powershell, il est peut-être nécessaire d’expliquer ce qu’est PowerShell et quel est son intérêt par rapport aux autres langages.

PowerShell est à la fois un langage de scripting basé sur .NET ainsi qu’une interface en ligne de commande. Il est développé par Microsoft et vient remplacer la vénérable console cmd.exe en proposant des commandes supplémentaires permettant de gérer tout type d’équipements compatibles.

PowerShell est bien évidemment principalement utilisé pour manager l’écosystème Microsoft (Windows Server, Exchange, Sharepoint…) mais certains éditeurs mettent à disposition des commandes supplémentaires sous la forme de modules pour administrer leur produit.

Une des extensions les plus connues est PowerCLI. Développée par VMware, elle permet d’administrer via des lignes de commandes PowerShell tout un ensemble de produits de l’éditeur (vSphere ESXi, vSphere vCenter,…). Il y a quelques mois, Microsoft a rendu le projet PowerShell Open Source et il l’a porté sur les systèmes d’exploitation Linux et Mac OS.

Que signifie alors cmdlet’s ?

Les commandes PowerShell sont appelées Commandlets. Lancées unitairement,  elles permettent d’exécuter une action précise, comme par exemple la commande Get-Service qui comme son nom l’indique permet d’afficher des informations concernant les services Windows.

Selon toi, en quoi Powershell se différencie de ses homologues  ?

Lire la suite