-
Notifications
You must be signed in to change notification settings - Fork 356
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
SmartState Docker Creds for AWS #2525
Conversation
@miq-bot add_label wip |
This pull request is not mergeable. Please rebase and repush. |
Add a new credentials tab for the Amazon provider that takes a userid and password to be used when performing Smartstate Analysis. These credentials will be passed to the AWS instance actually performing SSA to be used to log in to the Docker Registry.
f19d6a1
to
60d2725
Compare
Fix warnings called out by Rubocop.
Checked commits jerryk55/manageiq-ui-classic@60d2725~...d6c88f6 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 app/views/layouts/angular/_multi_auth_credentials.html.haml |
The tab implementation is not correct here, since
The attached patch would resolve the above issue (works well for me) I suppose, we could resolve this issue in a follow-up and go ahead with the merge for now. /cc @h-kataria |
Correct @AparnaKarve @h-kataria when I test the patch the error indicator on the Smartstate Tab still doesn't go away, and worse the Add button is never enabled so I cannot save the provider. If we get agreement I will turn off the "WIP" on this and we can address the issues with a follow-on PR. |
@jerryk55 can you please add before/after screenshots, it is easy to test/verify changes. |
@h-kataria will do. |
@jerryk55 verified patch from @AparnaKarve , seems to be working as expected, please apply that to your PR, then i can test/verify again. |
@h-kataria the patch did not work for me but I will try again. This could be some flakey cache issue on my appliance. |
@jerryk55 also, don't forget to add before/after screenshots so people can look at the PR and quickly understand how it affects the UI |
@jerryk55 i think i will merge this PR as is since patch from @AparnaKarve does not seem to work for you, please make a follow up PR with those changes. Please mark this PR as non-WIP once it is ready to merge. |
@chessbyte in the process... |
@h-kataria @chessbyte before and after screenshots added for adding and editing an Amazon provider with one or both sets of credentials. |
@miq-bot remove_label wip |
@chessbyte I will leave it up to those with stronger opinions. We already changed the name once before based on consensus from @roliveri @Fryguy and @bdunne. Originally it was named "RHSM Credentials" because those were the initial set of credentials required. Then @bdunne stated that the creds were for the Docker Registry, and that upstream and downstream they could be different. |
@jerryk55 thanks for the clarification. |
The visibility of the Amazon Docker Creds tab will be based on a true Settings value. The setting used is Settings.ems.ems_amazon.agent_coordinator.docker_login_required. If the value is false no tab is presented. This feature is implemented based on offline discussions around the original PR implementing the tab - ManageIQ#2525 with @Fryguy.
Re-adds commit b5ea01f after cleaning up the branch which was pushed with commits from another PR inadvertantly. The visibility of the Amazon Docker Creds tab will be based on a true Settings value. The setting used is Settings.ems.ems_amazon.agent_coordinator.docker_login_required. If the value is false no tab is presented. This feature is implemented based on offline discussions around the original PR implementing the tab - ManageIQ#2525 with @Fryguy.
The visibility of the Amazon Docker Creds tab will be based on a true Settings value. The setting used is Settings.ems.ems_amazon.agent_coordinator.docker_login_required. If the value is false no tab is presented. This feature is implemented based on offline discussions around the original PR implementing the tab - ManageIQ#2525 with @Fryguy.
The visibility of the Amazon Docker Creds tab will be based on a true Settings value. The setting used is Settings.ems.ems_amazon.agent_coordinator.docker_login_required. If the value is false no tab is presented. This feature is implemented based on offline discussions around the original PR implementing the tab - ManageIQ#2525 with @Fryguy. This is the original desired functionality but it was not implemented in time for the 4.6 cutoff.
Add a new credentials tab for the Amazon provider that takes a userid and password
to be used when performing Smartstate Analysis. This tab is labeled "SmartState Docker".
These credentials will be passed to the AWS instance actually performing SSA to be used to log in to the Docker Registry. These credentials are NOT required, and no validation will be performed on them. They will simply be saved in the database to be passed to the SmartState Analysis agent.
This PR is dependent upon ManageIQ/manageiq-providers-amazon#330 which adds the smartstate_docker authtype to the Amazon provider.
Please note that while this PR is marked as WIP, it will need to be merged for the 4.6 build. It is functioning properly except for the following nits:
The SmartState Docker tab is marked with a red "!" which would lead one to believe that it is
not valid even after credentials are entered. This is related to the fact that we are not validating them.
Even though the SmartState Docker credentials are not required, the "Add" button for a new provider is not enabled until the new tab is clicked on. The credentials do not have to be entered.
If credentials on the SmartState Docker tab are entered and saved in the database, the next
time the Amazon provider is edited - the userid is not filled in to the appropriate field to be modified.
It needs to be entered again if one wishes to make changes to the password.
Finally - as a follow on we wish to enable or disable this tab based on a configuration setting. This will be added in a separate PR.
@roliveri @hsong-rh @Fryguy @AparnaKarve @h-kataria please review. We may wish to merge this as is if we cannot resolve the above nits so that the feature makes it into the build. Your mileage may vary.
Screenshots -
Old page to add Amazon Provider with Validation Required -
New Page to add Amazon Provider - Default Credentials Tab -
Old Page to add Amazon Provider - Credentials Validated -
New Page to add Amazon Provider - Smartstate Tab
Old page to Edit Amazon Provider - Validation Required
New page to edit Amazon Provider - Default Tab
Old page to edit Amazon Provider - Validated credentials
New page to edit Amazon Provider - Smartstate Tab
Links
Steps for Testing/QA
Add an Amazon Provider. Enter the default credentials. Click on the "SmartState Docker" tab.
enter the userid and password. Click "Add". Both sets of credentials will be stored in the VMDB.
These can be validated by inspecting the "authentications" table in the database.