Commit Graph

485 Commits

Author SHA1 Message Date
Brian C. Lane
e1d2e168ed Add an openstack image type
This is a qcow2 image with cloud-init in the template.

(cherry picked from commit 98f8b23129)

Resolves: rhbz#1656105
2018-12-07 13:59:45 -05:00
David Shea
5e64051665 Replace /etc/machine-id with an empty file
Since these images can be used to create multiple machines, they should
not have a unique machine-id attached to them. Replace /etc/machine-id
with an empty file so that it will be regenerated at boot time.

(cherry picked from commit 6fab72d894)

Related: rhbz#1656105
2018-12-07 13:59:45 -05:00
David Shea
4f28d87a6d Add virt guest agents to the qcow2 compose
(cherry picked from commit d5a1993640)

Resolves: rhbz#1656105
2018-12-07 13:59:45 -05:00
David Shea
4862eccd88 Add a vmdk compose type.
This is similar to the AMI type, but also adds open-vm-tools and does not do
anything special to the partitioning

(cherry picked from commit 1056bfc25b)

Resolves: rhbz#1656105
2018-12-07 13:59:45 -05:00
David Shea
202814ae9d Add a vhd compose type for Azure images
This is similar to the AMI compose type, with a handful of additional
changes specific to Azure:

* Add waagent (but leave NetworkManager enabled, despite some of the
  docs)
* Disable cloud-init
* Add Hyper-V modules into initrams.

Fixes specific for RHEL:

* Create ifcfg-eth0 required by waagent.
* Install python3 and net-tools required by waagent.

Recommended changes:

* Use recommended kernel boot args.
* Disable kdump.

(cherry picked from commit e0c236ff36)
(cherry picked from commit da0435bc90)
(cherry picked from commit b594fa99bc)

Resolves: rhbz#1656105
2018-12-07 13:59:45 -05:00
David Shea
61d4353bc7 Add an ami compose type for AWS images
This differs from lmc's --make-ami in that creates a full disk image instead of
an fsimage. Create a raw disk image with a / and /boot partitions, and enable
sshd, chronyd, and cockpit by default.

(cherry picked from commit 18188bf6cf)
(cherry picked from commit 81d38b6445)

Resolves: rhbz#1656105
2018-12-07 13:59:45 -05:00
Brian C. Lane
60c7ab3e91 lorax-composer: Install selinux-policy-targeted in images
This is required to ensure that SELinux is configured properly while
building. It fixes the problem with building tar, and should be
installed in the other image types for consistency.

Resolves: rhbz#1654795
2018-12-06 16:36:36 -08:00
Brian C. Lane
f113766f22 Lock the root account, except on live-iso
If we leave the root account w/o a password people will use it that way,
leading to insecure images. Also if we use a default password. So lock
the root account in the templates.

Users will need to do one of these things:
 1. Use [[customizations.user]] in their blueprint to configure root or
    another user.
 2. Use [[customizations.sshkey]] to set a key for root
 2. Install a package that configures a user at install time
 3. Install a package that sets up a user at boot time (eg. cloud-init)

This also drops the auth line from the kickstart templates, allowing it
to use the default password algoritm instead of md5.

Resolves: rhbz#1626120
2018-09-28 14:30:58 -07:00
Brian C. Lane
acc7b811b6 Move disklabel and UEFI support to compose.py
Currently we are making MBR disk images for qcow2 and partitioned disk,
so the UEFI packages aren't required at this point.

Move the clearpart command into compose.py so that in the futute it can
use clearpart --disklabel to create a GPT image, and add the required
packages to the package set.
2018-08-09 15:13:58 -07:00
Brian C. Lane
d030209d40 Drop part command from tar kickstart template. 2018-06-11 16:54:59 -07:00
Brian C. Lane
2697bb2bc7 Add support for building ext4 filesystem images. 2018-06-11 16:54:59 -07:00
Brian C. Lane
b2f5fe2f60 Removed the fixed partition size from composer ks templates
The default size is always going to be wrong, so try to estimate a more
reasonable amount of space. This is more complicated than you would
expect, yum's installedsize doesn't take into account the block size of
the filesystem, nor any extra artifacts generated by pre/post scripts.

