-
Notifications
You must be signed in to change notification settings - Fork 77
bootstrap file changed to reflect new kernel #148
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
|
@DavidjohnBlodgett also need some doc/build updates at https://github.com/RackHD/RackHD/blob/master/packer/ansible/roles/images/tasks/main.yml#L15-L19 and https://github.com/RackHD/docs/blob/25c037d64ecd54b7e4960efe7e976923c559dd2f/docs/rackhd/ubuntu_package_installation.rst (search for 3.16). |
|
Please don't merge until ^^ are updated. |
|
👍 after update with @benbp 's comments |
| basefs: 'common/base.trusty.3.16.0-25-generic.squashfs.img', | ||
| overlayfs: 'common/discovery.overlay.cpio.gz', | ||
| basefs: 'common/base.trusty.3.19.0-56-generic.squashfs.img', | ||
| overlayfs: 'common/discovery.3.19.0-56-generic.overlay.cpio.gz', |
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.
How about to refactor the code using the task rendering? so it is more easy to change all micorkernel files to a new one by only change the options version:
options: {
version: '3.19.0-56-generic',
kernelFile: 'vmlinuz-{{options.version}}',
initrdFile: 'initrd.img-{{options.version}}',
kernelUri: '{{ api.server }}/common/{{ options.kernelFile }}',
initrdUri: '{{ api.server }}/common/{{ options.initrdFile }}',
basefs: 'common/base.trusty.{{options.version}}.squashfs.img',
overlayfs: 'common/discovery.{{options.version}}.overlay.cpio.gz',
profile: 'linux.ipxe',
comport: 'ttyS0'
},
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.
Great idea! I second this, though maybe call it kernelVersion instead of version?
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 just version? Why not the entire path/filename?
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.
@jlongever because the version value is shared across 4 variables, if I understand your question correctly?
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.
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.
@benbp as long as we're rendering option values why not pass each full filename and path in as an option? What if I want to boot my own custom overlay (or initrd, kernel, etc) called my.custom.overlay.version.1.cpio.gz put in my_overlays/ instead of /common; my graph would pass overlayfs and rendered as:
overlayfs: {{options.overlayfs}} = my_overlays/my.custom.overlay.version.1.cpio.gz.
Are we intentionally enforcing a file naming convention? Just throwing it out there.
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 think the extra options are just for convenience on our end when changing the code, but for a use case like yours, yeah I would encourage just overwriting the whole overlayfs value from the graph.
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.
Yes, my proposal just wants to simplify our future change on this task definition, you can still override all options with your customized values regardless of the version.
Furthermore, maybe the common/ can also be extracted as a option, such as baseUrl or baseDir .
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.
Talking about refactoring, I suggest more. the URI/URL could be independent with kernel/initrd/basefs/overlayfs so that the static file server could be independent, it's very useful when a separate service for static file is used(also may benefit to RackHD in switch), it's also flexible for the customized case @jlongever mentioned. so just like this.
{
version: ***
baseUri: {{api.server}/common
kernelFile: ***
initrdFil: ***
basefs: ***
overlayfs: ***
prifile:***
comport: ***
}
and for ipxe profile https://github.com/RackHD/on-http/blob/master/data/profiles/linux.ipxe also need to be refactored, like below
kernel <%=baseUri%>/<%=kernelFile%>
initrd <%=baseUri%>/<%=initrdFile%>
imgargs imgargs <%=kernelFile%> initrd=<%=initrdFile%> ****** BASEFS=<%=baseUri%>/<%=basefs%> OVERLAYFS=<%=baseUri%>/<%=overlayfs%> ***
so the hardcoded 'http' could be removed from
https://github.com/RackHD/on-imagebuilder/blob/master/roles/initrd/provision_initrd/files/local#L109-L121
I know there will be more changes and this is out of the original purpose of this PR, so it could be refactored in another PR, so still 👍 from me for this PR with another refactoring PR
|
Still 👍 with a refactor suggestion. |
efaf43d to
bb016ea
Compare
| initrdFile: 'initrd.img-3.16.0-25-generic', | ||
| kernelVersion: '3.19.0-56-generic' | ||
| kernelFile: 'vmlinuz-{{ options.kernelVersion}}', | ||
| initrdFile: 'initrd.img-{{ options.kernelVersion}}', |
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.
Missing semicolon.
Unrecoverable syntax error. (40% scanned).
|
|
|
…-updates README 2.0 API updates
@RackHD/corecommitters @tldavies @VulpesArtificem @rolandpoulter this is one of a 2 part PR (also in RackHD/on-imagebuilder#31) to support the new micro kernel.