Commit Graph

934 Commits

Author SHA1 Message Date
Jenkins
8ba6a26e0a Merge "Allow source-repositories to be disabled completely" 2014-10-20 11:35:40 +00:00
Jenkins
bb07de7fe9 Merge "Enable dracut deploy ramdisks" 2014-10-20 11:03:54 +00:00
Ben Nemec
eed30adc48 Enable dracut deploy ramdisks
The element builds dracut from source on Ubuntu because the
Ubuntu dracut package is broken and very old, so it can't be
installed properly and causes a number of other issues that
are fixed by using a newer version of Dracut.

This initial version should work in virtualized environments.
Further validation of its suitability for real baremetal
deployments will need to be done in the future, but this should
be sufficient to enable that work.

Regarding Dracut specifically, in order to limit the changes
needed in the existing scripts this element continues to use a
cut down version of the /init script that we were building for the
existing ramdisk.  However, instead of running it as pid 0 it is
run as a Dracut pre-mount hook.  This allows Dracut to set up all
of the hardware and system bits, while falling early enough in the
Dracut sequence to complete the deployment before Dracut would try
to boot off the hard disk.

bp tripleo-juno-dracut-ramdisks
Change-Id: I144c8993fe040169f440bd4f7a428fdbe3d745cf
2014-10-17 21:44:09 -05:00
Jenkins
2b60bea961 Merge "Allow for multiple image outputs from raw source" 2014-10-16 21:56:28 +00:00
Jenkins
e289b31d12 Merge "Consolidate lsb_release source-repositories" 2014-10-16 21:14:05 +00:00
Jenkins
5b71da8899 Merge "Remove first-boot.d support" 2014-10-16 18:36:59 +00:00
Jenkins
4ec80ee1f0 Merge "Don't re-install cloud-init for centos7 images" 2014-10-16 17:39:20 +00:00
Ghe Rivero
873de01491 Remove first-boot.d support
After being deprecated two releases ago, finally remove any reference
for the support of first-boot.d

Change-Id: I08d67404ef48cad61db3b18fb86e970abfa5d2b6
2014-10-16 09:48:14 +00:00
Ben Nemec
0eccd2808c Allow source-repositories to be disabled completely
In our official image builds we are only allowed to use resources
that are "blessed" by the build system.  This means that external
things like git repos and tar files are not allowed.  Currently,
even in offline mode source-repositories expects those things to
be available in the cache, so we need a way to disable it entirely.

This change adds an environment variable NO_SOURCE_REPOSITORIES
that does so.  It can be set in an environment.d script so elements
that might rely on a source repository will know it's not available.
The 02-lsb script in redhat-common is one such example and is
updated to handle this case.

Change-Id: I0de63bee6ad79733d6711478c707a9b41593e85f
2014-10-15 12:24:50 -04:00
Ian Wienand
97678dcda5 Move to final release of CentOS7 images
This is the final released image; it is the same one deployed in many
cloud provers such as HP and AWS.  It is also safe from all known
vulnerabilities up to its release

Change-Id: Ib8ba561662d2a98da55eb292b850dc019226dd59
2014-10-15 15:35:51 +11:00
Ben Nemec
0d08925892 Consolidate lsb_release source-repositories
Each distro had its own copy of the file, but they were all the
same and it's actually installed in redhat-common so it belongs
there.

Change-Id: Iad15f39fd28d1c4e20d30dcb2eb0ae6f2fa2b015
2014-10-14 15:09:44 -05:00
Clark Boylan
ae928057bd Allow for multiple image outputs from raw source
When uploading images to multiple clouds it is possible that the same
image will be needed in multiple formats to accomodate hypervisors
across clouds. Update disk-image-create's -t flag to take a list of
desired output image formats so that a single disk-image-create can
output all of the desired image formats.

Change-Id: If121b2342ae888855ba435aa3189f039e985b812
2014-10-13 09:16:42 -07:00
Ian Wienand
83656127da Don't re-install cloud-init for centos7 images
The centos7 images come with the base version of cloud-init already
installed.

---
$ virt-inspector CentOS-7-x86_64-GenericCloud-GA-7.0.1406_01.qcow2
...
      <application>
        <name>cloud-init</name>
        <version>0.7.5</version>
        <release>10.el7.centos.1</release>
        <arch>x86_64</arch>
      </application>
...
---

I think this is a hang-over from early rhel7 images that didn't have
it.

Change-Id: Idf488942222d9e6bca4d66f04f5af42e6707944d
2014-10-10 15:52:26 +11:00
Jenkins
4b05499384 Merge "Move install bin from rpm-distro to yum" 2014-10-10 01:20:51 +00:00
Ben Nemec
e5a2e07301 Check for epel before installing it
instack runs this script on a system where epel has already been
installed, which causes the yum command to fail.  Only installing
the epel-release rpm when it isn't already present addresses the
issue.

