Commit Graph

2335 Commits

Author SHA1 Message Date
Kyle Walker 613d91299d Correct "recipes" use to "blueprints" in composer-cli description
The original "recipes" term is indicated in the composer-cli description,
but the identifier has been changed to "blueprints" with later releases.
This commit changes the string to "blueprints".
2019-04-05 15:06:19 -07:00
Jan Stodola b57de93468 Fix keeping files on Amazon s3 2019-04-04 15:07:46 +03:00
Jan Stodola db7b1e4fcd Allow to keep objects in AWS
Instances, Volumes, Snapshots, AMIs and s3 objects with the "keep_me" tag will
not be deleted automatically even if they are older then the specified time limit.
2019-04-03 23:01:15 +03:00
David Shea 35e44ffb37 Fix the google cloud boot console settings
Forgot the 'console=' part.
2019-04-03 13:41:29 -04:00
David Shea 44e14176bb Add a compose type for alibaba.
This compose type creates a partitioned disk as a qcow2 file, but with
only one partition instead of using a separate /boot.
2019-04-03 13:05:31 -04:00
David Shea 434fe58c28 Add a new compose type for Hyper-V
This is based on the VHD compose type, with the following differences:

  * Use the vhdx format instead of vhd
  * No WALinuxAgent
  * Install hyperv-daemons

The hyperv-daemons are activated through udev rules, so there is no need
to add them to the services line.
2019-04-03 13:00:37 -04:00
David Shea c6fcf9d1eb Add a compose check for google cloud images. 2019-04-02 10:15:42 -04:00
David Shea bd804c271b Add a compose type for Google Compute Engine 2019-04-02 10:15:42 -04:00
David Shea c941b82b0c Add a new output type, tar-disk.
This option will create an optionally compressed tarball containing a
disk image. This format is used by Google's Compute Engine.

This also adds a new option, tar_disk_name, to set the name of the disk
image that will be wrapped in the final tarball. opts.image_name
continues to be the final output file name.
2019-04-02 10:15:42 -04:00
David Shea c585b91422 Support compressing single files.
Modify imgutils.compress to allow the "rootdir" argument to be either a
directory or a single file to add to an archive.
2019-04-02 10:15:42 -04:00
David Shea 8ef4f431d8 Add an option to align the image size to a multiplier.
If provided, round the disk image size up to a multiple of the value.
This allows for image formats with specific size-alignment requirements
(e.g., disk size must be in GiB).
2019-04-02 10:15:42 -04:00
Brian C. Lane 3d3dda1400 Automatic commit of package [lorax] release [31.2-1].
Created by command:

/bin/tito tag
2019-04-01 11:25:58 -07:00
Brian C. Lane ba2d834425 Add documentation references to lorax-composer service files 2019-04-01 09:31:36 -07:00
Brian C. Lane 6fd06c6931 Add more tests for gitrpm.py
Make sure that dotfiles are installed when not directly under /
Make sure / is not packaged in the rpm (it will cause a conflict with
the filesystem package).
Make sure that using destination="/" works
2019-03-29 14:05:09 -07:00
Brian C. Lane 049f68cb60 lorax-composer: Fix installing files from [[repos.git]] to /
rpmfluff was including / in the rpm, which conflicts with
filesystem.rpm

The rpm globs are pretty limited, and we don't actually know the file
paths until later, so we have to use a glob or a directory.

So when the destination is / it now uses /* to select all the files and
sub-directories in the archive. The limitation of this is that it cannot
support dotfiles directly under /, they will cause a rpmbuild error.

For destinations other than / it uses the name of the directory, so
dotfiles are fine in that situation.
2019-03-29 08:45:39 -07:00
Brian C. Lane 69d0913070 New lorax documentation - 31.1 2019-03-27 16:44:14 -07:00
Brian C. Lane 2acd13d612 Make it easier to generate docs for the next release
Change the docs-in-docker target to generate the docs for the NEXT
release, not the current one. Also pass in uid/gid so that the new files
can be set to the correct ownership instead of root.

Modify docs/conf.py to bump the version of the docs if
LORAX_VERSION=next is set in the environment.
2019-03-26 16:55:51 -07:00
Brian C. Lane 1855ffeb8e Automatic commit of package [lorax] release [31.1-1].
Created by command:

/bin/tito tag
2019-03-26 14:14:27 -07:00
Brian C. Lane d178189ef3 qemu wasn't restoring the terminal if it was terminated early
You would need to run reset to regain control of your terminal after
this happened, so this turns off the monitor and serial port mux to
stdout.
2019-03-26 13:33:47 -07:00
Brian C. Lane 6c6e4fced1 Switch the --virt-uefi method to use SecureBoot
This updates the qemu arguments so that it will actually work, and
switches to using SecureBoot OVMF firmware.
2019-03-26 13:32:12 -07:00
Brian C. Lane df3aeee802 pylorax.ltmpl: Add a test for missing quotes
It should raise an error if a quote is missing in the template.
2019-03-26 13:30:25 -07:00
Brian C. Lane 6ccbfe0585 Don't remove chmem and lsmem from install.img 2019-03-26 13:29:35 -07:00
Brian C. Lane 5dea308080 lorax-composer: pass customization.kernel append to extra_boot_args
This allows iso builds to include the extra kernel boot parameters by
passing them to the arch-specific live/*tmpl template.

Also adds tests to make sure it is written to config.toml in the build
metadata.
2019-03-26 11:06:57 -07:00
Brian C. Lane f9665940bb Improve logging for template syntax errors
The shlex splitting can fail, resulting in error messages like:

ERROR livemedia-creator: No closing quotation

without any context in the log files. This logs the line that failed to
be split and expanded.
2019-03-26 11:06:57 -07:00
Brian C. Lane 235813212f Add extra boot args to the livemedia-creator iso templates
This adds a new livemedia-creator argument, --extra-boot-args, which can
be used to add arguments to the kernel command-line in the templates.
2019-03-26 11:06:57 -07:00
Brian C. Lane 59464286f9 lorax-composer: Add the ability to append to the kernel command-line
Sometimes it is necessary to modify the kernel command-line of the
image, this adds support for a [customizations.kernel] section to the
blueprint:

[customizations.kernel]
append = "nosmt=force"

This will be appended to the kickstart's bootloader --append argument.

Includes tests for modifying the bootloader line, the kickstart
template, and examining the final-kickstart.ks created for a compose.
2019-03-26 11:06:57 -07:00
Jiri Kortus 655e7e40c0 Add checks for disabled root account
The root account checks are applied to generated and deployed images
to make sure that root account is locked, except for live ISO.
2019-03-22 12:06:34 +02:00
Chris Roberts 32d5ff8615 Update datastore for VMware testing 2019-03-21 17:53:46 +02:00
Brian C. Lane 33498b8a87 Automatic commit of package [lorax] release [31.0-1].
Created by command:

/bin/tito tag --keep-version
2019-03-15 11:39:39 -07:00
Brian C. Lane 8c2184d59e Add tests using repos.git in blueprints
- Check final-kickstart.ks for the rpm source
- Check final-kickstart.ks for the rpm package name and version
- Make sure depsolve works
- Make sure errors from a bad repo are returned correctly
- Make sure errors from a bad reference are returned correctly

This moves _wait_for_status into a helper function so it can be shared
between the test classes.
2019-03-15 11:18:12 -07:00
Brian C. Lane 02f757d231 Move git repo creation into tests/lib.py
This way it can be shared with test_server.py
2019-03-15 11:18:12 -07:00
Brian C. Lane 61efa91a03 rpmgit: catch potential errors while running git
Log them and report them as RuntimeError. Also add a couple tests for
them.
2019-03-15 11:18:12 -07:00
Brian C. Lane c26477a63c tests: Add test for Recipe.freeze() function
The freeze function was not being tested. Add a test for it using the
repos.git test recipe.
2019-03-15 11:18:12 -07:00
Brian C. Lane cd8c884adb Add repos.git support to lorax-composer builds
This hooks up creation of the rpm to the build, adds it to the
kickstart, and passes the url to Anaconda. The dnf repo with the rpms is
created under the results directory so it will be included when
downloading the build's results.
2019-03-15 11:18:12 -07:00
Brian C. Lane f6f2308765 Add pylorax.api.gitrpm module and tests
This handles creating the rpm from the dictionary describing the
repository and rpm. Also adds tests for archive and rpm creation.
2019-03-15 11:18:12 -07:00
Brian C. Lane d7b96c8f0f Add support for [[repos.git]] section to blueprints
This adds support, documentation, and testing for a [[repos.git]]
blueprint section that can be used to install files from a git
repository. It will create an rpm that will be added to the build,
and included in the metadata that can be downloaded. This allows you to
accurately keep track of the source of configuration files and extra
metadata that is added to the build.

The source repo and reference will be listed in the rpm's summary making
it easy to discover on the installed system.
2019-03-15 11:18:12 -07:00
Brian C. Lane 372bef945f Update ppc64le isolabel to match x86_64 logic
It was substituting _ which didn't match what pungi uses for creating
the DVD. Make things consistent and use - as the replacement character.

Resolves: rhbz#1687882
2019-03-15 11:16:58 -07:00
Brian C. Lane b1407900ac Add blacklist_exceptions to multipath.conf
Resolves: rhbz#1685363
2019-03-15 08:30:51 -07:00
Brian C. Lane 5f530bd501 tests: Add python3-mock and python3-sphinx_rtd_theme
Whatever was pulling them in has stopped so we need to add them to the
list.
2019-03-13 11:56:32 -07:00
Alexander Todorov f5286e1243 Use make ci inside test-in-copy target
this minimizes the possibility of these two to diverge over time.
make ci is the default for Jenkins and will also be used for
internal gating tests.
2019-03-10 21:31:33 +02:00
Alexander Todorov 85dfbd7911 Allow overriding $CLI outside test scripts
this will allow you to test against installed RPM like so:

    # export CLI="/usr/bin/composer-cli"
    # make test_images

If you already have lorax-composer running then you can directly
execute test scripts:

    # ./tests/cli/test_build_and_deploy_aws.sh
2019-03-10 21:29:55 +02:00
Brian C. Lane e39d2aec22 tests: Make it easier to update version globs
Use constants so we won't have to edit a dozen places in the test when
the package versions are bumped.

Also switch to using Fedora 31 GPG key now that it has branched for
Fedora 30.
2019-03-08 10:09:42 -08:00
Alexander Todorov eef11ef405 New test: Build live-iso and boot with KVM
explicitly enables sshd for live-iso during testing
2019-03-04 13:19:57 +02:00
Brian C. Lane d32f477e0b lorax-composer: Return UnknownBlueprint errors when using deleted blueprints
Reading a blueprint wasn't checking to see if it had been deleted so it
was returning the most recent commit before it had been deleted. This
allowed things like starting a compose with a blueprint that technically
doesn't exist.

One exception to this is the /changes/ route, it must be available so
that you can use the commit hash to undo a delete.

This also adds tests for the various operations.

Resolves: rhbz#1682113
2019-03-01 14:39:21 -08:00
Brian C. Lane 26bd2c1378 lorax-composer: Delete workspace copy when deleting blueprint
Also extends the blueprint delete test to also check the workspace.
2019-03-01 14:39:21 -08:00
Alexander Todorov b936dfb198 New test: Build qcow2 compose and test it with QEMU-KVM 2019-02-27 10:36:44 +02:00
Brian C. Lane 11955f0550 Automatic commit of package [lorax] release [30.16-1].
Created by command:

/bin/tito tag
2019-02-25 14:43:09 -08:00
Brian C. Lane fc9ccb51ee Fix pylint problems with vmware_list_vms.py 2019-02-25 14:38:37 -08:00
Brian C. Lane a7e96ab828 Makefile: Make the .test-results directory
podman won't run if it is missing.
2019-02-25 14:37:57 -08:00
Brian C. Lane f3c147448a Add a ppc64le template for live iso creation 2019-02-25 13:49:12 -08:00