* Enable SELinux for tumbleweed and rename it to green
Signed-off-by: David Cassany <dcassany@suse.com>
* Disable SELinux on recovery and refine relabelling
Signed-off-by: David Cassany <dcassany@suse.com>
* Remove k3s-selinux, not needed for examples
Signed-off-by: David Cassany <dcassany@suse.com>
* Improve SELinux labelling
Signed-off-by: David Cassany <dcassany@suse.com>
* Fix unit tests
Signed-off-by: David Cassany <dcassany@suse.com>
---------
Signed-off-by: David Cassany <dcassany@suse.com>
* bump elemental-toolkit to v2
Signed-off-by: David Cassany <dcassany@suse.com>
* Move pkg/types/v2 to simply pkg/types
This commit leaves the code with a single set of types
and in refers to it as the types packge instead of
v1 or v2.
For the time being we do not foresee managing more
than one single major version of type within the
same code.
Signed-off-by: David Cassany <dcassany@suse.com>
* Stop referring to mocks package as v2mock in favor of simply 'mocks'
Signed-off-by: David Cassany <dcassany@suse.com>
* Fix leftovers after rebase
Signed-off-by: David Cassany <dcassany@suse.com>
---------
Signed-off-by: David Cassany <dcassany@suse.com>
Specifically bumping from v1.7.2 to v4.3.0. We were pretty outdated.
This commit could not get rid of the old version dependency completely
because yip requires a vfs v1 within the plugin API and we implement
a yip plugin for partitioning in elemental-toolkit. Because of that
both versions are coexisting.
Signed-off-by: David Cassany <dcassany@suse.com>
This commit adds in elemental client the build-disk command. With this command we can eventually build an image that includes partitions:
* EFI
* OEM
* Recovery
* State
Having State partition to match the minimum size (to reduce resulting image size), only includes config files no image.
Then the State partition could be expanded on first boot to desired size (build-disk command already pre-appends the required cloud-config files for that to happen) and then the Persistent partition created at the end with all the available space (or some desired specific size too).
This setup can be executed without running a single mount (thanks to squashfs usage), meaning this disk could be built in a container or Dockerfile (like we do with ISOs).
Building full disks including all partitions with an specified size is still possible, however this approach requires mount privileges and because of that it can't be executed inside non privileged containers.
Signed-off-by: David Cassany <dcassany@suse.com>
Refactor of RunConfig struct to include more structured data to facilitate reuse of core elemental API and significantly improve configuration options and opportunities by using yaml configuration files.
Signed-off-by: David Cassany <dcassany@suse.com>
* Check partial yaml unmarshal errors
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Make sure cloud-init paths are created in the system
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Don't use terminal to read cmdline
Also, refactor common code
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Introduce FS interface
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Get rid of afero
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Add fs to rsync command
This allows the rsync library we use beneath to be fs-aware.
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Mitigate licence check on fs.go
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
* Fix gpt and efi basic installations
This commit is two fold:
* Moves partitioner tests to ginkgo
* Fixes and polishes the installation for GPT and EFI use cases
Signed-off-by: David Cassany <dcassany@suse.com>
* Add installation hooks
Signed-off-by: David Cassany <dcassany@suse.com>
* Add --no-format flag support
Signed-off-by: David Cassany <dcassany@suse.com>
Instead of having to initialize runners, logger and all that stuff all
around, just do it once, when you obtain the runConnfig, so then all we
need to do is access that value and pass the config around, which we are
gonna do anyway
Signed-off-by: Itxaka <igarcia@suse.com>