Change-Id: Ia179d7c7ed69ea5f785b5dcd16394c7663a145cc
2014-10-09 13:00:12 -05:00
Jenkins
3180c63338 Merge "Ensure epel7 is installed only on rhel7/centos7" 2014-10-08 14:00:12 +00:00
Ghe Rivero
6484b9b026 Move install bin from rpm-distro to yum
rpm-distro element was trying to install bin programs into the
image but it doesn't provide any. Move that logic into the yum
element which provides the install-packages bin.

Change-Id: Id5339fc7ffbef6327fe41f50a3e39ab30b6d0320
2014-10-08 07:43:19 +00:00
Jenkins
0f7d9af998 Merge "Move dpkg manifest creation to finalise" 2014-10-07 01:21:28 +00:00
Jenkins
927f437cd0 Merge "Save extended attributes when creating tar" 2014-10-07 01:16:33 +00:00
Jenkins
a9086da83f Merge "Fix openSUSE cloud image download and extraction" 2014-10-06 13:25:05 +00:00
Monty Taylor
3acc866f6d Use DIB_IMAGE_CACHE everywhere
disk-image-create processes a DIB_IMAGE_CACHE variable and exports it,
but there are several elements that ignore the value and wrote out
the base location themselves. Use the variable everywhere so that it
will get overridden everywhere.

Change-Id: I00fff354d6c931ad67cf3052d055f0e4604dfdc8
2014-10-05 13:58:32 -07:00
Ben Nemec
edd7477891 Save extended attributes when creating tar
The way redhat-common's extract-image script was creating the base
tarball caused file capabilities to get dropped, which meant that
things like ping in RHEL 7 images was unusable for regular users.
This change adds the necessary options to the tar call to maintain
as many extended attributes as possible.

--acls and --selinux are intentionally omitted, and the selinux
xattrs are filtered out because all of those items cause issues
in our chroot environment.  We restore selinux attributes at the
end of the build anyway so that shouldn't be a problem.

bz reference: https://bugzilla.redhat.com/show_bug.cgi?id=1144149

Change-Id: Ibff99ce9bde01bc5ecf95dc3a5d3e2cebe5015b9
2014-10-03 23:05:17 -05:00
Jenkins
07f11be024 Merge "Install openstack-selinux on RHEL" 2014-10-03 12:44:46 +00:00
Jenkins
a31bae8f60 Merge "Add unit test for cache-url" 2014-10-02 20:28:28 +00:00
Giulio Fidente
ee001cf4bd Ensure epel7 is installed only on rhel7/centos7
Change-Id: I5812812f7d2cb5ba2e310e33d6e01cda8823c1c4
2014-10-02 12:14:25 +02:00
Jenkins
42e79c4a6e Merge "Fix $DISTRO_NAME usage for centos7 element" 2014-10-02 10:10:04 +00:00
Richard Su
c1d4cd13e9 Update EPEL release rpm
EPEL 7 was released September 30. The beta release rpm was removed
from the repo and was replaced with the final release rpm.

Change-Id: I103a2f7abd7563869b9e39ccc1fbb3cfbd9ff6ae
2014-10-01 22:26:18 -07:00
Ryan Brady
c8037cc73f Fix $DISTRO_NAME usage for centos7 element
In both of the changed files in this patch, the $DISTRO_NAME usage
is checking against "centos".  The valid value for the centos7
element for $DISTRO_NAME is "centos7"[1].

[1] http://git.io/8IvuTw

Change-Id: I0c4a4b2ecf87c7a9283d10071f6feb494a6c716a
2014-10-01 21:42:47 -04:00
Ben Nemec
58d6c6478a Add unit test for cache-url
A sanity check that cache-url does the right thing when presented
with the appropriate curl return codes.  This change brings in the
test code for scripts from tripleo-image-elements, which needs to
be factored out into a place both projects can use it.

I'm stubbing out curl so we don't have a dep on curl in our unit
tests, and because I've seen some strange behavior out of curl in
the gate that caused random failures in this test.

Change-Id: I31e6b06b45415feec7285511d07e65eb78d0d045
2014-09-30 16:39:21 -05:00
Richard Su
8baf819b08 Install openstack-selinux on RHEL
The openstack-selinux package contains policy updates for OpenStack.
Updates are accrued in openstack-selinux before they are merged into
the upstream selinux-policy package.

Change-Id: I7c00e5cae17489202fe7aee3e656fca27ab630ba
2014-09-29 21:53:22 -07:00
Jon-Paul Sullivan
4d65e44472 Move dpkg manifest creation to finalise
As some finalise steps can install packages we need to generate the
dpkg manifest after that has occurred.

Change-Id: I2177db2e64d4d9c21deeac7cf017919888a2d524
2014-09-29 16:08:15 +01:00
Ben Nemec
dde3d24213 Allow custom rootfs labels
Per [1], our current root label of cloudimg-root does not work with
XFS because XFS only allows 12 character labels.  This change
addresses that by allowing a custom rootfs label to be specified
in the call to disk-image-create.  There should be no backwards
compatibility concerns as the default label is unchanged.  Any
external elements dealing with the label would need to be updated
to support this new feature, but should continue to work as before
as long as a custom label is not specified.

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1139584

