Commvault / ansible

Ansible Library for Commvault
21 stars 11 forks source link
ansible automation commvault devops infrastructure-as-code

Ansible Commvault module

Ansible <https://www.ansible.com/>_ is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

How Ansible Works | Ansible.com <https://www.ansible.com/overview/how-ansible-works>_

Getting started with Ansible <https://www.linode.com/docs/applications/configuration-management/getting-started-with-ansible/>_

Getting started with playbooks <https://www.digitalocean.com/community/tutorials/configuration-management-101-writing-ansible-playbooks>_

Introduction

Ansible Commvault module can be used in playbooks to automate commvault operations

Commvault module uses CVPySDK <https://github.com/CommvaultEngg/cvpysdk>_ to perform operations

All agents supported by CVPySDK are supported by commvault ansible module

CVPySDK, in turn, uses Commvault REST API to perform operations on a Commcell via WebConsole.

Requirements

Installing CVPySDK

CVPySDK can be installed directly from PyPI using pip:

>>> pip install cvpysdk

CVPySDK is available on GitHub here <https://github.com/CommvaultEngg/cvpysdk>_

It can also be installed from source.

After downloading, from within the cvpysdk directory, execute:

>>> python setup.py install

Installing Ansible

Using Ansible commvault module

Login to Commcell: ::


Force HTTPS login using self-signed certificate ::

Run backup for a subclient: ::

Run restore in place job for a subclient: ::

Wait for the restore job to complete: ::

Get storage pool properties: ::

Explanation:

operation corresponds to a method name in CVPySDK modules, example "restore_in_place" method is in subclient.py module

entity_type corresponds to baisc CVPySDK class, available options are

commcell is mandatory to perform any tasks, when performing login operation commcell is registered and can later be used in other tasks

entity will contain basic CVPySDK inputs, available options are

args contains the arguments to be passed to the method

Contribution Guidelines

. We welcome all the enhancements from everyone although we request the developer to follow some guidelines while interacting with the Ansible commvault module codebase.

. Before adding any enhancements/bug-fixes, we request you to open an Issue first.

. The core team will go over the Issue and notify if it is required or already been worked on.

. If the Issue is approved, the contributor can then make the changes to their fork and open a pull request.

Coding Considerations


Questions/Comments/Suggestions

If you have any questions or comments, please contact us here <https://ma.commvault.com/>. Also Check out our community for Automation <https://community.commvault.com/developer-tools-integration-and-automation-workflow-rest-powershell-etc-50> incase of queries.

Code of Conduct


Everyone interacting in the Ansible commvault module project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct_.

.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/

License

CVPySDK and Commvault ansible module are licensed under Apache 2.0 <https://raw.githubusercontent.com/CommvaultEngg/cvpysdk/master/LICENSE.txt>_

About Commvault

.. image:: https://commvault.github.io/cvpysdk/logo.png :align: center

|

Commvault <https://www.commvault.com/>_ (NASDAQ: CVLT) is a publicly-traded data protection and information management software company headquartered in Tinton Falls, New Jersey.

It was formed in 1988 as a development group in Bell Labs, and later became a business unit of AT&T Network Systems. It was incorporated in 1996.

Commvault software assists organizations with data backup and recovery, cloud and infrastructure management, and retention and compliance.