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

Automate - VMware placement to support only Clusters or only Folders. #15951

Merged

Conversation

billfitzgerald0120
Copy link
Contributor

@billfitzgerald0120 billfitzgerald0120 commented Sep 7, 2017

Manual placement selection to support only the use of "VMware clusters" and
to support only the use of "VMware folders".

https://bugzilla.redhat.com/show_bug.cgi?id=1483636
https://bugzilla.redhat.com/show_bug.cgi?id=1484024

image

image

Suggestions on how to test:

This change needs to be configured. Nothing happens OOTB. This is a modified dialog for VMware provisioning only.
There are 3 ways/dialogs to provision for VMware and this is only when provisioning from a template. There are many ways to
implement these changes. These are the ways I tested it.

First Test - This will replace functionality for everyone. All users will use cluster only when provisioning a Vmware template.

Just update the miq_provision_vmware_dialogs_template.yaml with the new cluster yaml

  1. Make a copy of original - miq_provision_vmware_dialogs_template.yaml
  2. Copy/update new dialog ( miq_provision_vmware_cluster_dialogs_template )into original
  3. Restart appliance
  4. Provision a Vmware template.
  5. Notice the Environment tab only has the 'cluster' options.

Second Test - This will replace functionality for everyone. All users will use folder only when provisioning a Vmware template.

  1. Make a copy of original - miq_provision_vmware_dialogs_template.yaml
  2. Copy/update new dialog ( miq_provision_vmware_folder_dialogs_template )into original
  3. Restart appliance
  4. Provision a Vmware template.
  5. Notice the Environment tab only has the ‘folder' options.

Third test - Different users/groups will use folders, clusters or existing dialogs. VMware is the only infrastructure provider.

  • If you have other infrastructure providers you might be missing a dialog because of the changes. For instance, if you had a Rhev provider the Rhev provisioning for folder and cluster users would be broken/missing because of the new wiring.
  1. Add a new group called cluster, role = EvmRole-adminstrator
  2. Add a new group called folder, role = EvmRole-adminstrator
  3. Add a new user called cluster, group = cluster
  4. Add a new user called folder, group = folder
  5. Create an enabled writeable domain.
  6. Copy / ManageIQ / Infrastructure / VM / Provisioning / Profile / EvmGroup-super_administrator instance to writeable domain.
  7. Rename EvmGroup-super_administrator to cluster
  8. Edit instance and change
  9. dialog_name = ${#dialog_name_prefix}cluster_dialogs${/#dialog_input_request_type}
  10. Copy / ManageIQ / Infrastructure / VM / Provisioning / Profile / EvmGroup-super_administrator instance to writeable domain.
  11. Rename EvmGroup-super_administrator to folder
  12. Edit instance and change
  13. dialog_name = ${#dialog_name_prefix}folder_dialogs${/#dialog_input_request_type}
  14. Copy / ManageIQ / Infrastructure / VM / Provisioning / Profile / vm_dialog_name_prefix method to writeable domain.
  15. Edit instance and change
  16. dialog_name_prefix = "miq_provision_#{platform}dialogs” ===> dialog_name_prefix = "miq_provision#{platform}"
  17. Restart appliance

Screenshot of writeable domain below

image

Screenshot of changes to profile for cluster user

image

Screenshot of changes to profile for folder user
image

Screenshot of changes to vm_dialog_name_prefix method.
image

If you logon as user cluster and provision a Vmware template, your Environment tab should only have cluster as an option.
If you logon as user folder and provision a Vmware template, your Environment tab should only have folder as an option.

Any user besides folder or cluster will have the default Environment tab.

@billfitzgerald0120
Copy link
Contributor Author

@miq-bot add_label rfe

@billfitzgerald0120
Copy link
Contributor Author

@miq-bot assign @gmcculloug

@miq-bot
Copy link
Member

miq-bot commented Sep 7, 2017

@billfitzgerald0120 Cannot apply the following label because they are not recognized: rfe

@gmcculloug
Copy link
Member

@billfitzgerald0120 Based on PR #15988 the :placement_auto_override field has been renamed to :force_placement_auto so the dialog in this PR need to be updated to match.

Also, please include screenshots of the Environment tab for both dialogs in this PR description.

@billfitzgerald0120 billfitzgerald0120 changed the title [WIP] Automate - VMware placement to support only Clusters or only Folders. Automate - VMware placement to support only Clusters or only Folders. Sep 19, 2017
@billfitzgerald0120
Copy link
Contributor Author

@gmcculloug Renamed field and added screenshots as you requested.

@miq-bot miq-bot removed the wip label Sep 19, 2017
@gmcculloug
Copy link
Member

@billfitzgerald0120 @tinaafitz Changes look good.

My one suggestion would be to rename the dialogs as follows. I am open to other naming suggestions so let me know what you think.

miq_provision_vmware_dialogs_cluster_template.yaml => miq_provision_vmware_cluster_dialogs_template.yaml

miq_dialogs/miq_provision_vmware_dialogs_folder_template.yaml => miq_dialogs/miq_provision_vmware_folder_dialogs_template.yaml

@tinaafitz
Copy link
Member

I agree with the naming change suggested by @gmcculloug.
@billfitzgerald0120 Can you rename the dialogs accordingly?

@billfitzgerald0120
Copy link
Contributor Author

@gmcculloug @tinaafitz Changed dialog names as requested. Please Review

@gmcculloug
Copy link
Member

@billfitzgerald0120 I noticed a small inconsistency in the dialog description field which lead me to doing a full diff on the two dialogs here. The initial dialogs they derive from are different which leads to more then the expected fields showing up in a diff.

You can keep the current Sample VM Provisioning Dialog (cluster Template) dialog but the description should be updated to read Sample VM Provisioning Dialog - Cluster Selection Only (Template)

The folder dialog should be exactly the same as the cluster one, but with the name/description updated and the changed environment field. I would suggest starting with the modified cluster and make the few replacements.

@gmcculloug
Copy link
Member

@billfitzgerald0120 Files diff correctly now, just need to follow the recommended change for the descriptions from earlier #15951 (comment).

I'm suggesting the descriptions read:
Sample VM Provisioning Dialog - Cluster Selection Only (Template) and
Sample VM Provisioning Dialog - Folder Selection Only (Template)

Manual placement selection to support only the use of "VMware clusters" and
to support only the use of "VMware folders".

https://bugzilla.redhat.com/show_bug.cgi?id=1483636
https://bugzilla.redhat.com/show_bug.cgi?id=1484024
@miq-bot
Copy link
Member

miq-bot commented Sep 21, 2017

Checked commit billfitzgerald0120@317ac50 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

@gmcculloug gmcculloug merged commit 2858163 into ManageIQ:master Sep 21, 2017
@gmcculloug gmcculloug added this to the Sprint 70 Ending Oct 2, 2017 milestone Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants