Commit Graph

958 Commits

Author SHA1 Message Date
Jenkins
1f130f7e49 Merge "Cleanup apt cache after grub install" 2014-09-01 10:01:58 +00:00
Jenkins
7da217b8f1 Merge "Truncate instead of deleting log files" 2014-08-29 17:03:29 +00:00
Ben Nemec
417b511147 Truncate instead of deleting log files
For package installs we need to be able to fix up permissions in
/var/log at install time, and if we delete all of the files then
those permission fixes get lost.  To deal with that, we can just
empty the files instead of deleting them.

Change-Id: I70abb354e4dc726ec7a176694c7c6e9455d89d08
2014-08-28 19:18:30 -05:00
Jenkins
ceb9c431f0 Merge "Remove docs about deprecated pypi-mirror tool" 2014-08-28 22:47:33 +00:00
Jon-Paul Sullivan
ed833e628f Lock around extract-image downloads and extracts
This wil be needed for parallel image builds.

Change-Id: I6ba3a10b44fe37f8d8903ad06302a672c3e972c8
2014-08-28 17:42:25 +01:00
Jenkins
7d0e7fe5ad Merge "Centralize handling of /lost+found" 2014-08-28 16:33:12 +00:00
Robert Collins
027dcc2dbe Add support for flashing ILO BMC's from ramdisks
This is more than a bit hard to test, requiring as it does an actual
iLO BMC, so sadly I have no tests :(.

HP Hardware really wants to be running latest firmware, and its
commonly agreed that one place where it can be sanely applied is in
the deploy environment, so this is my long threatened implementation
of that.

Change-Id: I3117a250d0d0eb8ee33eb4b15c837485a5cbf476
2014-08-28 17:07:03 +01:00
Jenkins
06f7f40028 Merge "Make RHSM registration set -u safe" 2014-08-28 15:36:46 +00:00
James Polley
341c42ba83 Remove docs about deprecated pypi-mirror tool
The pypi-mirror tool is no longer supported by the infra team, or
reccomended for installs, and is known to have various bugs that will
not be fixed.

Remove mentions of it from the docs and point people at devpi-server
instead.

Change-Id: Ieedb8bf9bee2f5932edac6b9747e645d0f4eb08c
2014-08-28 11:33:52 +10:00
Ben Nemec
644598941c Use dib-run-parts from dib-utils
Now that dib-run-parts has been moved to the dib-utils project, we
need to update diskimage-builder to use it instead of the version
directly in diskimage-builder.

This change removes the old copy of the dib-run-parts script in
the element, adds dib-utils as a dependency of diskimage-builder,
and updates the uses of dib-run-parts to correctly handle the fact
that it is now external to the project.

Requires I0be1f876d0e4a7d38e0d5c6010a552a8ebb158a4

Change-Id: Ia0a0df7784a14c49b5c47ac0b03e6c2602c84b3b
2014-08-26 16:44:18 -05:00
Jenkins
c393ed3902 Merge "Revert "Remove the temporary deploy element after rename"" 2014-08-26 20:29:55 +00:00
Jenkins
597acccbd7 Merge "map-services: add openstack-nova-novncproxy" 2014-08-26 08:28:13 +00:00
Jenkins
c445a6c66a Merge "Support for UBoot." 2014-08-25 08:09:02 +00:00
Ben Nemec
5c69b7a683 Make RHSM registration set -u safe
There are a bunch of optional env vars references in the rhsm
registration script, but they weren't wrapped to be set -u safe so
they cause build failures if any aren't set.

Change-Id: I18326b618f0920efa4dbd805611c6ee66d33ebb0
2014-08-21 21:39:38 -05:00
Jenkins
45693f5762 Merge "Add service mappings for ironic" 2014-08-21 07:31:17 +00:00
James Slagle
0c92466f5b Add service mappings for ironic
Adds the needed service mappings for ironic-api and ironic-conductor.

Change-Id: I8b218f926561d8fba1644fe883bf8aae4bb6473f
2014-08-20 17:31:45 -04:00
lifeless
4ebee67650 Revert "Remove the temporary deploy element after rename"
This reverts commit ac73660c40.

This was a backwards incompatible change - it broke the stable tripleo-heat-templates job.

Change-Id: Ideffca203db7b860b9f9d96c1d9f73e046519ec7
2014-08-20 19:37:13 +00:00
Jenkins
b404682d1b Merge "Increase source-repositories support for tarballs" 2014-08-20 11:19:59 +00:00
Jonathan Brownell
6e4e2cfeca Increase source-repositories support for tarballs
The existing support for tar files in source-repositories saves
only the contents within subdirectories contained in the archive.

This change makes the selection of contents within the tarball user-
definable based on the REPOREF specified (or overridden in the env).

A REPOREF of '*' (the current default, but deprecated) will select
the contents of subdirectories within the archive, while '.' will
select the entire contents of the archive.

For reference:
http://lists.openstack.org/pipermail/openstack-dev/2014-August/043197.html
http://lists.openstack.org/pipermail/openstack-dev/2014-August/043249.html

Change-Id: I45db42ce66bf1d63d6ab5730090bf458b1b37ce9
2014-08-19 13:24:02 -07:00
Jenkins
8d165837c3 Merge "Allow to specify an empty package list in pkg_map" 2014-08-19 20:05:45 +00:00
Derek Higgins
bd83c2e699 map-services: add openstack-nova-novncproxy
Add a mapping from nova-novncproxy to openstack-nova-novncproxy, it was missing.

Change-Id: Ia163a967925087b9d20f7b8581f0f636e53328d8
2014-08-18 13:15:10 +01:00
Ghe Rivero
fecbb03e54 Allow to specify an empty package list in pkg_map
An empty package list can be provided in a pkg_map file for those
cases were there is no need to install the package.

Change-Id: I0df8c6848ec4ac9e0f90790f14e8eb5399650339
2014-08-18 06:24:55 +00:00
James Slagle
3d0e111479 Use package-installs in fedora
Updates the fedora element to use the declarative package install
support provided by the package-installs element.

Change-Id: Ib3eb1936aa5c4efc350828e004794b0a8bd6c6c4
2014-08-14 21:18:19 -04:00
James Slagle
17f8bda93f package-installs for pre-install.d/post-install.d
Packages are often also installed in both the pre-install.d and
post-install.d phases. This patch expands the package-installs element
to support declarative package support for these phases in addition to
the existing support for install.d. The actual install/uninstall logic
is moved to common scripts under bin/ so that it can be reused across
the different phases.

Change-Id: Id51d0bbad232737fc8b5ffaf016dec50cd5b66c9
2014-08-14 21:18:19 -04:00
Dan Prince
389669f687 Formatting fixes for dhcp-all-interfaces
Fixup some whitespace formatting issues in dhcp-all-interfaces.sh

Change-Id: Iac515f53e76e68356826cbcefb64142b2009f351
2014-08-14 16:32:50 -04:00
Dan Prince
4fac7ff925 Remove disable_interface from dhcp-all-interfaces
I don't actually think there is a way that disable_interface
would get called on Fedora... because if config_exists
it takes a different path. Furthermore we really don't
want to mess w/ configured interfaces in dhcp-all-interfaces
because that could be side effecty (and is arguably the
job os os-net-config anyways).

This function already did nothing on Debian so removing
shouldn't hurt anything.

Change-Id: Ic53bbab98aa03d487efd290ae8e076045781b5b1
2014-08-14 16:23:44 -04:00
Jenkins
4d4b104e91 Merge "Don't try to install if packages is empty" 2014-08-13 23:36:13 +00:00
Jenkins
8c72451345 Merge "Relabel filesystem if SELinux is available" 2014-08-12 16:30:34 +00:00
Jenkins
77fae1affc Merge "Tidy base image by removing /var/log files" 2014-08-11 17:59:05 +00:00
Victor Lowther
e92398a318 Relabel filesystem if SELinux is available
Relabel the filesystem during image builds if SELinux is supported
in the kernel of the build machine and userspace tools are available.

Otherwise touch /.autorelabel to schedule a relabel the first time
the image boots. We relabel when possible because it decreases first
boot time.

Change-Id: I0bec885d6e5d4f4e1106f3bd2a90ba5f86395b07
Partial-Bug: 1347845
2014-08-04 17:56:33 -07:00
Pino Toscano
9043871c6e debian: exclude contents of /tmp from debootstrap tarballs
Skip the contents of /tmp/ when creating tarballs with the results of
debootstrap, as that directory contains just ccache cache (and in
general temporary files).

Small (positive) side effect is that deboostrap tarballs gets slightly
smaller, something like 2-3 MB less.

Change-Id: Ib4adf3dc908f02deed408bf9188f032767eeb2bb
2014-08-04 15:48:12 +02:00
Pino Toscano
267e96f52c Centralize handling of /lost+found
Just remove globally /lost+found after the root and install phases, so
distribution elements don't need to do that by themselves.

Change-Id: Ic783e613bd8794aefd3f40c9a7c308d14cd04b8d
2014-08-04 11:48:21 +02:00
Jenkins
f303b6546c Merge "Remove package mapping for mariadb-rdo-galera-server" 2014-07-31 04:03:01 +00:00
Endre Karlson
ccce52fd21 Cleanup apt cache after grub install
Grub installation happens in finalize.d so cleanup should be done after this.

This reapplies I6322b8b529e31fd1b7251dd9e07cc85f442f7e81 after the revert,
but working.

Change-Id: Ie1873e64d407552da37a8dbedc13c3adbf79c085
2014-07-30 15:04:12 +01:00
Juerg Haefliger
340f38d014 Extend/fix support for extlinux bootloader
Some extlinux packages install mbr.bin under /usr/lib/extlinux or
/usr/lib/EXTLINUX so tese directories need to be checked as well.
Also, there are packages that create a /boot/extlinux directory
which needs to be taken into account. Finally, commit
bccffc8bfd dropped the /boot prefix
from the kernel and initrd references in the ext/syslinux config
file which is simply a bug that needs fixing.

Change-Id: Idb071c9b18ff557b0f0f76d0d754536f2deca904
Closes-Bug: 1335042
2014-07-30 09:49:34 +02:00
Jenkins
280513194e Merge "Avoid to install a blank list of packages" 2014-07-30 01:59:45 +00:00
Jenkins
e6c9ba3d1b Merge "Add a ramdisk-install.d hook path." 2014-07-30 01:31:29 +00:00
Jenkins
e818db25dc Merge "Adds RHEL common element" 2014-07-29 08:08:02 +00:00
Jenkins
32aa9da5c6 Merge "Fix sourcing of environment files" 2014-07-28 13:46:32 +00:00
Jan Provaznik
517c858275 Remove package mapping for mariadb-rdo-galera-server
This mapping is not needed anymore because mariadb-rpm element
(renamed from mariadb-rdo) uses pkg-map.

Relies on: I90e7ca4803516b86179b0f6639e307a60297960b
Change-Id: I19fb44ee6008c6c57dd331a780eec3234d46b15c
2014-07-28 10:36:24 +02:00
Jenkins
7485f4a080 Merge "Add virtual media boot support in ramdisk element." 2014-07-28 05:50:39 +00:00
Jenkins
673f6aae9f Merge "Initial centos7 support" 2014-07-25 19:54:53 +00:00
Jenkins
42bb303005 Merge "Handle non-script grub2-install" 2014-07-25 19:52:33 +00:00
Ryan Brady
7f78be9318 Adds RHEL common element
This element contains the installation steps common to RHEL
operating system versions.

Change-Id: I37cce0bd5b5d31525f1335ecd416be570d36ad61
2014-07-25 14:17:03 -04:00
Jenkins
72409a5fe9 Merge "Update RHEL7 element since release" 2014-07-25 16:41:22 +00:00
Jenkins
691e891c9c Merge "Revert "Cleanup apt cache after grub install"" 2014-07-25 15:57:06 +00:00
Om Kumar
58b5607004 Support for UBoot.
UBoot needs the kernel and ramdisk to be post processed
using mkimage utility. This element helps user do it as
part of the DIB process.

This element needs u-boot-tools to be installed.

The load address and entry point for UBoot kernel can
be specified as shown in the example below.

Example:
    export UBOOT_KERNEL_ADDR=0x80000
    export UBOOT_KERNEL_EP=0x80000

Change-Id: I0e1039bf57d1ef11a3f9831d82e24b1ec2136c13
2014-07-25 11:14:37 +05:30
Jenkins
d44fcdad95 Merge "Lock around source repositories setup" 2014-07-24 22:02:53 +00:00
Steve Kowalik
eac2d7f588 Revert "Cleanup apt cache after grub install"
This calls chroot as a non-root user, which will always fail with
EPERM.

This reverts commit ab2d1a31f2.

Change-Id: Ie674fef694ad66e1ebc22083dec2a0bc34371e7b
2014-07-23 21:56:40 -04:00
Alexis Lee
2f6fdb4142 Fix sourcing of environment files
Includes "Don't match editor backup files in environment" and "Order
execution of environment.d scripts". These had to be squashed because
the first change alone changes the order env.d scripts are sourced in.

The current glob match for environment files can source editor backup
files (foo.bash~) which will override the real changes you have made.
Other parts use the regex to avoid matching such files, so do
the same for environment file matching.  Note this has to match "."
unlike the other regex, as most env files are "foo.bash"

Also sort the files before sourcing them to ensure a reliable order.
This change should be in line with current expectations, given the
convention is to numerically prefix scripts in this directory.

Update of: I934486b3ff5884063d29c6d9b66fd9b11140464c
Subsumes: Icc509f695d7a15a8026d8c7e463f06acf65499d7
Change-Id: Ibfb562c5970b40598fc95da1e8d4beb9d51d7612
2014-07-23 17:18:28 +01:00
Ramakrishnan G
5e18777691 Add virtual media boot support in ramdisk element.
This change adds support in ramdisk element for recognising
boot from virtual media cdrom and read the parameters from
the configuration file in virtual media floppy.
Change-Id: I28ca888b4ead4905f7141b38ed4b9a3614d00d26
Closes-Bug: #1321564
2014-07-23 10:00:10 +05:30
Jenkins
22cf8e824b Merge "Explicitly name element enable-serial-console" 2014-07-22 22:23:35 +00:00
Jenkins
b44b798101 Merge "Lock around ubuntu tarball download" 2014-07-22 19:42:27 +00:00
Endre Karlson
ab2d1a31f2 Cleanup apt cache after grub install
Grub installation happens in finalize.d so cleanup should be done after this.

Change-Id: I6322b8b529e31fd1b7251dd9e07cc85f442f7e81
2014-07-22 09:28:06 +00:00
Ryan Brady
646da5b464 Update RHEL7 element since release
This patch updates the RHEL7 element to work
properly now that it has changed from beta to
release status.  It includes a repo update to
locate os-config rpms not in epel yet and an
update to the latest cloud image name.

Change-Id: I05607d62193c8f8fb1c1bece9872d456b19c5a08
2014-07-21 16:20:18 -04:00
Jenkins
d9d43c6c03 Merge "Update RHEL 6.5 Image name." 2014-07-21 13:47:17 +00:00
Jenkins
fc5e791a6b Merge "Add dhcp support for ramdisk element." 2014-07-18 12:23:45 +00:00
Jon-Paul Sullivan
94535ebb21 Lock around ubuntu tarball download
Make this safe for parallel builds

Change-Id: I578fa38e1d44bc205b70d087d161b471cd260fa1
2014-07-18 09:52:39 +01:00
Jenkins
a030387d6b Merge "Echo output when pkg-map fails" 2014-07-18 02:43:12 +00:00
Ghe Rivero
226e92fa4d Avoid to install a blank list of packages
There are some situations where the list of packages to install
in a image is blank (packages blacklisted).

Change-Id: I315f97fe619c25b36cf47ed1b7a65936b753312e
2014-07-17 20:34:20 +00:00
Jon-Paul Sullivan
94a0947a60 Don't try to install if packages is empty
After running through pkg-map we could have no packages to install,
if so, don't attempt to run a malformed command.

Change-Id: Ia8e0aed62bcf814bf85c86b54ff0837da49ae7dd
2014-07-16 11:17:40 +01:00
Robert Collins
4319730357 Add a ramdisk-install.d hook path.
We need to be able to do install.d like things for ramdisks
themselves, but install.d runs outside the ramdisk context - and its
likely to break peoples brains if we mangle the two together - so this
adds a new hook point, ramdisk-install, specifically for installing
things into the ramdisk.

Change-Id: I37d1660309cda6e28bd0b316b08f61db4e080613
2014-07-16 19:23:50 +12:00
Ian Wienand
5abb4a4f12 Initial centos7 support
Initial support for a centos7 image.

This is separate to rhel7 because the major differences are things
like repo and image locations, which are always going to be different.
We should merge any real changes into the redhat-common layers.

Apart from the added support files in centos7/*, the other change is
mostly modifications to redhat-common's extract-image to handle
different partition layouts of the centos7 image.

Change-Id: I943abe5ff0a803f36eda266a79af0d9220edcae7
2014-07-16 10:43:05 +10:00
Om Kumar
aff9b29c4d Update RHEL 6.5 Image name.
The default value points to old image name
which results in 404 error. So updating the
value to point to correct name.

Change-Id: Ia66f0cf4f4167926892a0786467412d277ebffc3
2014-07-15 14:17:06 +00:00
Ramakrishnan G
099493b62c Add dhcp support for ramdisk element.
This change adds support for retrieving the IP
through DHCP if 'ip' was not provided as a kernel
command-line argument by pxelinux.  This is used
when the kernel/ramdisk is booted by virtual media.

Change-Id: I1097ce5b56ad40f2d6dc3181681d54f924ec7145
Closes-Bug: #1321563
2014-07-15 16:30:09 +05:30
Ian Wienand
13eaa40e5e Handle non-script grub2-install
grub2-install has been re-written [1] so isn't always a shell script,
so just exec it directly.  Also use $() as that follows the rest of
the file.

[1] http://git.savannah.gnu.org/cgit/grub.git/commit?id=cd46aa6cefabd7b0fcb15cd614577e1ab8c7a841

Change-Id: Ib4fd7c6854fb485c0da6a79babf4a3d45a8a0f2c
2014-07-15 10:52:52 +10:00
Jenkins
c9bcce2030 Merge "Optimizing directory creation." 2014-07-11 16:36:38 +00:00
Jenkins
a595c7c4c7 Merge "Avoid to install a blank list of packages" 2014-07-11 15:28:49 +00:00
Jenkins
4e97def3d5 Merge "Correction: if then statement code style." 2014-07-10 07:38:49 +00:00
Jon-Paul Sullivan
fbb797ea42 Lock around source repositories setup
Problems were seen when building images in parallel with
git clones and fetches interfering with each other.

Stop it.

Co-Authored-By: Michael Kerrin <michael.kerrin@hp.com>
Change-Id: Iaa48f259755d8b22327459a5c6d224a342909aee
2014-07-09 19:37:06 +01:00
Jenkins
f58e50ee64 Merge "Remove fixfiles from rpm-distro finalize" 2014-07-09 08:51:27 +00:00
Jenkins
15b25423cd Merge "Really handle Ubuntu mirror cache skew," 2014-07-09 04:00:22 +00:00
Robert Collins
eca284cab7 Really handle Ubuntu mirror cache skew,
The last patch to do this only handled the case of SHA256SUM being
stale, but the image is more likely to be stale in the default
configuration as the hash file is downloaded over HTTPS.

Change-Id: I6531fa684e560cad48c3696394d48a600680c875
Closes-Bug: #1336067
2014-07-09 08:07:58 +12:00
James Slagle
3df0a08394 Echo output when pkg-map fails
When the call to pkg-map fails, it prints the error to stdout. However,
this output is lost when pkg-map is executed in a subshell, so the
actual error is never seen. This change adds an explicit echo so the
error is shown.

Change-Id: Id6f4fae6acadfe2839b408fb2dd11fb65d65df6e
2014-07-08 14:12:51 -04:00
AzherKhan
a22305de05 Optimizing directory creation.
Optimized the creation of directories by using the Brace expansion mechanism.

And corrected the dirname resolution to follow correct convention.

Change-Id: I048c04385d2706c4e38f8548555a59b0437e1fcd
2014-07-08 09:39:58 -07:00
Dan Prince
bbf62fc5b9 Revert "Don't match editor backup files in env...
This reverts commit 32eda4b92f.

I noticed today that environment.d files no longer seem to get sourced
by DIB. Reverting this commit fixes it.

Change-Id: I08a8feab541901c8fd0a803628f5aeb6c0eec598
Closes-bug: #1339116
2014-07-08 11:13:11 -04:00
Jenkins
3cdfd9565e Merge "Rename rhel element yum blacklist" 2014-07-08 01:38:05 +00:00
Jenkins
8a077a0b13 Merge "Last ditch effort to correct a wrong shasum." 2014-07-07 23:49:21 +00:00
Jenkins
92d4ed73db Merge "Don't match editor backup files in environment" 2014-07-07 11:51:08 +00:00
AzherKhan
d06a1caafb Correction: if then statement code style.
Corrected the if; then statement to follow bash convention.

Change-Id: Ia3f80520bb9446c4feb5ce36dccffa2b1c1d72c4
2014-07-07 03:43:15 -07:00
Chris Jones
a65d74f171 Last ditch effort to correct a wrong shasum.
Some users on corp networks are finding that cloud images appear in
their proxies before SHA256SUMS files.
We now try to force any to upstream proxies to update their copy and
retry the checksum, rather than immediately failing.
We also now add proper argument parsing to cache-url, and associated
help functionality, since we have now grown our first argument.

Change-Id: I44d44b62db8d1df990606fdf087ec1b837f491f6
Closes-Bug: #1336067
2014-07-05 12:06:28 -07:00
Ghe Rivero
24e33592c2 Avoid to install a blank list of packages
There are some situations where the list of packages to install
in a image is blank (packages blacklisted) on opensuse based
distributions.

Change-Id: Ib720473fa63671ed974d41a86fe10a9b10720f5d
2014-07-04 07:39:08 +00:00
Ian Wienand
32eda4b92f Don't match editor backup files in environment
The current glob match for environment files can source editor backup
files (foo.bash~) which will override the real changes you have made.

Other parts matche use the regex to avoid matching such files, so do
the same for environment file matching.  Note this has to match "."
unlike the other regex, as most env files are "foo.bash"

Change-Id: I934486b3ff5884063d29c6d9b66fd9b11140464c
2014-07-03 13:54:18 +10:00
Richard Su
4e68a7965b Remove fixfiles from rpm-distro finalize
Running fixfiles after setfiles is redundant. setfiles
already corrected the SELinux file security contexts.

Change-Id: I48067f06968c5add48fa91a1496b9bf36944546c
Closes-Bug: #1316241
2014-07-03 11:47:10 +10:00
Jenkins
61c192ea3c Merge "Set LC_ALL=C into dib-run-parts env" 2014-07-03 01:22:34 +00:00
Jenkins
012c974430 Merge "Add RHEL7 to Red Hat family in pkg-map" 2014-07-03 00:50:35 +00:00
Ghe Rivero
4fd84db547 Rename rhel element yum blacklist
Rename rhel 10-yum-blacklist to 10-rhel-blacklist to
avoid future name conflict with a yum element blacklist.

Change-Id: Ic2136a06e1ec8f19908ada978782733d5fa7cacc
2014-07-02 10:53:35 +00:00
Jenkins
451e571753 Merge "Create an element to allow using a dpkg manifest" 2014-07-01 20:39:16 +00:00
Jenkins
bd3b025e97 Merge "VM element: Enable serial console on Debian" 2014-07-01 20:24:37 +00:00
Jenkins
f7625ca6f6 Merge "update opensuse element" 2014-07-01 16:57:05 +00:00
Jenkins
57293fac89 Merge "Element to remove unwanted kernel/initrd." 2014-07-01 10:40:36 +00:00
Yolanda Robla
8ed645f046 Set LC_ALL=C into dib-run-parts env
Force LC_ALL to C to allow printf to work independently
from the locale. Gives invalid number error if run in non-english
locale.

Change-Id: Ia68853505485fefbf0890313456e7edb6097666b
Closes-Bug: #1335932
2014-07-01 11:49:48 +02:00
Jenkins
5ee5aa5c89 Merge "Remove uneeded code from pkg-map" 2014-06-29 13:08:32 +00:00
Jenkins
5151dc0a33 Merge "Always bind-mount pypi mirror if dir exists" 2014-06-28 00:14:13 +00:00
Jenkins
c307db119e Merge "Use $DISTRO_NAME instead of local lsb_release" 2014-06-27 23:45:42 +00:00
Chris Krelle
eed131c373 update opensuse element
This patch updates the openSuse element to work with the new
base image file format. It should be noted that the base image
file name has changed several times while updating this element,
and and may need to be set manually via the "BASE_IMAGE_NAME"
env var.

Change-Id: I4dac8bf9a4bf76a00d4a04cbf063fd245b11f3d6
2014-06-27 15:03:06 -07:00
Jenkins
a1aa1e92dc Merge "Update base element to make use of pkg-map" 2014-06-27 21:29:43 +00:00
Jenkins
75f6fd605f Merge "opensuse: support pkg-map in bin/install-packages" 2014-06-27 21:28:48 +00:00
Jenkins
850b7f16a9 Merge "dpkg: support pkg-map in bin/install-packages" 2014-06-27 21:25:59 +00:00
Jenkins
f866a6f240 Merge "introduce $SYSTEMD_SYSTEM_UNIT_DIR" 2014-06-27 08:38:37 +00:00
Jenkins
ec200af0f8 Merge "Use common element select-boot-kernel-initrd" 2014-06-27 07:00:14 +00:00
Jenkins
14741f3efc Merge "Add select-boot-kernel-initrd element" 2014-06-26 23:27:45 +00:00
Ryan Brady
4ca059f9d9 Use $DISTRO_NAME instead of local lsb_release
The $DISTRO_NAME var is now set in all of the OS elements
in environment.d.  This patch removes the call to
lsb_release and instead uses the $DISTRO_NAME variable.

Change-Id: I7088eb88b6a3611fef5a21a6b62975876549465f
2014-06-26 16:47:21 -04:00
Ryan Brady
4226bd66ba Add RHEL7 to Red Hat family in pkg-map
The current "redhat" os family omits RHEL7. The rhel7 element has the
corresponding $DISTRO_NAME set in environment.d.  This patch adds rhel7
so a pkg-map json file using "redhat" for the os family will work the
same as rhel, centos and fedora.

Change-Id: If6b4cbba618167669a499e6121f234942ca9367a
2014-06-26 16:29:59 -04:00
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
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
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
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
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
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
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
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
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
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
Dan Prince
b146f94c9a Name deploy-ironic and deploy-baremetal files uniq
Updates the 51-install-tgt and 52-install-busybox files
in both the deploy-ironic and deploy-baremetal elements
so that they have unique names.

While an end user would never use these elements at the same time we
should always use unique names for things per DIB conventions.

Change-Id: I8926870e45849341c10b2d479ddee45f9b625e2b
2014-06-11 08:16:41 -04:00
Dan Prince
c2df583132 Name 10-rhel-cloud-image uniquely
Updates the rhel7 version to be named 10-rhel7-cloud-image

Change-Id: I8d3eec989ee60f48c4895423f23e0ddff5a9cb14
2014-06-11 08:16:41 -04:00
Dan Prince
3145e4a970 Name 01-install-bin uniquely
While an end user would never use these elements at the same time we
should always use unique names for things per DIB conventions.

Change-Id: I53b10522183e8566c62922b91878e5cf767fe2c6
2014-06-11 08:16:41 -04:00
Dan Prince
93d8d022d7 Delete redhat-common 00-usr-local-bin-secure-path
Both the rpm-distro and redhat-common elements had the
same exact 00-usr-local-bin-secure-path. This commit
deletes the one in redhat-common and leaves the one
in rpm-distro (which is also required by the same
elements).

Change-Id: Ie9ef29d268b3737a6741fce016ef335db6651b59
2014-06-11 08:16:41 -04:00
Dan Prince
50374fe4e7 Name 99-setup-first-boot uniquely
While an end user would never use both redhat-common and ubuntu
elements at the same time we should always use unique names
for things per DIB conventions.

Change-Id: I2cabc583a1fd41d4fe7fbf8cf93127d49e26aff4
2014-06-11 08:16:41 -04:00
Dan Prince
5254aedfe5 Yum: support pkg-map in bin/install-packages
Updates the yum 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: I19240e74b69859f7faf9cd80440633234a677d63
2014-06-11 08:09:27 -04:00
Robert Collins
d5e0c2d778 Correct source-repository comments
git revisions are not references.

Change-Id: If450e70e46cd30a2662b7246a2555c118ed33ad2
2014-06-11 19:32:27 +12:00
Jenkins
6ff1681915 Merge "Reinstate Trusty as default for Ubuntu" 2014-06-11 04:28:56 +00:00
Jenkins
336398d57a Merge "Only use Ec2 cloud-init data source for Ubuntu" 2014-06-10 23:06:27 +00:00