596 Commits
Author SHA1 Message Date
Mark D Horn a4f83fd0fe model: controller: Keep Image default
--keep-image defaults to true, we only try to remove an
image file if it is set to false.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.6
2019-11-26 14:50:47 -08:00
Mark D Horn f2e376e179 Ignore flags when installing onto physical media
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>
2.3.5
2019-11-25 17:23:40 -08:00
Mark D Horn a9befd5b40 gui: tui: Check for invalid interactive options
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>
2019-11-25 17:23:40 -08:00
Mark D Horn 44363205b5 storage: Add RAID type to known list
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>
2019-11-25 17:23:15 -08:00
Mark D Horn a46992d460 model: Refactor to enable command line overrides
Enable conversion from JSON to YAML to have values overridden by
the command line arguments.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2.3.4
2019-11-19 18:18:05 -08:00
Mark D Horn b7a52f2d67 controller: Keep image if disabling ISO
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>
2019-11-19 18:18:05 -08:00
Mark D Horn 13f3872640 Revert "mixer: Add image template for use by mixer"
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.
2019-11-19 18:18:05 -08:00
Mark D Horn dc513d49e3 args: Add Bundles command line option
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>
2019-11-19 18:18:05 -08:00
Mark D Horn 200d9313f1 args: Add Template generation mode
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>
2019-11-19 18:18:05 -08:00
Mark D Horn 2afeff5721 model: Warning on extra kernels for json to yaml
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>
2019-11-19 18:18:05 -08:00
Mark D Horn 446d8ef177 scripts: Community link moved
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-19 17:39:43 -08:00
Reagan Lopez eb828da9de Skip ISO generation if additional kernels are present
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>
2019-11-19 11:06:17 -08:00
Mark D Horn 44840cff7c pxe: Block service if no config file
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>
2019-11-14 13:54:16 -08:00
John 6f317e1a86 scripts: Add pxe reference script
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>
2.3.3
2019-11-06 13:28:47 -08:00
Mark D Horn b80f568c70 args: Drop auto test coverage
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>
2019-11-06 13:09:44 -08:00
Mark D Horn af49072ac4 boot: use image mode
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>
2019-11-06 13:09:44 -08:00
Mark D Horn 235b054c04 Ensure we remove lockfile when rebooting
Calling reboot means a race if defer functions will get
called before the process is shutdown.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn f74a0d1c46 args: Add retry to conf download
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>
2019-11-06 13:09:44 -08:00
Mark D Horn 6ab2c723c9 mass: Enable automatic reboots
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>
2019-11-06 13:09:44 -08:00
Mark D Horn 5f9f92f179 Fix spacing in makefile
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 3723f04da6 args: Provide clear url download error
Include a message about what URL we failed to download as well
as an exit status number.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
Mark D Horn 9676538080 Add provisioning service for PXE installs
Used by PXE installations to start the install at boot-time.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-11-06 13:09:44 -08:00
John Akre 1deccf4e8c args: Create function for boolean flag checks
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>
2019-11-04 09:06:25 -08:00
John Akre 53db1a1fd9 swupd: Support skipping optional bundles
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>
2019-11-04 09:06:25 -08:00
Mark D Horn 8e30452da1 travis: test building an image
Build a baseline image as part of regression.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-30 11:05:23 -06:00
Mark D Horn 137ad30917 test: Add new image generation test
This is a baseline test to know we can install to an image.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-30 11:05:23 -06:00
Mark D Horn 0683fdfc64 mixer: Add image template for use by mixer
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>
2019-10-28 11:06:28 -06:00
John Akre 0f9f5b566a swupd: Remove totalSteps from JSON
Remove totalSteps from swupd JSON message to align with swupd's removal
of this entry.

Signed-off-by: John Akre <john.w.akre@intel.com>
2.3.2
2019-10-16 09:15:42 -07:00
John Akre 1dd110db26 swupd: Add new progress bar steps
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>
2019-10-16 09:15:21 -07:00
John Akre fe52e7046e swupd: Support indeterminate progress bars
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>
2019-10-16 09:15:21 -07:00
John Akre c7fae814b5 swupd: Concatenate printPrefix with description
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>
2019-10-16 09:15:21 -07:00
John Akre 190ad0b6bc travis: Remove telemctl
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>
2019-10-14 16:35:42 -07:00
Mark D Horn e4f9e947b4 utils: Add new tests to coverage
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-11 14:06:01 -07:00
Mark D Horn 65244af8b0 utils: Add unit test for variable expansion
Also correct a comment in the code

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-11 14:06:01 -07:00
Tom Lanyon c332005e4e Fix early exit in utils.ExpandVariables
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.
2019-10-11 09:50:14 -07:00
John Akre e4bbebaa36 tui: Move manage user to required tab
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>
2019-10-10 15:10:59 -07:00
John Akre 67fcb71f77 tui: Create admin users by default
The admin checkbox is set by default when creating a new user.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
John Akre bc3c1daa83 tui: Enable install button after requirements done
Now, the install button is enabled when all of the required pages are
completed.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-10 15:10:59 -07:00
Mark D Horn 0dcc486b91 tui: Set done when media selected
The media page was not set done correctly when advanced
partitioning was used.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-10 14:37:41 -07:00
Mark D Horn a3ac0ad7a4 args: Allow setting version on command line
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>
2.3.1
2019-10-08 16:45:11 -07:00
Mark D Horn 2187466463 main: fix spelling error in strings
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-08 16:45:11 -07:00
Mark D Horn a0f1805ef3 tui: Fix Title Case
This is the only menu options not in Title Case.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-10-08 16:27:25 -07:00
Mark D Horn 372ed41da7 swupd: Clean up unused code
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>
2019-10-08 15:22:26 -07:00
Mark D Horn e482042355 swupd: model: Allow format to be set in config
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>
2019-10-08 14:09:00 -07:00
John Akre b640f8b3fe Makefile: Enable all linters for travis
The golangci-lint linter is fast enough to run all the linters in travis
without timing out.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-08 09:51:02 -07:00
John Akre d56dc35e07 Makefile: Replace gometalinter with golangci-lint
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>
2019-10-08 09:51:02 -07:00
Mark D Horn 48499d44da args: Enable --swupd-url for shorthand
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>
2019-10-08 09:41:49 -07:00
Mark D Horn a775026a65 swupd: Refactor name of swupd command
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>
2019-10-07 18:37:36 -07:00
John Akre e7c4128b72 storage: Synchronize device changes with udev
Device changes must be synchronized with udev before calling lsblk to
get accurate lsblk output.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-04 14:33:29 -07:00
John Akre 2e5692ae53 gui: Correctly set advanced disk config warnings
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>
2019-10-04 14:33:29 -07:00