40 Commits
Author SHA1 Message Date
Mark D Horn d96230f8d9 tui: gui: Do not display version in Demo mode
For documentation purposes (screen shots), we do not want to
include the version string. Having a version string in the image
requires updating all image each release.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-08 16:04:27 -07:00
Reagan Lopez 9ee68d0a3e Initialize localization in test files
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-04-23 18:52:18 -07:00
Mark D Horn cff36aa736 Generate ISO Framework hook
Create the command line argument and configuration file changes
to support generating an ISO from the raw image.

TODO: Integrate the ISO generation code

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 15:06:47 -07:00
Mark D Horn 3334c1ff67 storage: Identify Install Target types
Safe: gpt disk with sufficient space
Destructive: All media (expect mounted)
Modify: all gpt disks

When adding new partitions, ensure we store the new
partition number and update the device name.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-18 12:48:36 -07:00
Mark D Horn 5dbee42d7d Fix Network Interface Copy
Fixes Issue: #261

Pull Request #236 introduced a bug where local network interfaces
are always copied to the target media.
This PR correct this by only copying when copyNetwork is set to
true; this is enabled in the UI when the users changes a network
interface (for static).

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-12 15:17:58 -07:00
Mark D Horn f424bdb143 Track user selected bundle separately
Fixes Issue: #242

Only show user selected bundles on the summary menu item for
bundle selection; not core, required bundles.

Make the latest user bundle changes more evident by prepending
them to the list of bundles to install.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-06 13:20:26 -08:00
Reagan Lopez f61d7092ab Add support for ister json config
- The new -j flag detects ister json config format and converts it to yaml
- The existing -c flag also detects ister json config format, converts it to yaml
  and continues as usual
- Handles the ister "rest" option for physical targets
- Handles multiple targets

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-03-05 13:55:44 -08:00
Mark D Horn 4735fe9db0 Use LTS Kernel for VirtualBox Installs
If running interactively and in a VirtualBox environment
force the default to be the kernel-lts.

Fixes #203

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-01-28 18:40:46 -08:00
Mark D Horn 17894ff6e0 Add date/time stamp to configuration file
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-12-07 22:24:58 -08:00
Mark D Horn 037d4991ef Improve Test Coverage for new features
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Mark D Horn c43135f6ee Support Encrypted partitions
Fixes #10

Enable encrypted partitions for all but /boot.

A single passphrase is used for all partitions which enable encryption
expect swap, which currently uses a random password each boot.
NOTE: If we need to support a large swap for laptop suspend/restore, we
should change from a random passphrase to the same known passphrase.

/etc/crypttab will attempt to use either the disk label or the
UUID to identify the disk instead of the physical disk name.

Swap partition would normally loose its UUID or Label each boot
due to dm-crypt and mkswap overwriting the connect. To maintain
identification of the partition, we use a trick from here:
https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption
of creating a small (1M) ext2 partition with label at the beginning
of the swap partition, then use an offset in the /etc/crypttab to
prevent overwriting this information.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-29 12:35:26 -08:00
Mark D Horn 260f769b3e Improve binary versioning
Now the version string in the binary is set by the
existing tag, plus the sha if changes exists beyond
the tag, plus "dirty" if built with uncommitted changes.

Tagging of releases is now a manual process, but the Makefile
will still print the instructions.

