Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of customizations to RHEL8 #740

Merged
merged 13 commits into from Jun 10, 2019
Merged

Conversation

bcl
Copy link
Contributor

@bcl bcl commented May 29, 2019

--- Merge policy ---

  • Travis CI PASS
  • *-aws-runtest PASS
  • *-azure-runtest PASS
  • *-images-runtest PASS
  • *-openstack-runtest PASS
  • *-vmware-runtest PASS
  • For rhel8-* and rhel7-* branches commit log references an approved
    bug in Bugzilla. Do not merge if the bug doesn't have the 3 ACKs set to +!

--- Jenkins commands ---

  • ok to test to accept this pull request for testing
  • test this please for a one time test run
  • retest this please to start a new build

bcl added 9 commits May 29, 2019 15:04
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 95c288d)

Related: rhbz#1709595
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 9bdbb29)

Related: rhbz#1709595
(cherry picked from commit 2929dea)

Related: rhbz#1709595
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 67007df)

Related: rhbz#1709595
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 e5a8700)

Related: rhbz#1709595
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 4d35668)

Related: rhbz#1709595
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 1111aee)

Related: rhbz#1709595
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 4f701e7)

Related: rhbz#1709595
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 3e08389)

Resolves: rhbz#1709595
bcl added 3 commits May 29, 2019 16:34
(cherry picked from commit 9724731)

Related: rhbz#1709595
This also includes extensive tests for each of the currently supported
customizations. It should be generic enough to continue working as long
as the list of dicts includes a 'name' or 'user' field in the dict.
Otherwise support for a new dict key will need to be added to the
customizations_diff function.

(cherry picked from commit 850c490)

Related: rhbz#1709595
composer-cli will now output information about changes to customizations
entries and the repos.git entries.

(cherry picked from commit 156ef0a)

Related: rhbz#1709595
@coveralls
Copy link

coveralls commented May 29, 2019

Pull Request Test Coverage Report for Build 1688

  • 162 of 165 (98.18%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.4%) to 51.409%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pylorax/api/compose.py 103 104 99.04%
src/pylorax/api/recipes.py 59 61 96.72%
Files with Coverage Reduction New Missed Lines %
src/pylorax/api/compose.py 1 86.88%
Totals Coverage Status
Change from base Build 1684: 1.4%
Covered Lines: 2685
Relevant Lines: 5024

💛 - Coveralls

Support is not included in this patchset.

Related: rhbz#1709595
Copy link
Member

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@bcl bcl merged commit a643522 into weldr:rhel8-branch Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants