Commit Graph

1188 Commits

Author SHA1 Message Date
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
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
Dan Prince
b2c8ec3259 Add test to ensure we don't duplicate filenames
Add a new test_no_dup_filenames module to help ensure we don't have
duplicate names across elements.

Change-Id: I2af4a614f71fe58eba04e3fc50d3c0a70dd91f71
2014-06-11 08:16:41 -04: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
Derek Higgins
e7d105a751 Add tar as an output type
Add support for d-i-b to create tarballs, the primary consumer for
tarball images would be linux containers.

Change-Id: I27d67401f3e4415226a4a51e1dde46f739c0220a
2014-06-11 10:48:50 +01: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
028bb34a31 Merge "Check return code of element-info" 2014-06-11 04:22:35 +00:00
Jenkins
336398d57a Merge "Only use Ec2 cloud-init data source for Ubuntu" 2014-06-10 23:06:27 +00:00
Gonéri Le Bouder
eca59b2e97 dpkg: local cache for .deb files
With this patch, /var/cache/apt/archives directory content is preserved.
The directory is actually a bind mount of the
~/.cache/image-create/apt/$DISTRO_NAME directory, much like what we do
for ccache.
You can use DIB_APT_LOCAL_CACHE=0 to disable this behavior.

This trivial change improve performance A LOT (>30%), even if a local
HTTP proxy because:
 - there is no need to copy again and again the same files
 - we avoid network latency

The patch has been tested with Debian and Ubuntu with every elements
from the tripleo-image-elements repository, the final size of the cache
directory is about 700MB per distribution subdirectory.

Change-Id: I4fab499493f734c7c546d4d23b1a98f0e7523a39
2014-06-10 17:20:37 +02:00
Jenkins
343f70cd23 Merge "Add new cloud-init-datasources element" 2014-06-10 06:43:47 +00:00
Gonéri Le Bouder
1de9612dad map-services: add openvswitch
OVS service is called:
 - openvswitch-switch on Debian/Ubuntu
 - openvswitch on RHEL/Fedora

This changes is needed to get the neutron element to work
on Debian/Ubuntu with systemd:
  I6e3df30dc3a6918f3a949a7dac47289ede5c3d1f

Change-Id: I2748a9db7f8ee456698187a9646bc7cda2256fe7
2014-06-09 09:18:02 +00:00
Giulio Fidente
3262e76248 Ensure dib-run-parts profiling works with py3 and py2
This change adjusts the "inline" python function used to profile
run-parts duration to make it run successfully on both py2 and py3

Change-Id: Ib5287a56b8e2b3e882dca489192f01d9f01cd8ba
2014-06-06 18:37:39 +02:00
iberezovskiy
b740c50c76 Rename old image file instead of rewrite it
If we have the old image file with same name as new image file
we shouldn't rewrite it, just need to rename old.
Uses date number in old image name.

Fixes TODO in lib/common-functions

Change-Id: Ica58a0f4435217912bddf950322299d2ed2889f3
2014-06-06 12:59:28 +04:00
Tomas Hancock
6b8a0408d8 Add missing dollar
Check is missing a dollar leading to an error on deploy ramdisk
consoles when booting .

Change-Id: Id61af0f7abbc353e0750580b80e448820cc17b10
2014-06-04 14:17:22 +01:00
Om Kumar
538b978701 Replacing deploy to deploy-baremetal in README.md
Now that deploy has been renamed to deploy-baremetal, README.md needs
to be updated to refer to the new elements.

Change-Id: I7c0d5bfe158628ea1faf2c2914ee7f532d172a28
2014-06-04 03:48:24 +00:00
Adam Gandelman
40914bd121 Reinstate Trusty as default for Ubuntu
Now that issues associated with this bump have been addressed
elsewhere, reinstate trusty as the default DIB_RELEASE for
the ubuntu element.  Also adds a note about memory requirements
to the ramdisk element.

Change-Id: Ia89c83ba0ee4ad3bd89b833ba0db08135eac63ed
2014-06-03 16:28:25 -07:00
Adam Gandelman
f61c1acf81 Only use Ec2 cloud-init data source for Ubuntu
Default to only having cloud-init query Ec2 on first boot for Ubuntu,
until cloud-init has been SRU'd to fix the CloudSigma data source issue
that causes Trusty boots to hang.

Change-Id: Icb3734d5ae78f4a0a6c0fae1af4a2ce3c809308c
Partial-bug: #1316475
2014-06-03 16:27:41 -07:00