Also saves us creating a PR just to change the version string.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-15 11:23:40 -08:00
Mark D Horn 49f1020ecd Release Candidate 1.0.3
Fixes #160

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-14 12:54:57 -08:00
Mark D Horn 79de936a59 Release Candidate 1.0.2
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-11-09 10:27:40 -08:00
Leandro Dorileo b48d707fdc model: add env configuration
Now users may defined environment variables to be used in the image
generation. Also, these variables are passed down to the pre and post
install hook scripts.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-11-08 14:30:00 -08:00
Mark D Horn a50011a773 Release Candidate 1.0.1
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-31 13:54:28 -06:00
Leandro Dorileo 8bbaff2bd7 storage: support LegacyBios mode
With legacy bios mode the storage will not require EFI partition.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-26 16:03:11 -07:00
Mark D Horn 9a6bef9937 Update version for initial release
This version will be release in parallel with ister_gui for
both validation and identification of any other required features
to release ister.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 15:58:39 -07:00
Mark D Horn b7fe01d5f8 Set the language on target system
Also change to using 'locale -a' to generate possible languages
installed as 'localectl' is currently broken due to the relocation
of the locales from /usr/lib to /usr/share.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Mark D Horn b6589ef0bd Set the keyboard on target system
- No longer set the keyboard on the host system in main

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Mark D Horn 3339c19a50 Set the time zone on target system
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-23 10:03:34 -07:00
Leandro Dorileo 82beb2e89b user: add ssh-keys configuration
Add the user's ssh-keys configuration support as well as the required
bits to creathe the authorized_keys file.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-17 12:36:56 -07:00
Leandro Dorileo 301bedfb2d image: fix image overwrite
We're failing to detect if the the target system block device is an
image file or a device file, with that we fail to overwrite the image
assuming the target file is /dev/<img-file> instead of setting the
loop device up and using it.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-10 13:24:05 -07:00
Leandro Dorileo 0742f0f521 args: add --block-device argument
With the --block-device command line argument the user can remap
or add an entry to configuration file's block-devices definition.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo d9d8e10566 model: add test for mixed block devices config
A alias can be used for a single partition only, this test makes
sure we test the case.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo 0a52b8e030 model: add test for kernel validation
Kernel configuration is mandatory. This test makes sure we cover that.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Leandro Dorileo 7c75841c3b block device alias: support the use of both device file and image
Make sure we keep only the used alias and make sure they can co-exist.
Currently if you have a device file alias and an image file alias
the image will always be created - even if it's not in use.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-09 16:46:40 -07:00
Mark D Horn eb0c9a22f6 More temp file clean up
- Hid the makefile comment
- Catch additional test case that need to clean up the
  temp downloaded file

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-10-03 12:22:51 -07:00
Leandro Dorileo 76d871ee11 tests: make valid minimal a minimal test again
I started increasing the minimal test but it's minimal for a reason -
to be minimal.

This patch moves the pre and post hook tests to their own test file.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-02 10:04:10 -07:00
Leandro Dorileo 63b6dba299 Add required bits to make image and install a target system into it.
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-02 10:04:10 -07:00
Leandro Dorileo b1334c2648 storage: add block-devices alias support
With this the user can add alias block devices and use these alias
to expand target media's Name values, i.e:

block-devices: [
   {name: "target", file: "/dev/sda"}
]

targetMedia:
- name: ${target}
  type: disk
  ...

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-10-02 10:04:10 -07:00
Leandro Dorileo a26b5415a1 model: add Version field
The mass-installer use case for image generation requires to specify
the target system version. This patch allows the configuration of
an arbitrary version.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-27 14:50:33 -07:00
Leandro Dorileo a58c12d5d9 post-install: add post-install hooks support
Introduce the initial support to post-install hooks. The code also
expands a set of pre-defined variables, for now the only exposed
variable is the chrootDir (the directory where the target system is
mounted).

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-27 14:32:50 -07:00
Leandro Dorileo 4b5eacba1f model: add a minimal valid test
Introduce a minimal valid test, it shows the use of only the required
fields - specially for storage/media configurations.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-26 14:33:07 -07:00
Leandro Dorileo 5a04333999 model: kernel is a mandatory config
Add validation code to enforce the kernel configuration. We can't
proceed with an install if the target kernel is not specified.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-25 09:56:40 -07:00
Leandro Dorileo 28f1e0fa92 errors: start using ValidationError
For data model validation we start using the specialized ValidationError
to report that kind of problem. In that situation in the main program
we avoid panic'ing but nicely report the model validation issue and
reporting exit status 1.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-25 09:56:40 -07:00
Leandro Dorileo 3ed4c7ddfa kernel arguments: add "remove kernel arguments" support
We are relying on clr-boot-manager's cmdline-removal feature which
prevents a kernel argument to be added to the boot manager kernel
entry.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-20 16:39:35 -07:00
Leandro Dorileo 5c1b69c8d4 testsuite: prepare to enable check-coverage.sh on CI
This patch fixes the tests coverage regressions and add a small fix
to the script where it doesn't remove the temporary coverage report
file if it fails. Now it can be enabled on the CI and avoid adding
new testsuite regressions.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-19 15:56:54 -07:00
Leandro Dorileo 68bd76bea6 main menu: add new redesigned main menu
Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-14 10:51:20 -07:00
Mark D Horn e84bb0e403 First Open Source push of code base
This is code is still alpha. The Text-based User Interface is
undergoing a resign of the layout before beta.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-08-13 14:14:30 -07:00