Skip to content

Commit

Permalink
Merge pull request #18 from dell/RTSv1.4
Browse files Browse the repository at this point in the history
Ansible modules for PowerFlex release version 1.4.0
  • Loading branch information
Jennifer-John authored Sep 22, 2022
2 parents 5dd53bb + b326b3e commit a023dea
Show file tree
Hide file tree
Showing 28 changed files with 4,068 additions and 583 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ansible-powerflex Change Log

## Version 1.4.0 - released on 27/09/22
- Info module is enhanced to support the listing volumes and storage pools with statistics data​.
- Storage pool module is enhanced to get the details with statistics data​.
- Volume module is enhanced to get the details with statistics data​.
- Added support for 4.0.x release of PowerFlex OS.

## Version 1.3.0 - released on 28/06/22
- Added operations like Add/remove standby mdm, rename mdm, change mdm cluster ownership, switch mdm cluster mode, set performance profile, modify virtual IP interfaces and Get high level details of MDM cluster.
- Added execution environment manifest file to support building an execution environment with ansible-builder.
Expand Down
140 changes: 32 additions & 108 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,126 +4,50 @@ The Ansible Modules for Dell Technologies (Dell) PowerFlex allow Data Center and

The capabilities of the Ansible modules are managing SDCs, volumes, snapshots, storage pools, SDSs, devices, protection domains, MDM cluster, and to gather high level facts from the storage system. The options available 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.

