Commit Graph

2559 Commits

Author SHA1 Message Date
Ghe Rivero
156d3495e0 Use common element select-boot-kernel-initrd
Several elements were using almost similar code to
get the current kernel and initrd inside an image.
After factoring out this code into a common element,
modify the elements to make use of it.

Change-Id: Ib547cd96b2b354b1c97342cacf5f0d0a3f70a3da
2014-06-26 10:19:09 +00:00
Steve Baker
e822a0ff5a Always bind-mount pypi mirror if dir exists
It may be desirable to specify file://tmp/pypi as one of the list
of mirrors specified by PYPI_MIRROR_URL, so the local pypi mirror
should be mounted as long as the directory exists.

Even though the path is mounted, it is only used by pip if there is
no specified PYPI_MIRROR_URL, or if one PYPI_MIRROR_URL entry
specifies file://tmp/pypi.

The pypi element previously assumed that a local mirror would be
a complete offline mirror. This change allows for a mixture of
local mirror plus remote mirrors. This means that the local
mirror could (for example) contain a few locally built pip packages
from arbitrary git checkouts for gate testing of those projects.
In this scenario, most packages would be downloaded from the
configured remote mirrors.

This change is required for synchronous gating on the os-*-config
tools.

Change-Id: I0f6d153c06993ffd0d90bd8ca1717462e8b6b541
2014-06-26 14:49:06 +12:00
Ghe Rivero
4c977082c4 Add select-boot-kernel-initrd element
Encapsulate the new select-boot-kernel-initrd common function
into an element so other elements can make use of it.

Change-Id: Ie587bd5dae1afebfd5646190dfa951a7949938cd
2014-06-25 21:23:19 +00:00
Robert Collins
d34b9453f3 Ignore manifest outputs more carefully.
We use .d files within dib elements :).

Change-Id: I0350e5ee9373e21bb275cb387ec682e2137b4f64
2014-06-26 04:29:51 +12:00
Kiall Mac Innes
572b8b2b13 VM element: Enable serial console on Debian
Debian based distros do not enable the serial console by default
in grub.cfg, instead sending all boot messages to the display

Change-Id: I0e80859198e77862ab0301ab27ebe11702fba09d
2014-06-25 14:13:49 +00:00
Yolanda Robla
fabbb8da58 Disk-image-create should allow sending compat flags to qemu-img
Add a --options flag that allows disk-image-create to send custom
options to qemu-img calls. It is useful for forcing compat into
qemu-img created images.

Usage:
    disk-image-create --qemu-img-options compat=0.10 base ubuntu

Change-Id: I73ee2c86abc115220d51ffebbbe9ce3c4d92f188
Closes-Bug: #1329746
2014-06-25 12:38:06 +02:00
Chris Krelle
6077bd8b06 Ensure cache directory exists before use
Ensure cache mount directory exists before its used. The zypper element
would error when attempting to mount the cache directory because the
mount point did not exist. This patch corrects that.

Change-Id: Iaa3c2a0254b12bd847643a61a99f5a234097fd21
2014-06-24 16:35:59 -07:00
Chris Krelle
336e286637 update zypper element
Scripts in pre-install.d run as root so there is no need to sudo commands.
This patch also helps avoid an error when sudo is not installed in the
default image.

Change-Id: Iab20edfb161189f8c4e0cfa7d6946f63163d6413
2014-06-24 16:20:55 -07:00
Jenkins
20879b2ec9 Merge "avoid failure if /lib/firmware doesn't exist" 2014-06-24 16:46:20 +00:00
Jenkins
8422f46dc0 Merge "Drop ending slash from DIB_CLOUD_IMAGES" 2014-06-23 19:22:30 +00:00
Jenkins
83e35dfa49 Merge "map-services: add openvswitch" 2014-06-23 16:00:54 +00:00
Jenkins
5dfb4b5c93 Merge "Factor out error behavior in dib-lint" 2014-06-23 09:38:04 +00:00
Steve Kowalik
cf9870729d Drop ending slash from DIB_CLOUD_IMAGES
The DIB_CLOUD_IMAGES variable in ubuntu's root.d is already used
everywhere with a /, so we can safely drop it from the default
value.

Change-Id: I39dbd3f4004052fcccb4131dc838759f4c82312a
2014-06-23 16:22:51 +10:00
Dan Prince
4015097a31 Update base element to make use of pkg-map
With this change package name to distro mappings used
within the base element are now stored in the top
level pkg-map file.

Additionally, all bin/install-packages commands are updated
to use the -m option so that the base element pkg-map
namespace is used by default.

Change-Id: I3bdbf987c8525f9ef67ca0c263651d6613f29ef0
2014-06-20 16:02:28 -04:00
Dan Prince
99ebd302b0 opensuse: support pkg-map in bin/install-packages
Updates the opensuse element's bin/install-packages script
so that if supports using pkg-map instead of map-packages
for package mapping. To make use of the new change
simply add the -m <element name> to allow install-packages
to know which element namespace to use when installing packages.

Use of the new -m option is off by default.

As part of this change we also updated install-packages
to use getopt for in script argument parsing.

Change-Id: I56da8adf6c445c50c7642e221c6c11ba59330404
2014-06-20 16:02:28 -04:00
Dan Prince
9340ea309b dpkg: support pkg-map in bin/install-packages
Updates the dpkg element's bin/install-packages script
so that if supports using pkg-map for package mapping.
To make use of the new change simply add the -m <element name>
to allow install-packages to know which element namespace to use
when installing packages.

Use of the new -m option is off by default.

As part of this change we also updated install-packages
to use getopt for in script argument parsing.

Change-Id: Idfc40f2d75828a0f09d227f0332ccef8f0183efc
2014-06-20 16:02:28 -04:00
Om Kumar
42f8ef86a1 Element to remove unwanted kernel/initrd.
Remove unused kernel/initrd from the image.

Change-Id: If187ab9ff42b99f127897de761fd9685b37304fc
2014-06-20 20:57:33 +05:30
Jenkins
6744030be4 Merge "debian: fix network on Wheezy" 2014-06-20 08:55:31 +00:00
Jenkins
45d5bf45e9 Merge "Do not use DatasourceNone for precise cloud-init" 2014-06-19 23:31:54 +00:00
Jenkins
da9dfc854a Merge "dpkg: local cache for .deb files" 2014-06-19 19:46:46 +00:00
Gonéri Le Bouder
4bf38a829a introduce $SYSTEMD_SYSTEM_UNIT_DIR
export $SYSTEMD_SYSTEM_UNIT_DIR to know where .service files should be
moved.
So far those files are moved directly in /usr/lib/systemd/system whereas
Debian use /lib/systemd/system.

We load the value from the systemd pkg-config file.

The patch don't use pkg-config directly for three reasons:
 - environment.d files are run before install.d and the other similar
 targets, making hard to install an additional dependency
 - the .pc file can easily be parsed using awk
 - pkg-config package name is not standard across the different
 supported distributions

$SYSTEMD_SYSTEM_UNIT_DIR default value is /lib because, as pointed by James
Slagle, /lib is actually a symlink to /usr/lib/ on Fedora and will work
for Debian and Fedora.

See: https://bugs.debian.org/719634

Change-Id: I413a92284e6a79e7fcdde99c5138bc3ce8e85e80
2014-06-17 19:34:29 +02:00
Jenkins
12ae39b97b Merge "Ensure dib-run-parts profiling works with py3 and py2" 2014-06-17 07:26:27 +00:00
Tim Potter
096b6c8e04 Update README regarding Debian and OpenSUSE support
Change-Id: Ib66525f25cb138358f854492fbd665814d060cda
2014-06-17 11:55:21 +10:00
Nikhil Manchanda
d550087214 Do not use DatasourceNone for precise cloud-init
The 'None' Datasource does not exist in precise 12.04 (which uses
cloud-init 0.6.3), so conditionally ensure that we are not including
this in the datasource_list in case we're building a precise image.

Partial-bug: 1329068
Change-Id: I6efb91e17bf896bbf7d67c31c4eb5098d5d61a71
2014-06-16 10:58:39 -07:00
Jenkins
1b71aafc08 Merge "Add missing dollar" 2014-06-16 13:49:04 +00:00
Cian O'Driscoll
7e58968779 Explicitly name element enable-serial-console
We use an element remove-serial-console in image elements.
Renaming this element to match. Also renaming allows us to use
the serial console in devtest runs.
See - https://review.openstack.org/#/c/86272/

