-
Notifications
You must be signed in to change notification settings - Fork 20
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
OrchestrationStack provisioning #7
Conversation
@agrare I'll come up with a core PR tomorrow to actually register the |
@@ -1,4 +1,4 @@ | |||
class ManageIQ::Providers::Azure::CloudManager::OrchestrationStack::Status < ::OrchestrationStack::Status | |||
class ManageIQ::Providers::AzureStack::CloudManager::OrchestrationStack::Status < ::OrchestrationStack::Status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This little typo almost made me mad because orch stack was getting "Succeeded" status upon polling but stack.status.completed?
was still reporting false
:)
@@ -0,0 +1,105 @@ | |||
class ManageIQ::Providers::AzureStack::CloudManager::OrchestrationTemplate < ::OrchestrationTemplate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire file is a copy-paste from Azure provider, not sure whether I should explicitly give credit in a comment or something?
@bzwei can you help with taking a look? |
state = client.deployments.get(resource_group, name).properties.provisioning_state | ||
Status.new(state.downcase, state) | ||
end | ||
rescue => err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to distinguish stack_not_exist vs stack_status_error? This difference is critical for debugging provisioning issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated.
@@ -1,6 +1,58 @@ | |||
class ManageIQ::Providers::AzureStack::CloudManager::OrchestrationStack < ManageIQ::Providers::CloudManager::OrchestrationStack | |||
require_nested :Status | |||
|
|||
def self.raw_create_stack(ems, stack_name, template, options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why raw_update_stack
method is missing in this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it now, thanks. Didn't plan to do it all in one PR but actually it's not that complicated.
def raw_status | ||
ext_management_system.with_provider_connection(:service => :Resources) do |client| | ||
state = client.deployments.get(resource_group, name).properties.provisioning_state | ||
Status.new(state.downcase, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second argument is the reason. It is very important to retrieve the failure reason from provide. Without clear reason every failure likely produces a support ticket, but often the problem occurs on the provide side rather than the manageiq side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I've added as descriptive message as I could fetch
Thanks for review @bzwei I'll apply tomorrow first thing in the morning. Can I ask for your blind guess why I'm not seeing any "Related VMs" on the "My Services" page on UI? Provisioning succeeds and all and inventory gets refreshed so that OrchestrationStack is nicely connected to the related VMs, but UI still won't show any VMs there, nor the related OrchestrationStack. Do I need to do something special to make it visible? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comments @bzwei , I've pushed the updated version.
@@ -1,6 +1,58 @@ | |||
class ManageIQ::Providers::AzureStack::CloudManager::OrchestrationStack < ManageIQ::Providers::CloudManager::OrchestrationStack | |||
require_nested :Status | |||
|
|||
def self.raw_create_stack(ems, stack_name, template, options = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it now, thanks. Didn't plan to do it all in one PR but actually it's not that complicated.
def raw_status | ||
ext_management_system.with_provider_connection(:service => :Resources) do |client| | ||
state = client.deployments.get(resource_group, name).properties.provisioning_state | ||
Status.new(state.downcase, state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I've added as descriptive message as I could fetch
state = client.deployments.get(resource_group, name).properties.provisioning_state | ||
Status.new(state.downcase, state) | ||
end | ||
rescue => err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated.
Sending in additional minor patch to make one for the dialog dropdowns required |
With this commit we implement Deployment Template provisioning aka OrchestrationStack provisioning. Provisioning is supposed to be started from the ServiceCatalogItem of type "Orchestration" which admin is expected to provide with a template deployment JSON. User is then prompted to input template parameter values upon item ordering. Signed-off-by: Miha Pleško <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks.
@miha-plesko The stack and VMs should have been added to the service. You may want to debug starting from https://github.com/ManageIQ/manageiq/blob/master/app/models/service_orchestration.rb#L108. |
With this commit we implement Deployment Template provisioning aka OrchestrationStack provisioning. Provisioning is supposed to be started from the ServiceCatalogItem of type "Orchestration" which admin is expected to provide with a template deployment JSON. User is then prompted to input template parameter values upon item ordering.
Related PR: ManageIQ/manageiq-ui-classic#5840 (introduces AzureStack as an option on UI)