Commit Graph

2126 Commits

Author SHA1 Message Date
Brian C. Lane
2779565820 livemedia-creator: Increase the root partition to 7000
So that it doesn't run out of space.
2019-08-14 16:24:45 -07:00
Brian C. Lane
ac6d408115 Remove fedora-productimg-workstation, now included with anaconda 2019-08-14 15:38:56 -07:00
Brian C. Lane
2a4d2f3a9b Fix live/x86.tmpl indents removed by commit 6aa0a3fdf 2019-08-14 15:11:25 -07:00
Brian C. Lane
d7fe470183 Automatic commit of package [lorax] release [29.29-1].
Created by command:

/bin/tito tag
2019-05-09 13:19:37 -07:00
Brian C. Lane
89c590dc13 Revert "Pass ssl certificate options to anaconda"
This reverts commit 8814231a09.

Fedora 29 version of pykickstart doesn't support this.
2019-05-09 13:18:36 -07:00
Brian C. Lane
46e5c3717f Automatic commit of package [lorax] release [29.28-1].
Created by command:

/bin/tito tag
2019-05-07 15:56:13 -07:00
Brian C. Lane
48ba83b67b New lorax documentation - 29.28 2019-05-07 15:46:06 -07:00
Brian C. Lane
4b87dc09d0 Change customizations.firewall to append items instead of replace
To maintain consistency with the other options this changes firewall to
combine the existing settings from the image template with the settings
from the blueprint.

Also updated the docs, added a new test for it, and sorted the output
for consistency.

(cherry picked from commit 3e08389a0f)
(cherry picked from commit 9d48aa4d92)
2019-05-06 12:09:00 -07:00
Brian C. Lane
36ba09345b Update customizations.services documentation
Make it clear that the services are added to services already listed in
the image templates, and that you can specify any systemd unit filename.

Older releases are more restrictive, and this documentation will need to
be updated when these changes are backported.

(cherry picked from commit 4f701e7e92)
(cherry picked from commit 80281c7ad4)
2019-05-06 12:09:00 -07:00
Brian C. Lane
0945c9b81f lorax-composer: Add services support to blueprints
Add support for enabling and disabling systemd services in the
blueprint. It works like this:

    [customizations.services]
    enabled = ["sshd", "cockpit.socket", "httpd"]
    disabled = ["postfix", "telnetd"]

They are *added* to any existing settings in the kickstart templates.

(cherry picked from commit 1111aee92d)
(cherry picked from commit 69cc1b17f2)
2019-05-06 12:09:00 -07:00
Brian C. Lane
f39e965fb2 lorax-composer: Add firewall support to blueprints
You can now open ports in the firewall, using port numbers or service
names:

    [customizations.firewall]
    ports = ["22:tcp", "80:tcp", "imap:tcp", "53:tcp", "53:udp"]

Or enable/disable services registered with firewalld:

     [customizations.firewall.services]
     enabled = ["ftp", "ntp", "dhcp"]
     disabled = ["telnet"]

If the template contains firewall --disabled it cannot be overridden,
under the assumption that it is required for the image to boot in the
selected environment.

(cherry picked from commit 4d35668ab5)
(cherry picked from commit 9f1756cc27)
2019-05-06 12:09:00 -07:00
Brian C. Lane
725a0437c7 lorax-composer: Add locale support to blueprints
You can now set the keyboard layout and language. Eg.

[customizations.locale]
languages = ["en_CA.utf8", "en_HK.utf8"]
keyboard = "de (dvorak)"

Existing entries in the kickstart templates are replaced with the new
ones. If there are no entries then it will default to 'keyboard us' and
'lang en_US.UTF-8'

Includes tests, and leaves the existing keyboard and lang entries in the
templates with a note that they can be replaced by the blueprint.

(cherry picked from commit e5a8700bdf)
(cherry picked from commit 49259c607b)
2019-05-06 12:09:00 -07:00
Brian C. Lane
acad424005 lorax-composer: Fix customizations when creating a recipe
This fixes the customizations list problem earlier than in
add_customizations.

In the recipe it should be [customizations] not [[customizations]]
which creates a list. If it was used that way grab the first element and
replace the list with it.

(cherry picked from commit 67007dfa60)
(cherry picked from commit 84a9fcccde)
2019-05-06 12:09:00 -07:00
Brian C. Lane
6368b0e83b Update docs for new timezone section
(cherry picked from commit 2929deaf01)
(cherry picked from commit a31df965e7)
2019-05-06 12:09:00 -07:00
Brian C. Lane
2c03c49149 lorax-composer: Add timezone support to blueprint
For example:

[customizations.timezone]
timezone = "US/Samoa"
ntpservers = ["0.pool.ntp.org"]

Also includes tests.

This removes the timezone kickstart command from all of the templates
except for google.ks which needs to set it's own ntp servers and timezone.

If timezone isn't included in the blueprint, and it is not already in a
template, it will be set to 'timezone UTC' by default.

If timezone is set in a template it is left as-is, under the assumption
that the image type requires it to boot correctly.

(cherry picked from commit 9bdbb29662)
(cherry picked from commit 40150508b8)
2019-05-06 12:09:00 -07:00
Brian C. Lane
25bac2fe65 Proposal for adding to the blueprint customizations
The goal here is to do the minimum needed to get the images setup for
use so they can have more complex customizations applied later.
I think this list is a pretty good minimal set of features without going
full kickstart.

(cherry picked from commit 95c288d829)
(cherry picked from commit e682d309ed)
2019-05-06 12:09:00 -07:00
Jiri Kortus
a91dfee3a5 Add test for starting compose with deleted blueprint
(cherry picked from commit 21e141a84c)
(cherry picked from commit d78f58a0cb)
2019-05-06 12:08:17 -07:00
Chris Roberts
e001c6aaa4 Update VMware info for VMware testing
(cherry picked from commit 0fa5af2e30)
(cherry picked from commit 03bbd030a0)
2019-05-06 12:08:17 -07:00
Brian C. Lane
5230b8d30e tests: Cleanup on failure of in_tempdir
Otherwise other tests will also fail when they try to run from the wrong
directory.

(cherry picked from commit 65b8a2be68)
(cherry picked from commit 94e2651cf6)
2019-05-06 12:08:17 -07:00
Alexander Todorov
b94fdddc7c Change [[modules]] to [[packages]] in tests
> bcl: this should really be [[packages]] since [[modules]] is
> going to change to actual modules at some point

(cherry picked from commit 933fad9ded)
(cherry picked from commit eb4a8ac3b1)
2019-05-06 12:07:54 -07:00
Alexander Todorov
cc2c3bbbd2 Add new test to verify compose paths exist
because they are mentioned in the official documentation

(cherry picked from commit e45e645fd0)
(cherry picked from commit 31b260ccf2)
2019-05-06 12:07:54 -07:00
Alexander Todorov
6e3eeed1da Add new sanity tests for blueprints
- verify SemVer .patch number will be automatically updated when
  we push the blueprint a second time without changing version
- verify show displays the content in TOML format and it matches
  what is on disk. Because of that also start with empty packages
  and groups fields in the initial toml. If they are missing they
  will be added automatically by lorax-composer and this simplifies
  the test
- verify delete works

(cherry picked from commit 7cbb324ae5)
(cherry picked from commit ce549d861d)
2019-05-06 12:07:54 -07:00
Jiri Kortus
33451f0a60 Fixes for locked root account test
Fixes related to a few issues in the locked root account test I somehow
managed to overlook in the initial commit.

(cherry picked from commit 209bdd6911)
(cherry picked from commit 08ae3613fe)
2019-05-06 12:07:54 -07:00
Kyle Walker
56699c4818 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".

(cherry picked from commit 613d91299d)
(cherry picked from commit 4045c0c476)
2019-05-06 12:07:54 -07:00
Jan Stodola
fa1aeec58e Fix keeping files on Amazon s3
(cherry picked from commit b57de93468)
(cherry picked from commit ae5475c178)
2019-05-06 12:07:54 -07:00
Jan Stodola
0314b6125f 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.

(cherry picked from commit db7b1e4fcd)
(cherry picked from commit 0029f23b0e)
2019-05-06 12:07:54 -07:00
David Shea
712ae7a721 Fix the google cloud boot console settings
Forgot the 'console=' part.

(cherry picked from commit 35e44ffb37)
(cherry picked from commit bc8c356d87)
2019-05-06 12:07:29 -07:00
David Shea
9a4a45f05a 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.

(cherry picked from commit 44e14176bb)
(cherry picked from commit 0f59e576d8)
2019-05-06 12:07:29 -07:00
David Shea
0220077242 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.

(cherry picked from commit 434fe58c28)
(cherry picked from commit 367c2583e4)
2019-05-06 12:07:29 -07:00
David Shea
c1628bd171 Add a compose check for google cloud images.
(cherry picked from commit c6fcf9d1eb)
(cherry picked from commit f35425795e)
2019-05-06 12:07:29 -07:00
David Shea
69caef3c2d Add a compose type for Google Compute Engine
(cherry picked from commit bd804c271b)
(cherry picked from commit 846d839980)
2019-05-06 12:07:29 -07:00
David Shea
4e144e15b7 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.

(cherry picked from commit c941b82b0c)
(cherry picked from commit 121717ac4a)
2019-05-06 12:07:29 -07:00
David Shea
b52877b63c 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.

(cherry picked from commit c585b91422)
(cherry picked from commit 5308e7bfec)
2019-05-06 12:07:29 -07:00
David Shea
c74e50d99d 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).

(cherry picked from commit 8ef4f431d8)
(cherry picked from commit b2a33d5654)
2019-05-06 12:07:29 -07:00
Brian C. Lane
ce879af719 Add documentation references to lorax-composer service files
(cherry picked from commit ba2d834425)
(cherry picked from commit 93accbcfb9)
2019-05-06 12:07:29 -07:00
Brian C. Lane
4fa08eb8e1 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

(cherry picked from commit 6fd06c6931)
(cherry picked from commit d5d60ebe6d)
2019-05-06 12:07:06 -07:00
Brian C. Lane
e84bf3a64c 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.

(cherry picked from commit 049f68cb60)
(cherry picked from commit 4073dd4e4d)
2019-05-06 12:07:06 -07:00
Brian C. Lane
c9f076c86d 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.

(cherry picked from commit 2acd13d612)
(cherry picked from commit a71ef40dd5)
2019-05-06 12:07:06 -07:00
Brian C. Lane
7a86aa1d17 pylorax.ltmpl: Add a test for missing quotes
It should raise an error if a quote is missing in the template.

(cherry picked from commit df3aeee802)
(cherry picked from commit 1d4f47e26f)
2019-05-06 12:07:06 -07:00
Brian C. Lane
156e0ba7c9 Don't remove chmem and lsmem from install.img
(cherry picked from commit 6ccbfe0585)
(cherry picked from commit 389fd487da)
2019-05-06 12:07:06 -07:00
Jiri Kortus
4c313acc64 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.

(cherry picked from commit 655e7e40c0)
(cherry picked from commit 7c093ecbb4)
2019-05-06 12:07:06 -07:00
Chris Roberts
3339048a66 Update datastore for VMware testing
(cherry picked from commit 32d5ff8615)
(cherry picked from commit 7bf3371e33)
2019-05-06 12:07:06 -07:00
Brian C. Lane
c5108bce9f 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.

(cherry picked from commit 8c2184d59e)
(cherry picked from commit 78f79a94ec)
2019-05-06 12:06:06 -07:00
Brian C. Lane
5042867d19 Move git repo creation into tests/lib.py
This way it can be shared with test_server.py

(cherry picked from commit 02f757d231)
(cherry picked from commit 136f9d877a)
2019-05-06 12:06:06 -07:00
Brian C. Lane
b25995d9d4 rpmgit: catch potential errors while running git
Log them and report them as RuntimeError. Also add a couple tests for
them.

(cherry picked from commit 61efa91a03)
(cherry picked from commit 087b0fe8c6)
2019-05-06 12:06:06 -07:00
Brian C. Lane
7a6ebb0ad3 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.

(cherry picked from commit c26477a63c)
(cherry picked from commit bdf5572bc6)
2019-05-06 12:05:42 -07:00
Brian C. Lane
8696f197d4 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.

(cherry picked from commit cd8c884adb)
(cherry picked from commit 2e596010d3)
2019-05-06 12:05:34 -07:00
Brian C. Lane
0169422746 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.

(cherry picked from commit f6f2308765)
(cherry picked from commit efc77c1d71)
2019-05-06 12:05:34 -07:00
Brian C. Lane
21b03c2108 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.

(cherry picked from commit d7b96c8f0f)
(cherry picked from commit 047f174dcf)
2019-05-06 12:05:34 -07:00
Brian C. Lane
d9b55b78cb 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.

(cherry picked from commit 5f530bd501)
(cherry picked from commit de99a43485)
2019-05-06 12:00:22 -07:00