So in the end we end up with a minimum image size of 1GiB, a partition
that is 40% larger than the estimated space needed, and a disk image
that increases size in 1GiB increments. This is still better than having
a fixed 4GiB / partition that was either too large or too small.
2018-06-11 16:54:59 -07:00
Brian C. Lane
af68a98abe Add qcow2 image type
Very similar to partitioned-disk, image is named disk.qcow2 instead of
disk.img
2018-06-11 16:54:58 -07:00
Brian C. Lane
6796861773 Add the partitioned-disk.ks file for the new output type 2018-06-11 16:54:58 -07:00
Brian C. Lane
4ae5944567 Add live-iso output support to lorax-composer
This ended up requiring more intrusive changes, but it should be the
most complex of the output types. After moving the core of
livemedia-creator into a function I added more settings to compose_args,
and more defaults to start_build. It now pulls the release information
from /etc/os-release, and produces a bootable .iso
2018-06-11 16:54:58 -07:00
Brian C. Lane
67da4d6971 Add building an image, and the /compose route to start it
This adds the ability to build a tar output image. The /compose and
/compose/types API routes are now available.

To start a build POST a JSON body to /compose, like this:

{"recipe_name":"glusterfs", "compose_type":"tar", "branch":"master"}

This will return a unique build id:

{
  "build_id": "4d13abb6-aa4e-4c80-a671-0b867e6e77f6",
  "status": true
}

