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
Adds post deployment script for jaas/jujushell #697
Adds post deployment script for jaas/jujushell #697
Conversation
@Jaycee Thanks! I was wondering if you can describe what the |
@tvansteenburgh I can do one better--I can show it to you: https://github.com/juju/termserver/blob/master/files/k8s-postdeploy To save you a click though:
|
Also, I realize I said it automatically runs this, which is inaccurate; it allows you to run it all at once via one action in the GUI. I've amended the description above. |
That is really cool, thanks @Jaycee ! |
@Jaycee this depends on changes to the I couldn't find any refs to |
So, postdeployment.sh is something the GUI uses -- see https://github.com/juju/juju-gui/blob/develop/jujugui/static/gui/src/app/components/post-deployment/post-deployment.js -- with the jujushell service and the termserver (as part of jujushell) which is the bit I've linked above. It's quite a mix of applications. A zero-length postdeployment script shouldn't cause any issues, technically, but it does create an odd experience, as the post deployment button will be rendered but not do anything aside from opening the juju terminal within the GUI--that's not broken in that it doesn't damage anything a user is deploying, but it's a bad interaction. Is it possible to make it an optional thing on your end, or should we make sure the GUI doesn't render the button when the file is empty? |
@Jaycee agreed
We could belt-and-suspender it and do it in both places -- i'll leave it to you to decide what should happen on the gui rendering for empty post-dep files. On this side, I've made the file optional so it's only written if we have content. Once #699 is merged, this should be g2g. |
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.
LGTM
https://github.com/juju/jujushell has added support for post-deployment commands to be run in the gui. This feature in the gui looks for a file in bundles, post-deployment.sh, and sends commands listed there to the jujushell.
Additionally, we'e added a k8s specific post deploy command to the limited shell used in jaas, which this added post-deploy script uses.