Change-Id: I8f1138f58d0046ccdeefa3decc45c36d95c6bf4b
2014-06-16 09:23:07 -04:00
Jenkins
c0501291c9 Merge "Refactor code to select boot kernel" 2014-06-14 04:01:45 +00:00
Jenkins
3fbf976f2c Merge "Add manifests to .gitignore" 2014-06-14 00:55:57 +00:00
Gonéri Le Bouder
131fb8c216 avoid failure if /lib/firmware doesn't exist
On Debian, /lib/firmware is provided by optional packages like
firmware-iwlwifi or firmware-linux-free. That's why this directory
may not exist.
This change ensure the directory exist before trying to copy it
content.

Change-Id: Icf9eedf4148141c92e9171f16ae744b88a8d8519
2014-06-14 00:05:27 +02:00
Jenkins
786899ea6d Merge "Add test to ensure we don't duplicate filenames" 2014-06-13 19:40:08 +00:00
Jenkins
faa5ce8930 Merge "Name deploy-ironic and deploy-baremetal files uniq" 2014-06-13 19:40:02 +00:00
Jenkins
8d7e6dbec5 Merge "Fix package removal" 2014-06-13 17:17:04 +00:00
Jenkins
6c6c839fc3 Merge "Replacing deploy to deploy-baremetal in README.md" 2014-06-13 16:23:46 +00:00
Jenkins
bedd50f80d Merge "fail at startup with no operating-system element" 2014-06-13 14:36:59 +00:00
Coleman Corrigan
667248a970 Tidy base image by removing /var/log files
diskimage-builder/elements/base/cleanup.d/99-tidy-logs added
to tidy up (remove) initial logs files on disk images.

Makes for slightly smaller images, and easier times tracing post
boot issues.

Change-Id: Iee98b5d818e080bcd9635482bc29349a71938087
2014-06-13 15:23:13 +01:00
Gonéri Le Bouder
b822581d88 debian: fix network on Wheezy
source-directory ifupdown directive has been introduced in version
0.7.44. Wheezy comes with version 0.7.8.

Without this change, the eth0 interface will never get an IP address on
Wheezy.

Change-Id: If40ed3b82ca78280190b66c06a0a77bb71270d7d
2014-06-13 13:11:24 +02:00
Jenkins
3ee469f299 Merge "Name 10-rhel-cloud-image uniquely" 2014-06-13 09:50:42 +00:00
Jenkins
9e968c98ca Merge "Name 01-install-bin uniquely" 2014-06-13 09:50:36 +00:00
Jenkins
b541f0731c Merge "Delete redhat-common 00-usr-local-bin-secure-path" 2014-06-13 09:47:10 +00:00
Om Kumar
bccffc8bfd Refactor code to select boot kernel
The script to find best kernel from image (used by vm
and baremetal element) is duplicated and is not in sync
with each other. Moving the code to img-functions as a
function will reduce duplicated code and make it reusable
in future.

Since img-functions is not accessible in chroot env,
kernel selection is being moved from finalise.d to
cleanup.d in the vm element.

Change-Id: I8fbccc13a2c61a5191ef9ea5d2a8302a3e43b000
2014-06-13 11:46:39 +05:30
Jenkins
20ea513854 Merge "Yum: support pkg-map in bin/install-packages" 2014-06-12 23:40:12 +00:00
Jenkins
fa9a561819 Merge "Rename old image file instead of rewrite it" 2014-06-12 22:19:15 +00:00
Jenkins
662782b66b Merge "Correct source-repository comments" 2014-06-12 20:56:35 +00:00
Jenkins
adefb7337a Merge "Name 99-setup-first-boot uniquely" 2014-06-12 18:31:40 +00:00
Jenkins
7489540b22 Merge "Correct the wrong rename in rhel element" 2014-06-12 13:24:55 +00:00
Gonéri Le Bouder
1011adf370 fail at startup with no operating-system element
Raise an error if there is no element with “operating-system”
in the element-provides file.

Change-Id: I2242537abc4c610252984c32c286bc6eb25de672
2014-06-12 11:19:20 +02:00
Jenkins
20cb5927d2 Merge "Add tar as an output type" 2014-06-12 08:50:00 +00:00
Jenkins
2a1c189069 Merge "Debian: Support additional debootstrap arguments" 2014-06-12 05:31:35 +00:00
Jenkins
f1437fe241 Merge "Tidy up SuSE kernel selection" 2014-06-12 04:52:16 +00:00
Jenkins
de8073d4d3 Merge "Parameterise PXE kernel and initrd selection" 2014-06-12 04:52:10 +00:00