Skip to content

Commit

Permalink
Merge pull request #1 from dell/rel1.1
Browse files Browse the repository at this point in the history
Release version 1.1
  • Loading branch information
anil-degwekar authored Dec 11, 2020
2 parents 2d28f81 + a64e713 commit 5d3c049
Show file tree
Hide file tree
Showing 23 changed files with 13,957 additions and 423 deletions.
86 changes: 43 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,73 @@

The Ansible Modules for Dell EMC Unity allow Data Center and IT administrators to use RedHat Ansible to automate and orchestrate the configuartion and management of Dell EMC Unity arrays.

The capabilities of the Ansible modules are managing volumes, consistency groups, storage pools, hosts, snapshots and snapshot schedules; and to gather facts from the array. The options available for each are list, show, create, modify and delete. These tasks can be executed by running simple playbooks written in yaml syntax. The modules are written so that all the operations are idempotent, so making multiple identical requests has the same effect as making a single request.
The capabilities of the Ansible modules are managing consistency groups, filesystem, filesystem snapshots, NAS server, NFS export, SMB share, hosts, snapshots, snapshot schedules, storage pools and volumes; and to gather facts from the array. The options available for each are list, show, create, modify and delete. These tasks can be executed by running simple playbooks written in yaml syntax. The modules are written so that all the operations are idempotent, so making multiple identical requests has the same effect as making a single request.

## Support
Ansible modules for Unity are supported by Dell EMC and are provided under the terms of the license attached to the source code. Dell EMC does not provide support for any source code modifications. For any Ansible module issues, questions or feedback, join the [Dell EMC Automation community](https://www.dell.com/community/Automation/bd-p/Automation).

## Supported Platforms
* Dell EMC Unity Arrays version 5.0

## Prerequisites
* Ansible 2.7 or higher
* Python >= 2.7.12
* Red Hat Enterprise Linux 7.5, 7.6
* Python Library for Unity storops version 1.2.5 or higher
* Ansible 2.9 or higher
* Python 2.8 or higher
* Red Hat Enterprise Linux 7.6, 7.7, 7.8, 8.2
* Python Library for Unity storops version 1.2.8 or higher

## Idempotency
The modules are written in such a way that all requests are idempotent and hence fault-tolerant. It essentially means that the result of a successfully performed request is independent of the number of times it is executed.

## List of Ansible Modules for Dell EMC Unity
* Volume module
* Consistency group module
* Storage pool module
* Filesystem module
* Filesystem snapshot module
* Gather facts module
* Host module
* NAS server module
* NFS export module
* SMB share module
* Snapshot module
* Snapshot schedule module
* Gather facts module
* Storage pool module
* Volume module

## Installation of SDK
Install python sdk named 'storops'. It can be installed using pip , based on appropriate python version.
Install python sdk named 'storops'. It can be installed using pip, based on appropriate python version.

## Installation of Ansible Modules
pip install storops

* Clone the latest development repository and install the ansible modules.

git clone https://github.com/dell/ansible-unity.git
## Installing Collections
* Download the tar build and follow the below command to install the collection anywhere in your system:

ansible-galaxy collection install dellemc-unity-1.1.0.tar.gz -p ./collections
* Set the environment variable:

cd ansible-unity/dellemc_ansible

### For python 2.7 environment
* Create folder 'dell' at '/usr/lib/python2.7/site-packages/ansible/module_utils/storage' if it doesnot exist.
* Copy 'utils/dellemc_ansible_unity_utils.py' to '/usr/lib/python2.7/site-packages/ansible/module_utils/storage/dell'
* Copy 'utils/\_\_init\_\_.py' to '/usr/lib/python2.7/site-packages/ansible/module_utils/storage/dell'
* Copy all module Python files in the 'unity/library' folder to '/usr/lib/python2.7/site-packages/ansible/modules/storage/dellemc/'
* Copy 'doc_fragments/dellemc_unity.py' to '/usr/lib/python2.7/site-packages/ansible/plugins/doc_fragments/'
### For python 3.5 environment
* Create folder 'dell' at '/usr/lib/python3.5/site-packages/ansible/module_utils/storage' if it doesnot exist.
* Copy 'utils/dellemc_ansible_unity_utils.py' to '/usr/lib/python3.5/site-packages/ansible/module_utils/storage/dell'
* Copy 'utils/\_\_init\_\_.py' to '/usr/lib/python3.5/site-packages/ansible/module_utils/storage/dell'
* Copy all module Python files in the 'unity/library' folder to '/usr/lib/python3.5/site-packages/ansible/modules/storage/dellemc/'
* Copy 'doc_fragments/dellemc_unity.py' to '/usr/lib/python3.5/site-packages/ansible/plugins/doc_fragments/'
export ANSIBLE_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS:<install_path>/collections

## Using Collections

* In order to use any Ansible module, ensure that the importing of proper FQCN(Fully Qualified Collection Name) must be embedded in the playbook.
Below example can be referred

collections:
- dellemc.unity

## SSL Certificate Validation

* For generating Ansible documentaion for a specific module, embed the FQCN  before the module name. Below example can be referred.

ansible-doc dellemc.unity.dellemc_unity_gatherfacts

**NOTE**: These modules are supported through CA certified certificate only, however self-signed certificate is not supported.
## Running Ansible Modules
The Ansible server must be configured with Python library for Unity to run the Ansible playbooks. The [Documents]( https://github.com/dell/ansible-unity/tree/1.1.0/dellemc_ansible/docs ) provide information on different Ansible modules along with their functions and syntax. The parameters table in the Product Guide provides information on various parameters which needs to be configured before running the modules.

* Copy the CA certificate to this "/usr/local/share/ca-certificates" path of the host by any external means.
* Import the SSL certificate to host using the command "sudo update-ca-certificates".
* Set the "REQUESTS_CA_BUNDLE" environment variable to the path of the SSL certificate using the command "export REQUESTS_CA_BUNDLE=/usr/local/share/ca-certificates/<<Certificate_Name>>"
## SSL Certificate Validation

## Documentation
Check documentation from each module's file in /ansible-unity/dellemc_ansible/unity/library/
**NOTE**: These modules are supported through CA certified certificate only, however self-signed certificate is not supported.

## Examples
Check examples from each module's file in /ansible-unity/dellemc_ansible/unity/library/
* Copy the CA certificate to this "/etc/pki/ca-trust/source/anchors" path of the host by any external means.
* Set the "REQUESTS_CA_BUNDLE" environment variable to the path of the SSL certificate using the command "export REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/source/anchors/<<Certificate_Name>>"
* Import the SSL certificate to host using the command "update-ca-trust".

## Results
Each module returns the updated state and details of the entity, For example, if you are using the Volume module, all calls will return the updated details of the volume. Sample result is shown in each module's documentation.

## Support
Ansible for Unity Modules are supported by Dell EMC and are provided under the terms of the license attached to the source code.
For any setup, configuration issues, questions or feedback, join the [Dell EMC Automation community](https://www.dell.com/community/Automation/bd-p/Automation).
For any Dell EMC storage issues, please contact Dell support at: https://www.dell.com/support.
For clarity, Dell EMC does not provide support for any source code modifications.
Each module returns the updated state and details of the entity, For example, if you are using the Volume module, all calls will return the updated details of the volume. Sample result is shown in each module's documentation.
Binary file added dellemc-unity-1.1.0.tar.gz
Binary file not shown.
57 changes: 0 additions & 57 deletions dellemc_ansible/doc_fragments/dellemc_unity.py

This file was deleted.

Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 5d3c049

Please sign in to comment.