Skip to content

Commit

Permalink
RTS version 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dattaarindam committed Jun 25, 2021
1 parent 9461262 commit 8950d1c
Show file tree
Hide file tree
Showing 39 changed files with 9,842 additions and 2,251 deletions.
25 changes: 25 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ansible-powerstore Change Log
## Version 1.2.0 - released on 25/06/2021
- Added CRUD operations for replication rule.
- Replication session module is added to get the details and modify state of replication session.
- Protection policy module is enhanced to add/remove replication rule to/from protection policy.
- Gather facts module is enhanced to list remote systems, replication rules and replication sessions.

## Version 1.1.0 - released on 25/09/2020
- Added CRUD operations for filesystem.
- Added CRUD operations for NFS export.
- Added CRUD operations for SMB share.
- Added CRUD operations for quota.
- Added CRUD operations for filesystem snapshot.
- NAS server module is added to get and modify NAS server attributes.
- Gather facts module is enhanced to list filesystems, NAS servers, NFS exports, SMB shares, tree quotas, user quotas.

## Version 1.0.0 - released on 06/05/2020
- Added CRUD operations for volume.
- Added CRUD operations for volume group.
- Added CRUD operations for host.
- Added CRUD operations for host group.
- Added CRUD operations for volume and volume group snapshot.
- Added CRUD operations for snapshot rule.
- Added CRUD operations for protection policy.
- Gather facts module is added to list nodes, volumes, volume groups, hosts, host groups, snapshot rules, protection policies.
87 changes: 44 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Ansible Modules for Dell EMC PowerStore
The Ansible Modules for Dell EMC PowerStore allow Data Center and IT administrators to use RedHat Ansible to automate and orchestrate the configuration and management of Dell EMC PowerStore arrays.

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

The capabilities of the Ansible modules are managing volumes, volume groups, hosts, host groups, snapshots, snapshot rules, protection policies, file systems, nas servers, smb shares, user and tree quotas, file system snapshots and nfs exports; 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 volumes, volume groups, hosts, host groups, snapshots, snapshot rules, replication rules, replication sessions, protection policies, file systems, NAS servers, SMB shares, user and tree quotas, file system snapshots and NFS exports. It also allows the capability 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 PowerStore 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 PowerStore Arrays version 1.0
* Dell EMC PowerStore Arrays version 1.0, 2.0

## Prerequisites
* Ansible 2.8 or higher
* Python 2.7 or higher
* Ansible 2.9, 2.10
* Python 3.5, 3.6, 3.7, 3.8
* Red Hat Enterprise Linux 7.6, 7.7, 7.8, 8.2
* Python Library for PowerStore version 1.2
* Python Library for PowerStore version 1.3.0 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.
Expand All @@ -28,56 +27,58 @@ The modules are written in such a way that all requests are idempotent and hence
* Host group module
* Snapshot module
* Snapshot rule module
* Replication rule module
* Replication session module
* Protection policy module
* Gather facts module
* File system module
* NAS server module
* SMB module
* SMB share module
* Quota module
* File system snapshot module
* NFS module
* NFS export module

## Installation of SDK
1. Clone the repo using command: git clone https://github.com/dell/python-powerstore
2. Go to the root directory of setup
1. Clone the repo using the command:

git clone https://github.com/dell/python-powerstore/tree/1.3.0

2. Go to the root directory of setup.
3. Execute the following command:<br/>
pip install .

pip install .

## Installation of Ansible Modules
## Installing Collections
1. Download the tar build and use the following command to install the collection anywhere in your system:

ansible-galaxy collection install dellemc-powerstore-1.2.0.tar.gz -p <install_path>

* Clone the latest development repository and install the ansible modules.
git clone https://github.com/dell/ansible-powerstore
2. Set the environemnt variable:
export ANSIBLE_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS:<install_path>

cd ansible-powerstore/dellemc_ansible

### For python 2.7 environment
* Create folder 'dellemc' at '/usr/lib/python2.7/site-packages/ansible/modules/storage/' if it doesnot exist.
* Create folder 'dell' at '/usr/lib/python2.7/site-packages/ansible/module_utils/storage' if it doesnot exist.
* Copy 'utils/dellemc_ansible_powerstore_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' if it doesnot exist.
* Copy all module Python files in the 'powerstore/library' folder to /usr/lib/python2.7/site-packages/ansible/modules/storage/dellemc/
* Copy dellemc_powerstore.py from /doc_fragments folder 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.
* Create folder 'dellemc' at '/usr/lib/python3.5/site-packages/ansible/modules/storage/' if it doesnot exist.
* Copy 'utils/dellemc_ansible_powerstore_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' if it doesnot exist.
* Copy all module Python files in the 'powerstore/library' folder to /usr/lib/python3.5/site-packages/ansible/modules/storage/dellemc/
* Copy dellemc_powerstore.py from /doc_fragments folder to /usr/lib/python3.5/site-packages/ansible/plugins/doc_fragments/
## Using Collections
1. In order to use any Ansible module, ensure that the importing of a proper FQCN(Fully Qualified Collection Name) must be embedded in the playbook. Refer to the followig example:
<br>collections:
<br>&nbsp;&nbsp;&nbsp;- dellemc.powerstore

2. For generating Ansible documentaion for a specific module, embed the FQCN before the module name. Refer to the following example:

ansible-doc dellemc.powerstore.dellemc_powerstore_gatherfacts

## SSL Certificate Validation
* Export the SSL certificate from the intended storage array in .crt format.
* Copy the certificate to this "/usr/local/share/ca-certificates" path of the host.
* 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>>"
## Running Ansible Modules
The Ansible server must be configured with Python library for PowerStore to run the Ansible playbooks. The [Documents]( https://github.com/dell/ansible-powerstore/tree/1.2.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.

## Documentation
Check documentation from each module's file in /ansible-powerstore/dellemc_ansible/docs/

## Examples
Check examples from each module's file in /ansible-powerstore/dellemc_ansible/powerstore/library/
## SSL Certificate Validation
1. Copy the CA certificate to this "/etc/pki/ca-trust/source/anchors" path of the host by any external means.
2.Set the "REQUESTS_CA_BUNDLE" environment variable to the path of the SSL certificate using the following command:

export REQUESTS_CA_BUNDLE=/etc/pki/ca-trust/source/anchors/<<Certificate_Name>>
3. Import the SSL certificate to host using the following 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.
Each module returns the updated state and details of the entity.
For example, if you are using the group module, all calls will return the updated details of the group.
Sample result is shown in each module's documentation.
Binary file added dellemc-powerstore-1.2.0.tar.gz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 8950d1c

Please sign in to comment.