-
Notifications
You must be signed in to change notification settings - Fork 53
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
otp-runner deployment #316
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #316 +/- ##
============================================
- Coverage 19.91% 19.80% -0.11%
- Complexity 410 412 +2
============================================
Files 151 153 +2
Lines 8331 8417 +86
Branches 1157 1165 +8
============================================
+ Hits 1659 1667 +8
- Misses 6523 6601 +78
Partials 149 149
Continue to review full report at Codecov.
|
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.
Again, really good stuff. I'm really excited to move this code into the dev environment and give it a whirl. Just a few minor changes/comments.
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/MonitorServerStatusJob.java
Show resolved
Hide resolved
// NOTE: user data output is logged to `/var/log/cloud-init-output.log` automatically with ec2 instances | ||
// Add some items to the $PATH as the $PATH with user-data scripts differs from the ssh $PATH. | ||
lines.add("export PATH=\"$PATH:/home/ubuntu/.yarn/bin\""); | ||
lines.add("export PATH=\"$PATH:/home/ubuntu/.nvm/versions/node/v12.16.3/bin\""); |
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.
Should the node version be hard-coded 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.
When adding it to the PATH variable, yes.
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.
@evansiroky, I'm more so asking should we bump the node version out into its own variable (and then string formatting the export PATH line) just for visibility and easy access.
src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Outdated
Show resolved
Hide resolved
src/main/java/com/conveyal/datatools/manager/jobs/OtpRunnerManifest.java
Show resolved
Hide resolved
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 changes, @evansiroky. Just a couple of minor follow ups, but I think this is pretty much ready.
@landonreed see latest commit. I hope it resolves your concerns. |
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 am leaning towards extracting the manifest generation into its own method and rename the big
constructUserData
method as a result.
Let me know how strongly you feel about your recommendations to change things, @binh-dam-ibigroup. I think it might be fine to leave things as they are. |
🎉 This PR is included in version 3.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Checklist
dev
before they can be merged tomaster
)Description
This PR changes ec2 deployments to use otp-runner instead of completely bash-inlined in java for ec2 startup scripts. Also, the logic to create bundles and upload them has been moved to otp-runner. This has a number of advantages:
In order to run this, the ec2 images need node.js and yarn installed.