Conversation
fba279c
to
9717b26
Compare
Ready for review - semaphore has passed (https://semaphoreci.com/coreos/rkt/branches/pull-request-1977/builds/4). It is running again, because I just pushed the commit with CHANGELOG.md updates. |
About milestones - this PR is set to 1.0, the issues it fixes are set to 0.16.0. Something has to be moved (likely the issues). |
In general, you will be best off by specifying an absolute path to the image file. | ||
This parameter is currently very shabby and will be reworked in the near future. | ||
For the flavor setup, the default value is also empty, which tells rkt to look for the image in the directory the rkt binary is located, unless it is overridden at runtime. | ||
Normally, this parameter should be some URL, with a scheme or an absolute path. |
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.
Can you give an example of typical usage?
For example, Fedora (rkt.spec) uses --with-stage1-default-location=%{_libexecdir}/%{name}/stage1-host.aci
.
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.
Added the line:
The path is usually something like /usr/libexec/rkt/stage1-images
or /usr/lib/rkt/stage1-images
.
ping @robszumski for the flags change. I replaced |
@krnowak SGTM |
4d5dfaa
to
5e1fc68
Compare
This extends the "override semantics" section. Also, it rewords or fixes other parts of the documentation.
Some of the configured values can be overridden with command line flags, so it would be nice to mention which ones for each kind.
build: Use a better wording in configure.ac (conflicting -> mutually exclusive), reformat ldflags for clarity in rkt.mk config: Document some public structs, remove a useless call to os.TempDir(), make sure that data directory is an absolute path, fix a bug in toArray functional tests: Minor code shuffling and renaming in test aci server. image: print a message when using stage1 image from a hash
This setting will be later used by --stage1-from-dir flag.
It replaces the --stage1-image flag with five mutually-exclusive flags: --stage1-url, --stage1-path, --stage1-name, --stage1-hash and --stage1-from-dir. The flags tell rkt to use stage1 image, respectively, from a URL, from a path, in the store under the name, in the store with the hash, from a file in the default stage1 images directory. In case none of the above flags were provided, rkt takes stage1 and paths configuration and build-time defaults to decide for which name and version of the stage1 image it should search for in the image store and, if that fails, from which location it should fetch the image. This introduces a new configure flag for defining the path to the default stage1 images directory.
…nder http This will be used in the stage1 loading test to test stage1 loading either from a configuration with an http location defined or from the --stage1-url flag with an http url.
This will be used in the stage1 loading test to make sure that rkt reuses a stage1 image from the store instead of fetching it from the remote location again.
…truct The list of options will grow, which will make the NewServer function even more awkward (with 5 parameters or so). So this commit puts all the configuration into the ServerSetup struct and provides a function for getting a default setup, which can be modified before passing it to NewServer function.
…ndom one Choosing a fixed port will make the server to listen on port 80 or 443, depending on whether it uses http or https protocol. This also replaces a hack for running a discovery server with a proper solution, which is replacing a default listener with our own.
This implementation is actually so minimal, that it does not even bother with running stage2. We can use it regardless of how the project was configured. This stage1 image could also be used in other tests that do not involve checking things happening inside stage1 or stage2. This will be used in stage1 loading test.
The stage1 loading test will use stub stage1 image for its checks. One of them is testing whether rkt falls back to fetching stage1 image from the same directory the rkt binary is in. To do this, we need to put the stub stage1 image in the same directory as rkt. To avoid a confusion from packagers and users, we do it backwards - we put a symlink to the rkt binary in the directory where stub stage1 image is. In the same directory we also put symlinks to all the flavors of the stage1 image, so the tests should work as they did so far.
It tests loading stage1 from the configuration and from the flags. Docker cases are not tested at all - we need a docker test server first.
5e1fc68
to
370a88d
Compare
370a88d
to
fcc2ac3
Compare
Closing to get the semaphore testing for the new PR. |
Followup - #2035 |
--stage1-image
flag with--stage1-{url,path,name,hash,from-dir}
--stage1-from-dir
flag--stage1-*
flagscoreos.com/rkt/stage1/run
entrypoint.Fixes #1425, #1600, #471.