which will be used to keep track of the build status (routes for this
do not exist yet).
2018-06-11 16:54:58 -07:00
Brian C. Lane
99254492e3 Replace fedora-gnome-theme with gnome-themes-standard (#1537573)
gnome-themes-standard used to provide fedora-gnome-theme, but dropped it
in version 3.22.2-1

Resolves: rhbz#1537573
2018-01-23 08:34:27 -08:00
Samantha N. Bueno
730badfebc Keep hid-multitouch and i2c-hid modules. (rhbz#1526323)
Several laptops require these modules for the touchpad to work.

Resolves: rhbz#1526323
2018-01-11 08:55:17 -08:00
Brian C. Lane
2c5ba00dc0 Add grub2-tools to aarch64 (#1489707)
These can be useful during installation or rescue.

Resolves: rhbz#1489707
2017-12-05 08:33:22 -08:00
Brian C. Lane
9429d392d6 Restore all of the grub2-tools on x86_64 and i386 (#1489707)
These can be useful during installation or rescue.
(They are already present on ppc64)

Resolves: rhbz#1489707
2017-10-13 09:00:31 -07:00
Vendula Poncova
9c6575689a Add dependencies for SE/HMC (#1498834)
Resolves: rhbz#1498834
2017-10-09 08:52:44 -07:00
Brian C. Lane
7a0b4f2070 s390 doesn't need to graft product.img and updates.img into /images (#1478448)
The /images directory is already grafted into the iso, so it
doesn't need a specific line for the .img files.

Related: rhbz#1478448
2017-09-29 09:31:34 -07:00
Brian C. Lane
df35857c9b Remove -boot-info-table from s390 boot.iso creation (#1478448)
It corrupts the kernel+initrd and isn't needed when booting on s390.

Related: rhbz#1478448
2017-08-18 10:19:28 -07:00
Brian C. Lane
e5c6f9e8bc Add creation of a bootable s390 iso (#1478448)
Use mk-s390-cdboot to create a combined kernel+initrd and then build a
boot.iso using it.

Resolves: rhbz#1478448
2017-08-11 16:02:52 -07:00
Brian C. Lane
5238b9cd18 Fix systemctl command (#1478247)
When multiple units are passed to systemctl and one fails it doesn't
finish the others. Change the template command to call systemctl for
each unit individually.

This also removes the lvm2-activation-generator in runtime-cleanup.tmpl

Resolves: rhbz#1478247
2017-08-11 15:49:10 -07:00
Brian C. Lane
7aa71188b9 Include the dracut fips module in the initrd (#1341280)
This will allow anaconda to fetch kickstarts using https when installing
with fips=1

Leave vmlinuz and .vmlinuz.hmac in /boot

dracut-fips module needs the vmlinuz.hmac file in order to boot.

Resolves: rhbz#1341280
2017-08-11 15:22:50 -07:00
Brian C. Lane
1d2639cd92 Remove the iso-graft check from the aarch64.tmpl
RHEL7 doesn't support the workdir+/iso-graft feature.

Resolves: rhbz#1369014
2017-06-19 14:58:40 -07:00
Brian C. Lane
5970d38a1a Fix aarch64 efi.tmpl invocation for live images
We didn't add "efiarch32" on aarch64 because it made no sense, but we
need to because it's not an optional argument in the other template.
Just make it efiarch32=None.

Also fixes a typo in share/live/uefi.tmpl

Related: rhbz#1310775
2017-06-05 14:27:47 -07:00
Brian C. Lane
6d5dc9cfa3 Add support for aarch64 live images
This adds the aarch64 template, and the grub2-efi config file to the
live template directory.

Resolves: rhbz#1369014
(cherry picked from commit 89c7a93508b7328fc9c180164b23fae29bcd022b)
2017-05-22 10:14:34 -07:00
Brian C. Lane
c271124e84 lorax: Remove cairo-sphinx from the image
It doesn't run because we remove the libcairo-script* libraries, and
isn't needed by anything in the installation environment. Its presence
causes automated tests checking for missing libs to raise an error.

Resolves: rhbz#1355681
2017-04-11 13:55:53 -07:00
Peter Jones
460bcd8f68 Fix aarch64 efi.tmpl invocation
We didn't add "efiarch32" on aarch64 because it made no sense, but we
need to because it's not an optional argument in the other template.
Just make it efiarch32=None.

Related: rhbz#1310775

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-04-07 17:31:18 -07:00
Jonathan Lebon
d7ae7a9e1f runtime-cleanup.tmpl: don't delete localedef
This is required in the future for anaconda to be able to inspect the
supported locales in Atomic Host installations.

Related: rhbz#1429576
2017-03-28 10:46:51 -07:00
Peter Jones
5d204bd21e Make 64-bit kernel on 32-bit firmware work for x86 efi machines
This enables Baytrail and similar atom CPUs that typically ship with a
32-bit firmware, but have a 64-bit capable CPU.

Resolves: rhbz#1310775

Signed-off-by: Peter Jones <pjones@redhat.com>
2017-03-21 16:54:07 -04:00
Robert Marshall
2ee0b0a2ae Keep fsfreeze in install environment (#1315468)
The latest POWER platform allows a host machine to configure guests
running in a different endian mode. Guests configured in this way may
have their bootloader configuration file corrupted after installation if
the file was not fully written to disk. The host machine would read the
journal and try to finish writing the file in the wrong endian mode.

Issuing an fsfreeze and unfreeze gives more assurance that the
configuration file is properly written before a reboot; this patch adds
fsfreeze to the installer runtime environment.

Related: rhbz#1315468
(cherry picked from commit 9543a46dac)
2017-03-02 14:49:01 -08:00
Radek Vykydal
975c46b35f Fix duplicate kernel messages in /tmp/syslog (#1382611)
Resolves: rhbz#1382611

The kernel messages will be read from journal so don't use additional imlkog
module to read them duplicitly.

Fixup of
commit b5d0b1fd79
2017-03-02 13:08:44 +01:00
Jiri Konecny
3fa988aa17 Add dependency for lvmdump -l command (#1255659)
This is required for pre installation log feature in Anaconda.

The libpcap library is dependency for nmap-ncat which is dependency for
lvmdump -l.

Related: rhbz#1255659
2017-02-22 10:06:43 -08:00
Colin Walters
766cad3ad3 templates: Enusre basic.target.wants dir exists for rngd
There's something racy here; in my Atomic Workstation CI/CD I'm seeing:

```
01:12:43   symlink /lib/systemd/system/rngd.service etc/systemd/system/basic.target.wants/rngd.service
01:12:43   FileNotFoundError: [Errno 2] No such file or directory: '/lib/systemd/system/rngd.service' -> '/var/tmp/lorax.7cgdtz1_/installtree/etc/systemd/system/basic.target.wants/rngd.service'
```

Rather than debug this right now, let's just make sure it exists,
like we do right above for `tmp.mount`.

(cherry picked from commit 4f1f118cee)
Signed-off-by: Brian C. Lane <bcl@redhat.com>

Resolves: rhbz#1377430
2017-02-17 13:57:32 -08:00
Radek Vykydal
05d271d0d9 Don't log dracut initrd regeneration messages into /tmp/syslog (#1369439)
Related: rhbz#1369439

Keep it same as in RHEL 7.2. They increase the size of the /tmp/syslog file
from ~280K to ~1M, and can be obtained from journal if needed.
2016-08-23 14:55:04 +02:00
Radek Vykydal
b5d0b1fd79 Use imjournal for rsyslogd instead of sharing /dev/log with journal (#1369439)
Resolves: rhbz#1369439

Rsyslogd used to read messages from /dev/log together with systemd-journald
which resulted in NetworkManager messages not being passed to syslog due to a
race condition during starting NetworkManager and rsyslogd service. So use
imjournal rsyslog plugin that picks messages from journald instead of using the
/dev/log socket. Same as regular RHEL 7 system.
2016-08-23 14:50:16 +02:00
Brian C. Lane
6268aaff6e livemedia-creator: Install genericdvd.prm (#1269213)
share/live/s390.tmpl needs to install the file.

Related: rhbz#1269213
2016-08-01 14:24:44 -07:00
Brian C. Lane
6a8663c270 Keep fb_sys_fops module needed for ast support (#1272658)
Ends up the drm_kms_helper module depends on fb_sys_fops so keep that as well.

Resolves: rhbz#1272658
2016-07-18 14:57:40 -07:00
David Shea
b7f74cdb01 Add back libraries needed by spice-vdagent
spice-vdagent, half of the thing that lets copy/paste work across a
spice connection, added sound support, I guess, so now we need
alsa-libs.

(cherry picked from commit 89441cd675)

Resolves: rhbz#1347737
2016-06-23 09:45:04 -04:00
Brian C. Lane
abfbd76af2 Keep all of the kernel drivers/target/ modules (#1348381)
The ib_srpt, and ib_isert modules depend on these.

Resolves: rhbz#1348381
(cherry picked from commit 8bf144843a)
2016-06-22 15:33:12 -07:00
Brian C. Lane
4bdfa33958 Keep the pci utilities for use in kickstarts (#1344926)
Resolves: rhbz#1344926
(cherry picked from commit 1a60afc4ff)
2016-06-21 16:25:58 -07:00
Brian C. Lane
73b368de28 Create an empty selinux config file (#1332147)
In order for selinux to properly label the system it needs to see that
the config file exists.

Also remove the old code trying to copy in a selinux config file, it
never worked -- the removepkg would remove it.

(cherry picked from commit d6584e1d77)

Resolves: rhbz#1332147
2016-05-03 10:57:10 -07:00
Brian C. Lane
e2285683c4 Use eurlatgr as the console font (#1265354)
Resolves: rhbz#1265354
2016-04-19 16:52:07 -07:00
Brian C. Lane
51eac47775 Remove Metacity override and theme (#1324890)
This will now be handled by Anaconda because it is also needed on the
installed system for Initial Setup.

Resolves: rhbz#1324890
2016-04-13 13:38:36 -07:00
Brian C. Lane
391f1a7b57 Copying same file shouldn't crash (#1269213)
When using the template install command copying the same file to itself
shouldn't crash. Just log the error and continue.

Also copy the s390 configuration files for use with livemedia-creator

Resolves: rhbz#1269213
(cherry picked from commit 701ab02619)
2016-04-06 17:02:41 -07:00
Colin Walters
cc374548e8 templates: Reinstate gpgme-pthread.so for ostree (#1311793)
See https://github.com/GNOME/ostree/pull/190

Without this the installer ISO generation fails.

Resolves: rhbz#1311793
(cherry picked from commit 6fcdac5c88)
2016-02-25 09:37:41 -08:00
Brian C. Lane
fec7b8d7b8 Add rng-tools and start rngd.service by default (#1258516)
This will help improve the entropy situation with non-x86 hardware. rngd
will add entropy from hardware rng sources.

Resolves: rhbz#1258516
(cherry picked from commit 690feba381)
2016-02-25 09:09:13 -08:00