Commit Graph

57 Commits

Author SHA1 Message Date
Brian C. Lane
e51b00edca lorax-composer: Change cockpit.socket examples to cockpit
The RHEL7 version of Anaconda only allows .service units to be used with
the kickstart services command. Update the documentation, examples, and
tests to reflect this.

Related: rhbz#1718473
2019-12-06 11:01:55 -08:00
Brian C. Lane
b4a95b8d2b 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)

Related: rhbz#1718473
2019-11-18 12:36:18 +02:00
Brian C. Lane
4d7e3bb4bc 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)

Related: rhbz#1718473
2019-11-18 12:36:18 +02:00
Brian C. Lane
780f00d81a 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)

Related: rhbz#1718473
2019-11-18 12:36:18 +02:00
Brian C. Lane
a9c5581aa9 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)

Related: rhbz#1718473
2019-11-18 12:36:18 +02:00
Brian C. Lane
5d307a475d Update docs for new timezone section
(cherry picked from commit 2929deaf01)

Related: rhbz#1718473
2019-11-18 12:36:18 +02:00
Brian C. Lane
e72debe1d1 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)

Related: rhbz#1718473
2019-11-18 12:36:18 +02:00
Brian C. Lane
9cebd1ddaf 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.

Related: rhbz#1688335
2019-04-29 10:41:57 -07:00
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
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
250e68840b Revert "Rename composer-cli to composer"
This reverts commit b8da0a8c8e.

It conflicts with the PHP dependency manager project named 'composer'

Related: rhbz#1635760
2018-10-08 16:55:57 -07:00
Lars Karlitski
b8da0a8c8e Rename composer-cli to composer
Resolves: rhbz#1635760
2018-10-03 10:43:01 -07: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
773613bc80 Add documentation for using a DVD as the package source 2018-08-21 11:27:55 -07:00
Brian C. Lane
3ea2946e08 Add a note about using lorax-composer.service
Update the docs to make it clear that .socket will be slow to respond to
the first request, and to use .service to speed it up.

(cherry picked from commit 83e5f3f885)
(cherry picked from commit c2f96b3d3b)
2018-08-13 16:58:15 -07:00
Chris Lumens
052828047c Document that you shouldn't run lorax-composer twice. 2018-07-19 14:53:32 -04:00
Chris Lumens
0f69d2084c Add support for groups to blueprints.
Nothing is currently being done with this information, but it will be
soon.
2018-07-12 17:31:44 -04:00
Brian C. Lane
2c81a4c1db lorax-composer: Update documentation
This updates the documentation to include composer-cli instead of curl,
warnings about SELinux and needing the RHEL 7 Optional package repo, as
well as other documentation improvements from the master branch.
2018-06-29 13:35:19 -07:00
Brian C. Lane
e56e55bb3b Fix Sphinx read_version code
It needs to look for ../lorax.spec OR ../lorax-composer.spec
2018-06-19 14:35:43 -07:00
Brian C. Lane
33c84331fe Add support for user defined package sources API
This lives under /api/v0/projects/source/*

See the documentation for details
2018-06-11 16:54:59 -07:00
Brian C. Lane
f0d29be521 Update lorax-composer docs for recipe -> blueprint change. 2018-06-11 16:54:59 -07:00
Brian C. Lane
73011c6bb0 Update Sphinx documentation for composer.cli 2018-06-11 16:54:58 -07:00
Brian C. Lane
114f7f348e Update docs/ with lorax, livemedia-creator, and product-images
Copied from master and edited for the RHEL7 branch.
2018-06-11 16:54:58 -07:00
Brian C. Lane
41fd9ab19c lorax-composer: Add partitioned-disk output support
Also add more documentation on lorax-composer, including how to add
support for new output types.
2018-06-11 16:54:58 -07:00
Brian C. Lane
377f5e4124 Switch the API to use a Unix Domain Socket
This drops support for the TCP port and switches to using a socket at
/var/run/weldr/api.socket

Also add the start of some docs for lorax-composer.

--host and --port argument have been removed.

--group sets the group name to use for access to the socket and its
parent directory. Defaults to 'weldr'

--socket sets the full path to the socket to create. Defaults to
'/var/run/weldr/api.socket'
2018-06-11 16:54:58 -07:00
Brian C. Lane
8db5cdd512 Add basic documentation generation with Sphinx
Docs are included with the rpm, so the .spec needs a number of packages
as BuildRequires in order for Sphinx to run.
2018-06-11 16:54:58 -07:00
Brian C. Lane
f116ee8f05 Add reqpart to example kickstart files
This will make sure that platform specific partitions are created when
making partitioned disk images.

Resolves: rhbz#1545289
2018-06-11 13:52:21 -07:00
Brian C. Lane
c8cee96b1c Add --virt-uefi to boot the VM using OVMF
This requires OVMF to be setup on the system, and for the kickstart to
create a /boot/efi/ partition. You can then use it to create UEFI
bootable partitioned disk images.

The UEFI firmware needs to be installed manually on the system, either
in the default location of /usr/share/OVMF/ or use --ovmf-path to point
to the location.

Resolves: rhbz#1546715
Resolves: rhbz#1544805
2018-06-11 13:45:32 -07:00
Brian C. Lane
487618314c Add support for --repo to read yum .repo files directly (#1430479)
This makes it easier to specify existing repos with extra args, eg.
/etc/yum.repos.d/redhat.repo generated by subscription-manager.

Resolves: rhbz#1430479
2017-08-11 15:11:30 -07:00
Marek Hruscak
81d534670b Package grub2-efi-ia32 need to be added explicitly to example kickstarts. (#1458937)
Boot on 32bit UEFI requires this package. Legacy grub2-efi package
is satisfied only with grub2-efi-x64 package and grub2-efi-ia32 is missing.

Resolves: rhbz#1458937
2017-08-11 15:08:37 -07:00
Brian C. Lane
31fec67150 Update livemedia-creator examples
Make sure grub2-efi-*-cdboot is included in the live media kickstart,
add some documentation about creating UEFI disk images, and add ia32 to
the minimal example (it will need to be commented out for other arches).

Resolves: rhbz#1458937
2017-06-15 10:58:52 -07:00
Brian C. Lane
351b4a0ce4 Remove incorrect variables from rhel7-livemedia.ks example
The only environmental variable set during %post is $ANA_INSTALL_PATH
which points to the installroot (usually /mnt/sysimage). It can be used
in a %post --nochroot to copy things from the installer root to the
target's root filesystem.

This removes the %post --nochroot section because the image is not
accessable at this point in the process. Items that need to go into the
/ of the iso need to be added in the final iso creation templates, like
x86_64.tmpl

Resolves: rhbz#1430547
2017-05-31 09:43:06 -07:00
Brian C. Lane
cac3e38bcb Increase rootfs size for rhel7-livemedia.ks example
A 4G / is no longer large enough, increase it to 5G

Also update the example release urls to 7.4
2017-05-17 13:36:19 -07:00
Brian C. Lane
69daa095bf Fix livemedia-creator manpage (#1318952)
Resolves: rhbz#1318952
2016-03-28 16:23:20 -07:00
Brian C. Lane
de835d687a Add @anaconda-tools to example live kickstart (#1269891)
This includes packages that anaconda runs from the installed system
during installation. It includes grub2, grub2-efi, shim, efibootmgr
among others.

Resolves: rhbz#1269891
2016-02-24 11:20:21 -08:00
Brian C. Lane
3f5047dd4f livemedia-creator: Remove random-seed from images (#1258986)
systemd uses /var/lib/systemd/random-seed to add entropy to /dev/urandom
at boot time. During image creation this file is created, and if not
removed everything using the image will be adding the same seed.

This is only additional entropy, NOT a seed in the sense of a starting
point for a PRNG, so it will be mixed with other entropy as the system
runs. It isn't a good idea to use the same value everywhere so make sure
it is removed in %post

Resolves: rhbz#1258986
2015-09-02 10:26:42 -07:00
Radek Vykydal
ed3bec702e Add --live-rootfs-keep-size option
Resolves: rhbz#1184021
2015-04-13 10:05:17 +02:00
Radek Vykydal
9d8aabded6 Add --live-rootfs-size option.
Resolves: rhbz#1184021
2015-04-13 10:05:17 +02:00
Radek Vykydal
52cd17be3f Override services kickstart setting from interactive-defaults.ks
Resolves: rhbz#1184021
2015-04-13 10:05:17 +02:00
Radek Vykydal
28801d8d42 Add --make-pxe-live and --make-ostree-live (for Atomic) targets.
Resolves: rhbz#1184021

--make-pxe-live target generate live squashfs and initrd for pxe boot.
Also generates pxe config template.

--make-ostree-live is used for installations of Atomic Host. Additionally to
--make-pxe-live it ensures using deployment root instead of physical root of
installed disk image where needed. Atomic installation needs to be virt
installation with /boot on separate partition (the only way supported by
Anaconda currently). Content of boot partition is added to live root fs so that
ostree can find deployment by boot configuration.
2015-04-13 10:05:17 +02:00
Brian C. Lane
e543fecde0 move image-minimizer to lorax (#1082642)
This is used as a kickstart %post interpreter to streamline
modifications to images.

Also adds an example kickstart.

This Obsoletes the old appliance-tools-minimizer and includes a Provide
so that the transition will be seamless.

(cherry picked from commit 99f2ab9137)
(cherry picked from commit b090a09dca)

Resolves: rhbz#1082642
2014-10-22 10:32:14 -07:00
Brian C. Lane
526988651d livemedia-creator: Add support for making tarfiles (#1144140)
This adds the --make-tar option which will produce a xz compressed tar
of the root filesystem. This works with either virt-install or no-virt
modes. Use --image-name to set the output filename.

--compression is used to set the compression type to use, which defaults
to xz. Supported types are xz, lzma, gzip and bzip2.

--compress-arg is used to pass arguments to the compression utility.

(cherry picked from commit d04a99e8f4)

Resolves: rhbz#1144140
2014-09-22 15:25:22 -07:00
Brian C. Lane
5dd01b4aef livemedia-creator: Add minimal disk example kickstart (#1019728)
Also adds a check for a bad url repo, and fix ram calculation for
appliance mode. Updates the README.livemedia-creator documentation.

Resolves: rhbz#1019728
2013-10-31 16:17:12 -07:00
Brian C. Lane
2025a6a1df livemedia-creator: Update example kickstart for rhel7 (#922064)
Based on fedora live kickstart. Removes the ec2 example because RHEL7
doesn't include cloud-init and I have no way to test the results.
2013-09-16 15:20:51 -07:00
Harald Hoyer
22a36d3a81 dracut-nohostonly and dracut-norescue got renamed for dracut >= 030 (#990305) 2013-08-01 10:05:08 -07:00
Brian C. Lane
f9d06d42a5 Add manpage for lorax 2013-07-26 15:38:29 -07:00
Brian C. Lane
ff23dcb162 Add manpage for livemedia-creator 2013-07-26 15:37:52 -07:00
Brian C. Lane
b56505fc58 livemedia-creator: Update example kickstarts 2013-04-16 16:31:50 -07:00