## License
The Ansible collection for PowerFlex is released and licensed under the GPL-3.0 license. See [LICENSE](https://github.com/dell/ansible-powerflex/blob/1.3.0/LICENSE) for the full terms. Ansible modules and modules utilities that are part of the Ansible collection for PowerFlex are released and licensed under the Apache 2.0 license. See [MODULE-LICENSE](https://github.com/dell/ansible-powerflex/blob/1.3.0/MODULE-LICENSE) for the full terms.

## Support
The Ansible collection for PowerFlex is supported by Dell and is provided under the terms of the license attached to the collection. Please see the [LICENSE](#license) section for the full terms. Dell does not provide any support for the source code modifications. For any Ansible modules issues, questions or feedback, join the [Dell Automation Community](https://www.dell.com/community/Automation/bd-p/Automation).
## Table of contents

* [Code of conduct](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/CODE_OF_CONDUCT.md)
* [Maintainer guide](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/MAINTAINER_GUIDE.md)
* [Committer guide](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/COMMITTER_GUIDE.md)
* [Contributing guide](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/CONTRIBUTING.md)
* [Branching strategy](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/BRANCHING.md)
* [List of adopters](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/ADOPTERS.md)
* [Maintainers](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/MAINTAINERS.md)
* [Support](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/SUPPORT.md)
* [License](#license)
* [Security](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/SECURITY.md)
* [Prerequisites](#prerequisites)
* [List of Ansible modules for Dell PowerFlex](#list-of-ansible-modules-for-dell-powerflex)
* [Installation and execution of Ansible modules for Dell PowerFlex](#installation-and-execution-of-ansible-modules-for-dell-powerflex)
* [Maintenance](#maintenance)

## License
The Ansible collection for PowerFlex is released and licensed under the GPL-3.0 license. See [LICENSE](https://github.com/dell/ansible-powerflex/blob/1.4.0/LICENSE) for the full terms. Ansible modules and modules utilities that are part of the Ansible collection for PowerFlex are released and licensed under the Apache 2.0 license. See [MODULE-LICENSE](https://github.com/dell/ansible-powerflex/blob/1.4.0/MODULE-LICENSE) for the full terms.

## Prerequisites

| **Ansible Modules** | **PowerFlex/VxFlex OS Version** | **Red Hat Enterprise Linux**| **SDK version** | **Python version** | **Ansible** |
|---------------------|-----------------------|------------------------------|-------|--------------------|--------------------------|
| v1.3.0 | 3.5, <br> 3.6 |7.9, <br>8.2, <br>8.4, <br>8.5 | 1.4.0 | 3.8.x <br> 3.9.x <br> 3.10.x | 2.11 <br> 2.12 <br> 2.13 |
| v1.4.0 |3.5 <br> 3.6 <br> 4.0 |7.9, <br>8.4, <br>8.5 | 1.4.0 | 3.8.x <br> 3.9.x <br> 3.10.x | 2.11 <br> 2.12 <br> 2.13 |

* Please follow PyPowerFlex installation instructions on [PyPowerFlex Documentation](https://github.com/dell/python-powerflex)

## 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 PowerFlex
* [Info module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#info-module)
* [Snapshot module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#snapshot-module)
* [SDC module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#sdc-module)
* [Storage pool module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#storage-pool-module)
* [Volume module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#volume-module)
* [SDS module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#sds-module)
* [Device Module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#device-module)
* [Protection Domain Module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#protection-domain-module)
* [MDM Cluster Module](https://github.com/dell/ansible-powerflex/blob/1.3.0/docs/Product%20Guide.md#mdm-cluster-module)

## Installation of SDK
* Install the python SDK named [PyPowerFlex](https://pypi.org/project/PyPowerFlex/). It can be installed using pip, based on appropriate python version. Execute this command:

pip install PyPowerFlex
* Alternatively, Clone the repo "https://github.com/dell/python-powerflex"
using command:

git clone https://github.com/dell/python-powerflex.git
* Go to the root directory of setup.
* Execute this command:

pip install .
## Building Collections
* Use this command to build the collection from source code:

ansible-galaxy collection build

For more details on how to build a tar ball, please refer to: [Building the collection](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections_distributing.html#building-your-collection-tarball)

## Installing Collections

#### Online Installation of Collections
* Use this command to install the latest collection hosted in [galaxy portal](https://galaxy.ansible.com/dellemc/powerflex):

ansible-galaxy collection install dellemc.powerflex -p <install_path>

#### Offline Installation of Collections

* Download the latest tar build from any of the available distribution channel [Ansible Galaxy](https://galaxy.ansible.com/dellemc/powerflex) /[Automation Hub](https://console.redhat.com/ansible/automation-hub/repo/published/dellemc/powerflex) and use this command to install the collection anywhere in your system:

ansible-galaxy collection install dellemc-powerflex-1.3.0.tar.gz -p <install_path>

* Set the environment variable:

export ANSIBLE_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS:<install_path>

## 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.
This example can be referred to:

collections:
- dellemc.powerflex

* In order to use installed collection in a specific task use a proper FQCN(Fully Qualified Collection Name). Refer to this example:

tasks:
- name: Get Volume details
dellemc.powerflex.volume

* For generating Ansible documentation for a specific module, embed the FQCN before the module name. Refer to this example:

ansible-doc dellemc.powerflex.volume

## Running Ansible Modules
The Ansible server must be configured with Python library for PowerFlex to run the Ansible playbooks. The [Documents](https://github.com/dell/ansible-powerflex/blob/1.3.0/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.

## SSL Certificate Validation

* Copy the CA certificate to the "/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 extract
* If "TLS CA certificate bundle error" occurs, then follow these steps:

cd /etc/pki/tls/certs/
openssl x509 -in ca-bundle.crt -text -noout

## 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.

## Ansible Execution Environment
Ansible can also be installed in a container environment. Ansible Builder provides the ability to create reproducible, self-contained environments as container images that can be run as Ansible execution environments.
* Install the ansible builder package using:

pip3 install ansible-builder
* Create the execution environment using:

ansible-builder build --tag <tag_name> --container-runtime docker
* After the image is built, run the container using:

docker run -it <tag_name> /bin/bash
* Verify collection installation using command:

ansible-galaxy collection list
* The playbook can be run on the container using:

docker run --rm -v $(pwd):/runner <tag_name> ansible-playbook info_test.yml
## List of Ansible modules for Dell PowerFlex
* [Info module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#info-module)
* [Snapshot module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#snapshot-module)
* [SDC module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#sdc-module)
* [Storage pool module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#storage-pool-module)
* [Volume module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#volume-module)
* [SDS module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#sds-module)
* [Device Module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#device-module)
* [Protection Domain Module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#protection-domain-module)
* [MDM Cluster Module](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/Product%20Guide.md#mdm-cluster-module)

## Installation and execution of Ansible modules for Dell PowerFlex
The installation and execution steps of Ansible modules for Dell PowerFlex can be found [here](https://github.com/dell/ansible-powerflex/blob/1.4.0/docs/INSTALLATION.md)

## Maintenance
Ansible Modules for Dell Technologies PowerFlex deprecation cycle is aligned with [Ansible](https://docs.ansible.com/ansible/latest/dev_guide/module_lifecycle.html).
11 changes: 11 additions & 0 deletions docs/ADOPTERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-->

# List of adopters
32 changes: 32 additions & 0 deletions docs/BRANCHING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-->

# Branching strategy

Ansible modules for Dell PowerFlex follows a scaled trunk branching strategy where short-lived branches are created off of the main branch. When coding is complete, the branch is merged back into main after being approved in a pull request code review.

## Branch naming convention

| Branch Type | Example | Comment |
|--------------|-----------------------------------|-------------------------------------------|
| master | master | |
| Release | release-1.0 | hotfix: release-1.1 patch: release-1.0.1 |
| Feature | feature-9-vol-support | "9" referring to GitHub issue ID |
| Bug Fix | bugfix-110-fix-duplicates-issue | "110" referring to GitHub issue ID |


## Steps for working on a release branch

1. Fork the repository.
2. Create a branch off of the master branch. The branch name should follow [branch naming convention](#branch-naming-convention).
3. Make your changes and commit them to your branch.
4. If other code changes have merged into the upstream master branch, perform a rebase of those changes into your branch.
5. Open a [pull request](https://github.com/dell/ansible-powerflex/pulls) between your branch and the upstream master branch.
6. Once your pull request has merged, your branch can be deleted.
137 changes: 137 additions & 0 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!--
Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-->

# Code of conduct - contributor covenant

## Our pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at ansible.team@dell.com
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary ban

**Community impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent ban

**Community impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
Loading

0 comments on commit a023dea

Please sign in to comment.