Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDT deployment role #64

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

SDT deployment role #64

wants to merge 1 commit into from

Conversation

RayLiu7
Copy link
Collaborator

@RayLiu7 RayLiu7 commented Oct 10, 2024

Description

Implement SDT deployment

  • Add powerflex_sdt role to support sdt installation and day0 creation
  • Add corresponding molecule tests
    sdt_installation
    image
    sdt_uninstallation
    image

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, pep8, linting, or security issues
  • I have performed Ansible Sanity test using --docker default
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Molecule Test

@ansible-collections-svc
Copy link
Collaborator

Can one of the admins verify this patch?

@RayLiu7 RayLiu7 force-pushed the sdt-deployment branch 2 times, most recently from 019e5f7 to 3a84872 Compare October 10, 2024 09:31
@sachin-apa
Copy link
Collaborator

run e2e

@RayLiu7 RayLiu7 force-pushed the sdt-deployment branch 4 times, most recently from 4d9fc66 to ce42839 Compare October 14, 2024 08:50
@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.87%. Comparing base (27ecbd2) to head (7ac8d32).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #64      +/-   ##
==========================================
- Coverage   91.95%   91.87%   -0.09%     
==========================================
  Files          49       49              
  Lines        7311     7348      +37     
  Branches      919      902      -17     
==========================================
+ Hits         6723     6751      +28     
- Misses        309      316       +7     
- Partials      279      281       +2     
Flag Coverage Δ
units 91.87% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RayLiu7 RayLiu7 force-pushed the sdt-deployment branch 2 times, most recently from d27470b to 724585d Compare October 15, 2024 02:49
@trisha-dell trisha-dell requested review from P-Cao and removed request for felixs88 October 15, 2024 06:49
Copy link
Collaborator

@sachin-apa sachin-apa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I See lot of common tasks in install and uninstall, Can we move them to common yml and use them accordingly in install and uninstall yml's.

@@ -0,0 +1,3 @@
#powerflex sdt params
powerflex_sdt_ip_list: 10.x.x.1,10.x.x.2
powerflex_sdt_role_list: storage_and_host,storage_and_host
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line missing,

@@ -0,0 +1,3 @@
#powerflex sdt params
powerflex_sdt_ip_list: 10.x.y.1,10.x.y.2
powerflex_sdt_role_list: storage_and_host,storage_and_host
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line missing,

@@ -0,0 +1,7 @@
---
file_glob_name: sdt
i_am_sure: 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file_glob_name, i_am_sure if these vars are not user inputs, move this to vars/main.yml
lets follow role_name_ convention, if these are role inputs, and update the doc and arg spec accordingly.

---
file_glob_name: sdt
file_gpg_name: RPM-GPG-KEY-ScaleIO
powerflex_role_environment:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a usage of this var anywhere in the task. Can you please check if this is required.

ansible.builtin.include_tasks: ../../powerflex_common/tasks/install_powerflex.yml

- name: Add certificate file for PowerFlex version 4.x
ansible.builtin.command: scli --add_certificate --certificate_file /opt/emc/scaleio/mdm/cfg/mgmt_ca.pem
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its good to move the commands to vars/main.yml and duynamically replace the values as required.

when: powerflex_sdt_array_version != "3"
rescue:
- name: Generate login certificate using primary_mdm_ip
ansible.builtin.command: >
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its good to move the commands to vars/main.yml and duynamically replace the values as required.

when: powerflex_sdt_array_version != "3"

- name: Login to MDM for PowerFlex version 4.x
ansible.builtin.command: scli --login --p12_path /opt/emc/scaleio/mdm/cfg/cli_certificate.p12 --p12_password {{ password }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its good to move the commands to vars/main.yml and duynamically replace the values as required.

when: powerflex_sdt_array_version != "3"

- name: Remove SDT
ansible.builtin.command:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its good to move the commands to vars/main.yml and duynamically replace the values as required.

powerflex_sdt_primary_mdm_ip: "{{ hostvars[groups['mdm'][0]]['ansible_host'] }}"

- name: Add certificate file for PowerFlex version 4.x
ansible.builtin.command: scli --add_certificate --certificate_file /opt/emc/scaleio/mdm/cfg/mgmt_ca.pem
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its good to move the commands to vars/main.yml and duynamically replace the values as required.

state: "absent"
with_items:
- EMC-ScaleIO-sdt
when: ansible_distribution in ("RedHat", "CentOS", "SLES")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are we ensuring ansible_distribution value is populated ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants