Commit Graph

2340 Commits

Author SHA1 Message Date
Jenkins
ccf95e7857 Merge "Update RHEL Registration" 2014-11-25 22:17:52 +00:00
Frederic Lepied
ccd7811dc0 disk-image-create: fix test when no argument is given.
Avoid a warning when multiple arguments are passed to disk-image-create
like:

bin/disk-image-create: 146: [: aa: unexpected operator

Change-Id: I619d7bf2e4b56885d629019b80b249bc80b8f43e
2014-11-25 22:28:01 +01:00
Jenkins
9fae41c898 Merge "Fail helpfully if no elements are specified" 2014-11-25 12:29:06 +00:00
Ghe Rivero
91977e7c8f Warning when using pypi element without a mirror
Using only a local filesystem mirror could lead opaque errors.
Print a warning message in this situations.

Change-Id: I5f77151ea928868f4c441e8a1bb2eb0966b21832
Closes-Bug: #1297948
2014-11-25 11:41:11 +01:00
Jenkins
47b58526e7 Merge "Make some pkg-map errors soft" 2014-11-25 02:57:09 +00:00
Jenkins
3b0130ed79 Merge "Check python with flake8 instead of dib-lint" 2014-11-25 02:56:57 +00:00
Jenkins
019196ef7f Merge "Add deprecation warning when using map-services" 2014-11-22 14:48:33 +00:00
Gregory Haynes
b10cfa841a Make some pkg-map errors soft
An app using pkg-map (like package-installs) might want to distinguish
between a hard error (invalid pkg-map file) and a soft error (no
mapping found). Currently this is not possible because we only return
with error values of 1.

Also printing error messages to stderror so we can still make use of
stdout data during a soft error.

Change-Id: I8bef56d3a74e8530afb8c58ac50ca3e9f7700639
2014-11-21 12:49:49 -08:00
Gregory Haynes
9bb7ace03c Fail helpfully if no elements are specified
Instead of charging ahead and failing because we lack dib-run-parts we
can fail in this case with a useful error message.

Change-Id: Ie10176b5a7019a0385796984ebbaf7742876925a
2014-11-21 10:31:11 -08:00
Gregory Haynes
fd0708286c Check python with flake8 instead of dib-lint
We check python files with dib-lint rather than flake8 which have
conflicting opinions. This means weve been (forcibly) writing non pep8
python.

Also fixing pep8 issues so tests pass.

Change-Id: Idc9db40334f6e15738a7802c06697270df68741c
2014-11-21 09:04:52 -08:00
Jenkins
d8b156dedf Merge "Add DIB_DEBOOTSTRAP_EXTRA_ARGS environment variable" 2014-11-21 13:32:06 +00:00
Jenkins
d506c42ec4 Merge "Deprecate map-packages, replaced by pkg-map" 2014-11-20 01:41:45 +00:00
Ryan Brady
81b4c00fdc Update RHEL Registration
This patch updates the 00-rhel-registration script to not
not fail a stack when metadata isn't found.

Change-Id: Ie305fed79e4baadf1a03c4a3d06a23cf36e92f77
2014-11-19 18:05:24 -05:00
Jenkins
04e8ce0ece Merge "Enable RHEL Registration" 2014-11-19 22:34:37 +00:00
Jenkins
a80ff47dec Merge "Simplify Dracut cmdline script" 2014-11-19 20:26:10 +00:00
Ryan Brady
4178c0c69d Deprecate map-packages, replaced by pkg-map
This patch writes a warning out to stderr to notify element authors
that may be using map-packages to migrate to pkg-map.  This patch
also prints out a warning during image-create that lists the specific
elements that are not using pkg-map.

Change-Id: I7e2a7611dd5650815736ce998aa94a7833193d06
2014-11-19 12:04:12 -05:00
Jon-Paul Sullivan
8dd97597ea Allow multiple identical sources
The source-repositories element puts source in place in the generated image
for later installation.  It is possible for two elements to define the same
source to later install, and as long as the remote location and reference to be
installed is identical, we should not error.

Change-Id: Ic7dfb1961486c59d2005b5c1e7587267ea42e999
2014-11-19 12:03:16 +00:00
Tim Potter
018b1d4147 Add DIB_DEBOOTSTRAP_EXTRA_ARGS environment variable
This allows extra arguments to be passed to the debootstrap
command when creating an image using the debian element.

Change-Id: I87eb856365ff6a17f051e2e56587235648328d57
Co-Authored-By: Ghe Rivero <ghe.rivero@gmail.com>
2014-11-19 11:22:16 +00:00
Jenkins
8986283d41 Merge "Remove duplicate binary-deps from dracut-ramdisk" 2014-11-19 09:59:37 +00:00
Ghe Rivero
830de28e96 deploy-kexec depends on deploy
It was depending only on deploy-baremetal. Changing it to 'deploy' could
be used with both baremetal and ironic deployments

Change-Id: Ia2600080b488f7d259a9baf111767e82b6cc933d
2014-11-18 15:29:53 +01:00
Ben Nemec
8ee66ec8ec Remove duplicate binary-deps from dracut-ramdisk
These are already listed in the respective deploy-* elements, and
if we include them here then they get added to every ramdisk built
with dracut.  That causes issues for elements that don't need
something like tgtd because it won't be installed and the
binary deps script will fail.

Change-Id: Ibdcf7d200d4f7136396b63404cd966f7557043e0
2014-11-14 12:43:49 -06:00
Yuriy Zveryanskyy
676b1b738d Add element for building ramdisk with ironic-python-agent
This element creates kernel and ramdisk files based on Fedora,
example:
disk-image-create -a i386 -o test fedora ironic-agent disable-selinux

Change-Id: Ifa133d1680b81cb87d32a405aa7d7b40fe91f835
2014-11-13 19:30:44 +02:00
Jenkins
ce67ce87ea Merge "Support installing packages by default" 2014-11-13 10:27:56 +00:00
Ben Nemec
f528aa316e Simplify Dracut cmdline script
We don't actually need a real value for the root kernel param, and
requiring one causes problems for things like the discovery ramdisk
that don't pass in a disk= parameter.  Dracut seems to be happy to
take /dev/zero as the value, so we can just always use that.

Change-Id: Ia724f0214c26aa18c6f8f41f2c48d7f25b52ee6c
2014-11-12 11:18:53 -06:00
Ryan Brady
1aecb41b7e Add deprecation warning when using map-services
This patch writes a warning out to stderr to notify element authors
that may be using map-services to migrate to svc-map.

Change-Id: Ic80db16c607958d025e89b3a4058a9cbb568938e
2014-11-12 17:03:49 +00:00
Ryan Brady
6fedbc58f9 Fix indent exclusion
The current dib-lint script has an exclusion for indent but it is
erroneously used as a label around the tab indention check.  This
patch renames the tab indention exclusion and adds the indent
exclusion where it belongs.

Change-Id: I701595e7a08f4764a45c6701d67cbb931c3d47f3
2014-11-11 21:06:25 -05:00
Jenkins
cbdf218417 Merge "Install PyYAML for the svc-map element" 2014-11-11 16:53:37 +00:00
Kiall Mac Innes
ac349eda4f Install PyYAML for the svc-map element
The svc-map element expects to be able to "import yaml", we should ensure
it's installed alongside DIB.

Change-Id: I1e4c19bbb2a7143e61974cffb3d7232d90414388
2014-11-10 14:45:36 +00:00
Derek Higgins
c26a9ee4b1 Install lsb_release from package
The URL we were using to download lsb_release from no longer works,
install from package so this is not affected by disappearing URL's
in future.

This was originally installed from a URL because the package dependencies
caused a 87M increase in the size of the base image. For fedora the
increase is now 27M which is a little more tolerable.

Change-Id: I6e56a4a81786b33c5c6b92df2bd8236cd3f19670
2014-11-10 11:28:49 +00:00
Ryan Brady
ac8514c089 Enable RHEL Registration
This patch documents the 00-rhsm script as <= RHEL6 as it doesn't
work with the latest release of Satellite.  The Red Hat Network
(RHN) method of registration is being phased out in favor of Red
Hat Customer Portal and Satellite 6.  The subscription-manager
command line tool is the preferred method of registration.

The registration of RHEL is required to enable repositories for
software installation during image creation time.

This element provides functionality for registering RHEL images
during the image build process with diskimage-builder's
disk-image-create script.  The RHEL image will register itself
with either the hosted Red Hat Customer Portal or Satellite to
enable software installation from official repositories. After
the end of the image creation process, the image will unregister
itself so an entitlement will not be decremented from the account.

Boot-time registration is supported through metadata.  Please see
the configuration in the README for more information.

Change-Id: Ia9ef377cc4ed9595633888bfb248a1224e04b542
2014-10-31 12:36:43 -04:00
Jenkins
cafad0a148 Merge "Update Debian repo to retrieve signed Release file" 2014-10-31 01:27:19 +00:00
Jenkins
d72435a86b Merge "Optimize speed of deletion in find command" 2014-10-30 12:53:28 +00:00
Jenkins
50085793cc Merge "Unset trap before dracut ramdisk build script exits" 2014-10-30 11:43:09 +00:00
Jenkins
1e5ec9adb3 Merge "Use binary-deps.d for dracut ramdisks" 2014-10-30 06:25:30 +00:00
Dan Prince
022cb2c1c2 Support installing packages by default
Adds new disk-image-create --install-type option which
can be used to enable alternate install types. The
default install type is 'source'.

The motivation is to eliminate elements like
enable-package-installs which require coupling and also
don't work with elements in multiple element repositories.

This patch does not prevent you from using the previous
DIB_INSTALLTYPE_ variables to customize the install type,
rather it just changes the default so you don't have to
set it so often when using things like packages.

Change-Id: Icee98440fc2251728f2dca30e7c4789a0fd89b93
2014-10-28 15:05:53 -04:00
Jenkins
47502b8042 Merge "export DIB_ROOT_LABEL to make it global" 2014-10-28 15:51:19 +00:00
AzherKhan
bb38d0e325 Optimize speed of deletion in find command
I would like to recommend to use + instead of \; in the find
command. As this will ensure the removal of all selected
directories in a single invocation.

Hence improve the speed of deletion.

Change-Id: I409fe11aae217afb6f790491591005c679264ed4
2014-10-27 21:04:09 -07:00
Jenkins
dbe2846264 Merge "package-installs assumes packages have a pkg-map" 2014-10-28 00:15:19 +00:00
Gregory Haynes
c27e32f769 package-installs assumes packages have a pkg-map
Our package-installs script fails when installing a package which does
not have a pkg-map but a pkg-map file exist for the element.

Change-Id: I3dab802e23bccfc916efcc1c70c6ce6c4a9ccf67
2014-10-27 09:42:58 -07:00
Jenkins
3c8cf6a724 Merge "Move busybox binary-dep to ramdisk element" 2014-10-27 08:30:48 +00:00
OpenStack Proposal Bot
a7a3e99aab Updated from global requirements
Change-Id: I8f751e0daebf807eacce4aa7c2baeb9c609dee5b
2014-10-24 22:25:54 +00:00
Jenkins
34c273d8df Merge "Make diskimage-builder work in Docker." 2014-10-24 20:13:45 +00:00
Jenkins
2d80e53186 Merge "iso element to use 'search --label' for grub" 2014-10-24 15:55:44 +00:00
Jenkins
9d252ba318 Merge "Handle extra spaces in merge-svc-map-files" 2014-10-24 07:42:02 +00:00
Ben Nemec
0db6b9b401 Unset trap before dracut ramdisk build script exits
A similar change was needed in the normal ramdisk element as part
of ae928057bd to avoid running
cleanup immediately after the ramdisk build completes.

Change-Id: Ia96e2d8011b88ed96cc6727914c5a5d2dea59757
2014-10-23 20:02:08 -05:00
Ramakrishnan G
8c9ee78ab5 iso element to use 'search --label' for grub
Current iso element uses 'search --file' to find the
grub root.  This is a wrong approach as it may find
some other partition containing /vmlinuz. Instead modify
it to search for grub root by the label of ISO image.

Closes-Bug: 1384826
Change-Id: Id4217be3420597bed2f80a96788928259ec91582
2014-10-23 23:04:17 +05:30
Ghe Rivero
4543294487 Update Debian repo to retrieve signed Release file
After bootstraping a Debian image, the repository keys
are installed to verify the packages signatures, but the
Release signature file is missing. Updating the repo,
will retrieve a new InRelease file (inline signed).

Change-Id: I14f0d22cc9c72be9b07f3708270359bc8cff112d
2014-10-23 07:38:31 +00:00
Ghe Rivero
48ce0fde51 export DIB_ROOT_LABEL to make it global
It is needed by the debian element in the root.d phase. (enviroment.d variables are not available after the base image is built)

Change-Id: Idb8f9795a619687569bcb0de774c87333d11b292
Closes-Bug: #1384103
2014-10-23 07:38:21 +00:00
Jenkins
1e55938148 Merge "iso element to build bootable ISO images" 2014-10-23 06:05:34 +00:00
Ben Nemec
bb8126e887 Use binary-deps.d for dracut ramdisks
Instead of hard-coding a list of binaries to include in the dracut
ramdisk, use the existing binary-deps.d functionality to provide a
list.  This will allow other ramdisks (such as discovery) to add
the binaries they need.

Change-Id: Ib7ffa15e08db1cc45e93a8f2a5c01369772c93ff
2014-10-22 15:13:48 -05:00