-
Notifications
You must be signed in to change notification settings - Fork 11
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
[WIP] To Show terraform output in Services #72
Conversation
cleanup_git_repository | ||
|
||
return queue_signal(:finish, message, status) if success? | ||
if success? |
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.
@jaisejose1123 is it possible to get logs on failure also? I think that's almost more important in order to figure out what went wrong.
} | ||
|
||
miq_task.context_data ||= {} | ||
miq_task.context_data[:terraform_respons] = terraform_response |
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.
Typo, should be :terraform_response
|
||
miq_task.context_data ||= {} | ||
miq_task.context_data[:terraform_respons] = terraform_response | ||
context[:terraform_respons] = terraform_response |
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.
Same here, :terraform_response
miq_task.context_data[:terraform_respons] = terraform_response | ||
context[:terraform_respons] = terraform_response | ||
|
||
update!(:context => context, :started_on => context[:terraform_respons][:stack_job_start_time]) |
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.
~~Do we want to override the started_on property? Was this not being set before? ~~ I see you said above this was blank.
If it wasn't being set we probably want to set it earlier than post_execute
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.
E.g. embedded_ansible sets this on execute https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/ansible_runner_workflow.rb#L50-L52
@jaisejose1123 are you able to see the log output on the stack or do you have to implement raw_stdout like EmbeddedAnsible does? https://github.com/ManageIQ/manageiq/blob/master/app/models/manageiq/providers/embedded_ansible/automation_manager/job.rb#L149-L151 |
@agrare We are storing the logs in the database using the format shown below, so we can directly query them from the database. |
e0ff08f
to
5aa8ab0
Compare
@jaisejose1123 can you show an example of where this is visible on the UI? I'm surprised we don't have to implement OrchestrationStack stdout like embedded ansible does. |
I don't think the UI has been built yet - @jaisejose1123 can you add in the UI for showing the terraform template output in services...it's likely going to be a copy paste from ansible. I also expect you'll need the backend code that uses TerminalToHtml. FYI, @GilbertCherrie ^ |
completed the UI work but am currently facing few minor errors. The backend code using TerminalToHtml is already finished. I’ll update the PR soon. |
9cc1ea7
to
fc8ed87
Compare
if MiqEnvironment::Command.is_podified? | ||
signal(*args) | ||
else |
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.
@jaisejose1123 do we need this for terraform? The reason it is like this in embedded_ansible is because the files/directories related to the ansible-runner execution are literally on the pod's filesystem so we have to run it on the same pod, but this has a number of drawbacks and something we want to get away from.
With the opentofu-runner any pod in the namespace should be able to hit that API so any pod could run the next state.
cleanup_git_repository | ||
|
||
|
||
#cleanup_git_repository |
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 we no longer cleaning up the git repository?
We can close this PR, has been replaced by #78 |
PR raised for Show terraform output in Services
https://jsw.ibm.com/browse/CP4AIOPS-1082
Before
After executing Terraform through ManageIQ, the results were not stored in the MiqTask and Job tables.
The context_data field in the MiqTask table was empty.
The context field in the Job table was empty.
start_time of OrchestrationStack was nill
After
Now, Terraform results are being stored in the MiqTask and Job tables.
The context_data field stores the Terraform results in the MiqTask table.
The context field stores the Terraform results in the MiqTask table.
start_time of OrchestrationStack get updated