Ignore the --iso and --keep-image flags for the massinstaller
when installing onto physical media as they do not logically apply.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Ensure we do not allow the user to set options, either
via command line or in the default configuration file,
which would not be valid during an interactive installation.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Enable parsing of RAID types even though they are not
currently support installation targets.
Fixes: #609
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
If an ISO can not be generated due to multiple kernels, then
ensure that we keep the raw image file.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This reverts commit 0683fdfc64.
Mixer will instead use the --template command line options
in combination with --bundles option to create a default
YAML configuration file instead of modifying a published template.
Allow the user to override the default set of bundles on
the command line. This comma-separated list will override
either the default built-in bundle list or the bundle list
from a specified configuration file.
Note that the installer will still augment this list with
any RequiredBundle which is needed due to option selections
such as choosing a non-default keyboard or language, enabling
telemetry, or adding additional users.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Add new --template (-T) command mode which will generate
a YAML configuration file.
Attempt to improve test coverage.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When converting an ister JSON configuration file to a
clr-installer YAML configuration file, we want to ensure
a single kernel is set. Additional kernel result in a
warning as ISO mainly due to ISO generation limitation
in the code.
Add new coverage test for multiple kernels.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Currently, ISO image generation supports only a single kernel.
Hence, skip ISO generation if multiple kernel bundles are present.
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
Do not start the clr-installer provisioning service if there
was no configuration file supplied on the kernel command line.
As this service has already masked the getty for this tty, no
login prompt will be available on this terminal. The use will
have to switch to a different virtual terminal for login access.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This script creates the pxe image that is later processed into the
initrd for network installing with pxe.
Signed-off-by: John Akre <john.w.akre@intel.com>
Much of the new networking retry code is difficult to
test/emulate in a test environment -- as such, reducing requirement.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
We should be using image mode when invoking clr-boot-manager
as we want changes implemented on the target image.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #591
When attempting to download a configuration file supplied by
the kernel command line, keep trying forever. This is generally
used by a network boot installation.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Do not wait for user input for requested reboots.
Instead offer a short countdown which can be aborted
by an interactive user if enabled by mistake.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
To reduce cyclomatic complexity, the boolean command line argument checks
were moved to a new function.
Signed-off-by: John Akre <john.w.akre@intel.com>
Optionally included bundles (also-add) can now be omitted from the
install target by passing the --swupd-skip-optional flag or by setting
the swupdSkipOptional field in the config file.
Signed-off-by: John Akre <john.w.akre@intel.com>
This really should be released with the mixer tool instead,
but following the methodology from ister.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Added support for new progress bar steps reported by swupd.
Additionally, the install step for check_files_hash was updated to
differentiate it from validate_fullfiles.
Signed-off-by: John Akre <john.w.akre@intel.com>
When swupd outputs a -1 StepCompletion value, an indeterminate progress
bar is created for that step. Otherwise, a multi-step progress bar will
be created.
Fixes: #516
Signed-off-by: John Akre <john.w.akre@intel.com>
Now printPrefix is concatenated into the progress bar description. The
printPrefix is only intended for the mass installer, so it is removed
from the gui/tui progress bar descriptions.
Signed-off-by: John Akre <john.w.akre@intel.com>
Telemetry is now optional for the installer and the telemctl binary is
not present in the docker container, so removing the call to telemctl.
Signed-off-by: John Akre <john.w.akre@intel.com>
ExpandVariables was returning early, upon first variable expansion, instead of expanding all available variables.
Also removed unnecessary strings.Contains check as strings.ReplaceAll performs a similar check internally before operating.
Creating an admin user is now a requirement for an install, so the
manage user page has moved to the required tab. Additionally, the manage
user page requires at least one admin user to enable the confirm button.
Fixes: #544
Signed-off-by: John Akre <john.w.akre@intel.com>
We were only support version from the YAML file, now support
setting directly on the command line for swupd.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
This function has not been used for a long time and can
be misleading when making updates. Dropping.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Fixes: #559
Allow the format to be set in the configuration YAML file
as well as on the command line.
Useful for mixes.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
The gometalinter project has been deprecated and the golangci-lint
project has been selected as its replacement.
Previously failing errors for the gocyclo linter are skipped, but they
should be fixed eventually.
Fixes: #527
Signed-off-by: John Akre <john.w.akre@intel.com>
Allow setting the version url and content url to the same value
with a single argument of --swupd-url.
Useful for mixer
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
swupd had depreciated 'verify --fix' with 'os-install' a while ago.
Though we change the command, the method name was unchanged. Now
refactored the name and also just pass the entire model at creation
for future changes instead of just a few member datum.
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
When using advanced disk partitioning with an invalid setup and loading
the menu page or disk configuration page for the first time, the warning
messages were not set correctly. The warnings were incorrectly set
because the TargetMedias variable was unexpectedly overwritten to nil.
This change prevents unexpected overwrites of TargetMedias and sets
TargetMedias when it is uninitialized.
Fixes: #553
Signed-off-by: John Akre <john.w.akre@intel.com>
When --allow-insecure-http is not set and the IsValidURI function
recieves an HTTP URI, a warning will be displayed.
Signed-off-by: John Akre <john.w.akre@intel.com>