Change-Id: I596104d1a63b5dc6549e8460a1ae3da00165ef04
2014-09-26 17:44:08 -05:00
Jenkins
89356c6d34 Merge "Refactor ramdisk element to allow alternate implementations" 2014-09-26 19:23:53 +00:00
Jenkins
78be2a21fe Merge "Add svc-map element." 2014-09-26 18:36:15 +00:00
Ryan Brady
e1853a7d5b Add svc-map element.
Adds a new svc-map element which can be used to install
services based on an in element 'svc-map' YAML config
file format.

This change is intended to decouple elements from DIB
and allow new elements to support multiple distributions
(with various service naming schemes) without having to
constantly maintain DIB's various bin/map-services files.

This patch ensures all of the YAML files are compiled into
a single file without namespaces.  The YAML compilation
process occurs during image creation time and errors if
conflicting mappings are found.

Change-Id: Id11433ea342aace71a358936a7ca3151ec11d506
2014-09-26 12:00:38 -04:00
Ben Nemec
5aca301693 Refactor ramdisk element to allow alternate implementations
In preparation for enabling Dracut-based ramdisks, this change
factors out functionality that is common to both busybox and Dracut
ramdisks.  Said functionality is moved to a ramdisk-base element
which is added as a dependency of the ramdisk element.  ramdisk now
only contains the functionality specific to building busybox-based
ramdisks.

bp tripleo-juno-dracut-ramdisks
Change-Id: Iad2907c8be491c88727d87ed5e5a720e5beb66c3
2014-09-26 00:13:55 -05:00
Jenkins
dbc60e8942 Merge "Change order for yum-repos file in centos7 element" 2014-09-23 11:52:45 +00:00
Jenkins
0b9ffe4a74 Merge "Provide ability to build images for other architectures" 2014-09-23 03:50:38 +00:00
Jenkins
b308c844ae Merge "Adds EPEL repo, cleans up rhel7 repos" 2014-09-20 19:12:05 +00:00
Jenkins
0ddd704e08 Merge "Update to newer Centos7 images" 2014-09-19 22:05:10 +00:00
Ryan Brady
dfd99460c7 Adds EPEL repo, cleans up rhel7 repos
This patch adds a new EPEL element for use with EL-based distros
in accordance with the official docs[1].  This patch also
modifies the rhel7 element to not use the hard-coded repo file.

[1] https://fedoraproject.org/wiki/EPEL

Change-Id: Ib2fa24b2d519837271a0e213a2dc5a012cc31f3c
2014-09-19 07:57:12 -04:00
Ian Wienand
45afb6d86c Update to newer Centos7 images
Update to newer Centos7 images as announced at [1].

Changes included:
 * update to GA image
 * respect TMP_DIR for image working directory
 * use suffix-match rather than prefix-match to build RAW_IMAGE name
   to be more robust against weird names
 * partition layout work-arounds not needed any-more, all one
   partition.

Resulting image booted locally with kvm and virtualbox (after
conversion to vdi)

[1] https://www.redhat.com/archives/rdo-list/2014-August/msg00045.html

Closes-Bug: #1363146
Change-Id: Ie24033468b78587ea87188ee1b843b26895798ff
2014-09-18 10:48:40 +10:00
Jenkins
41ba1d2b9c Merge "Add ceilometer service mappings" 2014-09-17 16:56:30 +00:00
Jenkins
6518876a5f Merge "Use dib-run-parts from dib-utils" 2014-09-17 14:31:49 +00:00
loki
414edd44c2 Provide ability to build images for other architectures
Adds binaries specified by user to chroot environment
allowing to build  images on amd64,i386,armhf,arm64
architectures.
Closes-Bug: #1332458
Change-Id: If6e63a472ee85559b93b5e6b96d9c3ddcf7bcc98
2014-09-16 22:50:17 +05:30
Jenkins
93be491c46 Merge "Reset yum configuration in post-install.d" 2014-09-15 23:03:26 +00:00
Jenkins
137becad69 Merge "Run environment.d hook for manifests earlier" 2014-09-15 21:23:41 +00:00
Jenkins
7ec2c7cdc4 Merge "Add vmedia boot support for deploy-ironic element" 2014-09-15 16:07:09 +00:00
Uwe Grawert
7b9b82a4d5 Change order for yum-repos file in centos7 element
Due to changes in centos7 element to use package-installs the order
of yum-repos in pre-install.d needs to be changed, to make yum repos
available before package-installs is called to install packages.

Change-Id: I47b584506465d90247f30bad515a32323e52180e
2014-09-15 14:49:46 +03:00
James Slagle
9fa28a31f1 Add ceilometer service mappings
Add the service mappings needed for ceilometer elements.

Change-Id: Id139a7c208659ead6330842bec01f7466d7ba417
2014-09-12 09:00:18 -04:00