-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update dockerfile #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jlowellwofford
pushed a commit
that referenced
this pull request
Jul 17, 2020
* kraken-build: Add uKraken() and -uroot option * Add copying block for kraken files * Update kraken modules with oitai10/copy * Correct module errors * Usage: -uroot prints that it needs dst path * Add building of kraken for u-root At this point, the u-root version of the kraken source tree is simply a clone of kraken proper. Building creates a "main" binary. Both of these will be updated subsequently. * Rename 'main' to 'kraken' after u-root build * Simplify rename error checking * Print where u-root kraken is being generated * Be more verbose with rename error * u-root: copy kraken src & compile templates * -uroot: compile into "src" instead of "tmp" * -uroot: utmpDir -> usrcDir for build routine * Add u-root source generation mode to kraken Consists of the following WIP commits: - Create custom kraken templates for u-root This aims to solve the import path errors of the following format: \# github.com/u-root/u-root/cmds/exp/kraken/src ./main.go:169:23: cannot use any (type *"github.com/u-root/u-root/cmds/exp/kraken/vendor/github.com/golang/protobuf/ptypes/any".Any) as type *"github.com/hpc/kraken/vendor/github.com/golang/protobuf/ptypes/any".Any in argument to restapi.UpdateConfig 2019/09/16 00:59:36 failed to build linux-amd64 for u-root: exit status 2 - Replace hpc/kraken with u-root/u-root/cmds/exp/kraken This is to avoid import errors in the generated kraken source tree for u-root. - Distinguish DeepSearchAndReplace from SimpleSearchAndReplace - Fix search/replace recursion * kraken -> kraken-tpl * main.go -> kraken.go * Remove building kraken binary for u-root * Add a kraken config for UEFI firmware build * uefi.yaml: Shrink dependencies * Don't copy "vendor" folder (not used) * uefi.yaml: Fix description comment * Update go.sum * Clarify comments and switch verbose & err blocks * Get rid of "ukraken" dir * Add descrioptive comment to uCompileTemplates() * uKraken: Touch up some comments * Update go.mod * Move search/replace functions from kraken-build to lib * go.sum: Update oitai10/copy * Tidy up module dependencies * buildutil.go: "go-ify" function comments * Go-ify documentation comments for uKraken and uCompileTemplates * Simplify large if-else in uKraken() * Move u-root checking from main() to checkUrootOpt() * checkUrootOpt: Pass variables from main * uroot: Overwrite destination files if -force passed * Fix import path replacement These blocks are to prevent trouble when testing on the synackd fork. Before this is merged into the main repository (hpc), these need to be removed. * Replace further hpc/kraken with synackd/kraken This also needs to be reverted before merging. * Convert uroot source generation from CLI flag to build target * go.mod: replace: Use current directory * kraken.yml: Revert to using this fork * kraken.yml: u-kraken branch * uefi.yaml: Add websocket, pxe modules/extensions * kraken-build: Move config parsing to separate function * kraken-build: Move build procedure to own function This is to eliminate complexity in the main() function to satisfy the CodeFactor checks. This commit also updates the names of some kraken helper functions to distinguish between u-root variants from the standard kraken functions. * kraken-build.go: Replace lines in ServiceInstance.go to make u-root work * kraken-build: Only copy needed files for u-root source generation kraken-build will parse the YAML config and only copy over the modules and extensions listed there, as well as core/ and lib/. It will also replace all regular kraken import paths of the form: github.com/hpc/kraken/* with import paths leading to the u-root build directory: github.com/hpc/kraken/build/u-root/* in all of the copied ("generated") files. Separate core/ and lib/ are needed for the u-root build target because u-root's BusyBox method will not allow kraken services to have a separate "[kraken:<service_ID>]" argv[0], whereas this will work fine for other build targets. * kraken-build: argv[0] for all kraken services in u-root initramfs Kraken executes itself using a differing argv0 of the format [kraken:<service_ID>] for each service. Since u-root uses a singe BusyBox and symlinks to execute commands, this will not work. So, when generating a source tree for u-root, the aforementioned format will be replace by simply argv[0] (how kraken itself was called). * kraken-build: Move extension/module copying to separate functions * kraken-build: Condense error if-blocks * kraken-build: Move source-copying to separate function * kraken-build: Move source modification to own function * Add regex replacement funcs, use for import path replacement * buildutil: One function for simple/recursive funcs * Fix typo in error message * Remove config/uefi.yaml (not used yet) * Revert go.mod: revert statement * Revert kraken.yml: Use master branch for vbox example * kraken-build: Unify compileTemplates for both main and u-root targets * compileTemplates: Include reference to #184 * modifySources: Include reference to #185 * Rewrite copy function (#1) * Add copy library * Integrate copy library with kraken-build * cmp: Condense IsEqualFile()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updating the docker file to the latest revision to reduce container size.