-
Notifications
You must be signed in to change notification settings - Fork 62
Introduce thing-flinger
#534
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
Conversation
`thing-flinger` is a remote deployment system for installing Omicron. It's intended to be used to simplify and shorten the testing cycle. More information is found in the [documentation](package/src/README.adoc).
e841e0c to
793c082
Compare
| if release { | ||
| release_flag = "--release"; | ||
| } | ||
| let cmd_path = "./target/debug/omicron-package"; |
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 thing here about absolute/relative paths. Might be safer and easier to understand to use absolute, for an automated tool like this.
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.
For this one in particular, it's how omicron package works. It relies on files in the top level omicron-directory by default. I don't really think it's particularly problematic here, as we cd to omicron_path first which is checked to be an absolute path in the newly created (post your review) validate function.
bnaecker
left a comment
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.
Nice work here, this looks very useful! I've a few questions/comments about clarity in the docs, and also some questions about how paths work in the tool itself. I think it's worth sticking with absolute paths wherever possible.
| # Location where files to install will be placed before running | ||
| # `omicron-package install` | ||
| # | ||
| # Since usernames may vary per server, this directory is relative to the user's |
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.
Does that mean if I put in /opt/oxide/staging/ it'll be interpreted as $HOME//opt/oxide/staging?
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.
I changed it to an absolute path. I think I did it this way originally because I was concerned about using $HOME in absolute paths. I just changed this and tested it and it works.
I also added validation to check for $HOME explicitly so absolute path checking works even when it doesn't begin with a /
luqmana
left a comment
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 doing this Andrew! As we start to test more multi-sled scenarios we're definitely going to need more tooling along these lines. I left a couple of small comments but this is great!
andrewjstone
left a comment
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 the review @luqmana!
I addressed all your comments except the .gitignore for now.
| # Location where files to install will be placed before running | ||
| # `omicron-package install` | ||
| # | ||
| # Since usernames may vary per server, this directory is relative to the user's |
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.
I changed it to an absolute path. I think I did it this way originally because I was concerned about using $HOME in absolute paths. I just changed this and tested it and it works.
I also added validation to check for $HOME explicitly so absolute path checking works even when it doesn't begin with a /
thing-flingeris a remote deployment system for installing Omicron. It'sintended to be used to simplify and shorten the testing cycle.
More information is found in the documentation.