Mainframe Storage

 View Only

DS8000 Automation with Python and Ansible - DS8000 officially in Ansible Galaxy!!!!

By Randy Blea posted Wed March 30, 2022 09:41 PM

  

Checkout the DS8000 Ansible Collection in Galaxy!!!!




https://higherlogicdownload.s3.amazonaws.com/IMWUC/UploadedImages/d5d5d759-cab6-4adb-ae53-b03967a4252d/CSM628/line.png

Why Ansible and DS8900F?

Red Hat Ansible is an Automation platform that help provide customers a way to automate the management of their entire enterprise environment.  From servers to storage, customers can now create custom playbooks that help lower management costs, as well as prevent user errors that can occur when having to manually make changes across a large environment.  Based on an open source framework, a growing number of customers are now adopting Ansible to help automate their workload while simultaneously being able to take advantage of contributions by other companies attempting to perform the same actions. 

DS8000 family customers are no exception.  Configuring, managing and monitoring a high end storage system like the DS8900F can take up a lot of time and resources.  Imagine being able to clone a DS8000 configuration for purposes of replication, or even to upgrade a replacement storage system, all with a simple click of the button.  The future capabilities of an Ansible driven framework could empower customers to dynamically manage their environment and minimize resource.

On top of that, IBM is very invested in Ansible.  Take some time to check out the already extensive Ansible support for IBM Z.   Creating an official Ansible collection for the DS8000 family further helps IBM drive the zSynergy across storage and z systems, providing you the very best for your mainframe environment. 


https://higherlogicdownload.s3.amazonaws.com/IMWUC/UploadedImages/d5d5d759-cab6-4adb-ae53-b03967a4252d/CSM628/line.png

How does the DS8000 Ansible Collection work?

The DS8000 Ansible Collection is made up of multiple components, each component making up the full solution.

The DS8000 Ansible Collecton

The DS8000 Ansible collection is a setup of python based modules that allow for management of various components on the DS8000, such as volumes and host mappings.  The collection is located at the following link in Ansible Galaxy in the ibm namespace.

https://galaxy.ansible.com/ibm/ds8000

Customers can install this collection into their Ansible environment directly from Galaxy in order to start creating playbooks.  Galaxy is an open source community of collections available for use. 

NOTE: This collection is not yet available in Ansible Automation Hub.

The DS8000 Python library

The DS8000 Python library is designed as a set of python modules providing a set interfaces that will make RESTAPI calls directly into the DS8000.  The modules in the DS8000 Ansible Collection use the DS8000 python library so that they do not have to explicitly code to or know how to make REST calls to the DS8000. 

This layer of abstraction allows customers to not only use the DS8000 Ansible Collection, but any framework based on Python could import the library and use the same calls.  In other words, if you like Ansible, great!  But...feel free to use the python library directly as well!

The DS8000 Python library has been out there for awhile but has been updated to support the first drop of the Ansible Collection. 

Use the v1.4.0 of the python library with Ansible.  Find the Python DS8000 library at the following location:

https://github.com/IBM/pyds8k/tree/v1.4.0

The DS8000 REST interface

The DS8000 has a RESTful interface available on the DS8000 HMC.  The beauty of the REST interface is that it requires NO client code to be installed on an automation server.  The interface uses HTTP based GET/PUT/POST,etc commands that minimize compatibility issues typically seen with client installations. 

Similar to the python interface, the REST interface can be called directly as well but any automation component.  Don't have Ansible, great.  Don't use python, great.  Call the REST interface directly by whatever automation tooling you use!

See the following documentation on the DS8000 REST interface.

https://www.ibm.com/docs/en/ds8900/9.0.2?topic=reference-restful-api


The following is an example of the customer flow in setting up and using Ansible for DS8000.



https://higherlogicdownload.s3.amazonaws.com/IMWUC/UploadedImages/d5d5d759-cab6-4adb-ae53-b03967a4252d/CSM628/line.png

What features are currently supported?

So what exactly can you do with the Ansible interface today.  Well this is the v1.0.0 version of the DS8000 Ansible collection and does have some limitations.  The collection is based on the existing DS8000 python library which was created to support the Container Storage Interface (CSI) for DS8000 block storage.  The IBM® block storage CSI driver is leveraged by Kubernetes persistent volumes (PVs) to dynamically provision for block storage used with stateful containers.  Read more about the CSI driver here

The use cases for CSI though are driven more from a Distributed block storage view and not that of a typical mainframe customer.  For example, Distributed customers do no care typically what Logical Storage System (LSS) the volumes are created on, and so the interface simply creates the volumes.  Mainframe customers however, are apt to separate their volumes across specific LSSs. 

So if you're a mainframe customer, the collection might not be ready for you.  But....rest assured, we're working on more scenarios in the future, including looking at automation from a mainframe viewpoint as well.

Some of the features of the collection are the following: 
Querying volumes
Creating volumes
Deleting volumes
Querying host mappings to volumes
Managing host ports
Managing DS8000 hosts
and more...

https://higherlogicdownload.s3.amazonaws.com/IMWUC/UploadedImages/d5d5d759-cab6-4adb-ae53-b03967a4252d/CSM628/line.png

How to install the DS8000 collection

Now that DS8000 is in Galaxy, installing is pretty simple.  Run the following command in ansible to install the collection from Galaxy (see documentation for further detaiils.

ansible-galaxy collection install ibm.ds8000

The collection does require the DS8000 python library as indicated earlier, however, to make this easier on you, pyds8k v1.4.0 has been uploaded as a package to pypi allowing you to install the package.  Do a pip install using the pyds8k package.  https://pypi.org/project/pyds8k/

And that's it!  Start creating your yml playbooks to automate your environment.


https://higherlogicdownload.s3.amazonaws.com/IMWUC/UploadedImages/d5d5d759-cab6-4adb-ae53-b03967a4252d/CSM628/line.png

Shout Outs


Just want to take a moment to thank a few people/groups for help in reaching this milestone and setting us up for future enhancements.

The pyds8k python library was started by another team.  Our team took over from where they left off.  A big shout out to those who are still at IBM or may have left who started this project allowing us to create the v1.4.0 version.

The Ansible collection was started based off the pyds8k library, but was never officially completed.  But we took over this effort as well, allowing us to make significant progress and finally now deliver v1.0.0.

Both of the above frameworks will be the basis for future improvements.

Also want to make a person shout out to both Justin Cripps and Percy SHI at IBM, for their dedication to this solution.  As well as the rest of the DS8000 automation team who have been meeting regularly to plan out and execute on an automation strategy for DS8000.



#IBMDS8000#ansible  #Automation







​​​​​​​
0 comments
20 views

Permalink