Commit Graph

54 Commits

Author SHA1 Message Date
Dustin J. Mitchell
c60ed49e2e Update README formatting and content
This orders the phase subdirectories by execution order, adds
subheadings, and fixes some markdown formatting issues. This also
replaces all double-spaces after full-stops with single spaces.

Change-Id: I2d5526cbe4a902067fa9cad1456c35d13f81e183
2014-02-27 12:10:06 -05:00
tanlin
d8d81922da Rename Openstack to OpenStack
Change-Id: I65a0af76132fa1375bca25889b90d381fd038988
2014-02-12 17:52:55 +08:00
Steve Kowalik
58c755cf4c Create a new baremetal element
Rather than using a script to mount the image using nbd to extract the
kernel and ramdisk, make a new element called baremetal, which contains
a cleanup.d script that will copy them out to <image name>.{vmlinuz,initrd}.

Closes-Bug: 1224669
Change-Id: I8f3569aa12148d18b1c8242b6fbbd8857894b26f
2014-01-21 16:48:20 +11:00
Dan Prince
255387a288 Drop default distribution root element support
Converts our existing default root element code to be just a check
which exits with a failure message if no root/distribution element
is found.

Change-Id: I954a6abfd7871d5807b1a171a03fa98932410cff
2013-12-02 11:01:29 -05:00
Chris Jones
a19d8ceee7 Document ramdisk troubleshooting.
We now document how to trigger a troubleshooting shell when booting a
di-b ramdisk.

Change-Id: Ief44347893fa81a7f2669143e1746a5ee99599af
2013-11-18 19:45:59 +00:00
Clint Byrum
d07921eca5 Deprecate first-boot.d
Print a message and pause the build for 10 seconds to ensure interactive
users see the message.

Fixes bug #1212080

Change-Id: Ia388a54892c479e428b0ed7b8c70d64d65010e21
2013-09-27 09:42:51 -07:00
Monty Taylor
5e3b5320e4 Remove github references
OpenStack runs git.openstack.org which is more reliable and responsive
when projects operate within OpenStack Infra. Replace all of the
references to github with referneces to git.openstack.org.

Change-Id: Ib3ece85aba6451801487b0bdbd83147e39d9e155
2013-09-18 08:17:10 -05:00
Monty Taylor
d18891d952 Update stackforge references to openstack
Change-Id: I17e896eddf6fe84f4784cac8231552ee3d21aa39
2013-08-17 22:58:26 -04:00
Robert Collins
97bc5d7853 Allow using a pypi mirror to install via pip.
Using a custom pypi mirror can be very convenient, making image builds
substantially faster - because we create multiple virtual
environments we benefit more than single-virtualenv users would.

Change-Id: I997daf1f9477c447e1fb30818aea9e80a49b31a6
2013-08-10 22:07:30 +12:00
Robert Collins
c7d80ddeed Cleanup mount points automatically.
Manually listing the mount points that need cleanup is not
maintainable and makes it hard to write elements that use bind
mounting to inject resources into the build environment.

Change-Id: I7c9ade444f4ebe42552f8e321f257a7ec0a674ef
2013-08-09 22:53:32 +12:00
Jenkins
39d4d9b941 Merge "Remove explicit sudoers requirement." 2013-08-06 20:57:33 +00:00
Jenkins
585a155d17 Merge "Document the dangers of co-existing elements." 2013-08-06 20:55:50 +00:00
Chris Jones
357c2de681 Remove explicit sudoers requirement.
Most of our build process runs as root and the overhead of explicitly
tracking sudo commands in the shipped sudoers.d file, plus the
operational overhead of keeping the sudoers.d file updated on build
hosts over time, is now considered to be unnecessary.
Instead, we now document that the build process will expect sudo
commands to work and the operator must make this happen (either by
running as root, via sudo -E, or allowing passwordless sudo for the
build user).

Change-Id: If2628e7d0c7efde0fb99c84a217523ba29b1b38d
2013-08-06 16:08:35 +12:00
Chris Jones
3708e40051 Document the dangers of co-existing elements.
Add a potent example (and simply remedy) of how element authors can
unwittingly conflict with each other in ways that it is almost
impossible for us to guard against with low level policy/mechanism in
di-b. Fixes bug 1181309.

Change-Id: I51e845065702911371e448521327143495c3b405
2013-08-06 16:07:09 +12:00
Robert Collins
950fa15d64 Improve caching documentation.
It was a little weak, and folk need enough detail to reason about
performance.

Change-Id: I67f81ab5a206b3d42dd1e4e1eb52af88ac1a3adc
2013-08-02 22:48:51 +12:00
Derek Higgins
4651913e55 Add a new break on error
A user running di-b several times while developing an element may not
want to drop to a shell in all cases but may only want to do so if one
of their in target hooks failed.

This patch gives them the ability to do so, If break=after-error is set
then a user will be provided a in target shell taking over from where the
last failed command left off.

Change-Id: Ia2f7ac4c21b64b971f87f4ae9cb867981b13eb5e
2013-08-01 17:08:54 +01:00
Clint Byrum
f57e8c66c2 Provide hint for what package contains qemu-img
While following install instructions in README.md it should be more
clear how to install qemu-img on your system.

Change-Id: Ibb8828806bf46716b91b83a4eea696f4fe478206
2013-07-27 17:05:20 +00:00
Robert Collins
f33c4ebdde Update TripleO incubator URL reference.
The old location has been deleted and 404's.

Change-Id: I29f3b534e28e8c0efe94736dcdc7f4c453738676
2013-07-23 15:18:05 +12:00
Robert Collins
b2f1d4e2af Document an interface for offline operation.
Complex image builds can download hundreds of MB of data from the
internet with many separate lookups. It would be nice to allow users
to ask for a fast build where those lookups are entirely avoided,
using locally cached resources (where possible). This new interface
allows users to signal to elements that they wish to operate without
updating cached resources, which will in turn allow us to avoid
checking for stale data at all.

As part of this I've also documented where we cache data, so that
things like the ccache cache dir and image cache files are not a
surprise to users.

Change-Id: I27f5de6ceaa4e9c6390721b7c434fe0908df84f5
2013-07-18 09:17:01 +12:00
Robert Collins
d1a24cab16 Move end user docs higher up in README.md.
Most folk probably don't need the massive design details, so they
should come later.

Change-Id: I94067196e664b37c05fbd8882d259ffc3d95c50f
2013-07-18 00:36:54 +12:00
Robert Collins
1a172683a5 Remove excess whitespace in README.md.
Change-Id: I664cfe4aa8d05c4cc53eeb2ee5f5a200f0d41110
2013-07-18 00:00:01 +12:00
Chris Jones
8d1ce9c0c3 Build ramdisks in an image chroot.
Ramdisks are now built inside a chroot which is built by the normal
image build process. Doing so improves our independence of the
precise state of the build host.

This fixes bug 1194055.

Change-Id: Ibc254fbb9e7b404b5f38c1b35bcde8a4136e8e28
2013-07-12 11:09:35 +01:00
Jenkins
8c5888e853 Merge "Adding docs for the source-repositories element" 2013-07-10 20:45:09 +00:00
Derek Higgins
195053108b Adding docs for the source-repositories element
Change-Id: I57244a5cc2f563b2e69eb49388c3c6b49202c9eb
2013-07-10 13:04:39 +01:00
Clint Byrum
3464064a87 Add environment.d hook to setup environment.
Before each phase dib-run-parts will pick these up to setup the
environment for the commands it runs.

Change-Id: I56697d7bc370918d4063eee67a1c35d4988a5359
2013-07-09 15:01:33 -07:00
Robert Collins
cbfd5a9a62 Document some dependencies.
Change-Id: Ibe925bd48cf8dd1a5318361ab972c5734aeee3c1
2013-06-07 15:20:21 +12:00
Robert Collins
fb246a02eb Ensure that the ext4 fs can be rebuilt up to 1PB in size.
Change-Id: I16c5fe4eb0a9951d44745d6a46450f70d33b3481
2013-05-18 13:08:06 +12:00
Chris Jones
7abd158346 Force text mode console in base element.
Apply kernel command line parameters to force Linux to remain in text
mode. Typical distro kernels quickly switch into a graphical screenmode
and this is incompatible with common Lights Out Management hardware
which is able to intercept text mode consoles to display them remotely.

Change-Id: Id553972c4fd87e78c9e6fe344331a399913d965e
2013-05-16 20:04:12 +01:00
Clint Byrum
d9a2211d14 Only use tmpfs if build machine has 4GB+ RAM.
For machines with low RAM (or no access to /proc/meminfo) the builder
will still run, but will just build inside the filesystem that is
hosting /tmp. This will result in a slower build (especially if there
are a lot of .deb packages installed).

Fixes bug #1175453

Change-Id: I79f2672058c11e377548820df0ab4fad8f47ffdc
2013-05-03 06:55:53 -07:00
Robert Collins
cb62bae9b8 Build images using loopdev instead of qemu-nbd.
Qemu-nbd does not perform well with older versions of qemu due to
the lack of writeback caching mode. It also only builds qcow2 images
and there is a desire for raw image support. Finally, qemu-nbd makes
it very difficult to build images concurrently due to the somewhat
opaque nature of how it selects a /dev/nbd# device. losetup, on
the other hand, makes this process very straight forward.

Change-Id: I309fad8af4fd1e8d1720c17b65e1897a76d5e897
Co-Author: Clint Byrum <clint@fewbar.com>
2013-04-30 08:56:12 -07:00
Lucas Alvares Gomes
45173ccdb5 Adds support for post-install scripts.
Post install scripts are useful because they can perform tasks you want
to handle after the OS/application install but before the first boot
of the image. e.g: Clean the cache left by the package manager reducing
the size of the image.

Change-Id: I03e77f602192bbdce29c02999d1b57fac8051ddc
Fixes: Bug #1145786
2013-04-17 09:47:51 +01:00
Chris Jones
bd1bae7c58 Introduce the DIB_ namespace for build-time config.
Document the use of DIB_ as a prefix on environmental variables that can
be overridden at build time.

Introduce the first such variable by migrating IMAGE_SIZE to
DIB_IMAGE_SIZE.

Change-Id: Ie36b734991b913a23f37f2add47d470d7c1576e4
2013-04-12 09:50:34 +01:00
Robert Collins
5ada82a59c Add armhf support.
ARM doesn't have a generic Linux image due to the soc-specific nature of Linux
kernels today, so we drop the manual installation of that package, replacing it
with a dist-upgrade instead. This involved tweaks to the dpkg and fedora
install-package scripts.

Change-Id: I97924b80ca87781307e1087b9fe4b18215770e84
2013-04-09 08:17:22 +12:00
Robert Collins
24c89932be Always include the in-tree elements directory.
Change-Id: I5a79fbf0568f5755dd14824ed147093387170b3f
2013-04-08 10:26:44 +12:00
Robert Collins
e826e77a16 Delete elements moved to tripleo-image-elements.
Change-Id: I062d3dfb538682d72011307e8b96672e8f0844a5
2013-04-07 07:08:00 +12:00
Chris Jones
ddcf3db028 Update README.md for build-time state capture
Document the existence and genesis of /etc/dib_{environment,arguments}

Change-Id: I99e696b87230d3b45ae1d37ee0de3742f407f0ce
2013-04-05 10:00:52 +01:00
Ghe Rivero
308eee2827 Use multiple locations for elements dir.
Using ELEMENTS_DIR env variable, you can specify multiple dirs containint your elements.
It must be a ":" separated elements list.

When an element is seen in one of those lists, it will be chosen and will continue with the next element.

Change-Id: I18eca27d943139cd6ca1ebd232b419e502d7b048
2013-02-27 10:48:55 +01:00
Robert Collins
9afddcf266 New element that uses a fedora cloud image as the base.
Change-Id: I7d83bb2b359e7a8c3858eca04c96e35cf4e1fe9e
2013-02-15 09:33:29 +13:00
Robert Collins
7f77729ec5 Move the dpkg specific stuff to a dpkg element rather than being hardcoded.
This includes the install-packages implementation for dpkg, apt http proxy
config, daemon blocking and unblocking.

Change-Id: I8f159021d2b223d7003cec067de3aa605ad06974
2013-02-14 11:16:12 +13:00
Robert Collins
1ee3a01447 Move initial root contents into a hook.
This is a necessary but not complete step towards supporting Fedora and Suse
distributions. Further work is needed (e.g. to quiesce daemons on
installation).

Change-Id: If3ea6093d41a21de755db52328226b84b5a3ede6
2013-02-11 17:01:36 +13:00
Clint Byrum
c8c33e3bb1 Add a simple implementation of element dependency
This adds a new optional file to the root of elements. The
file lists dependencies which will be added to the list
requested by the user during disk image creation.

Change-Id: Id71c3b333563604bbbaf90f9cf40e24fa9738fc8
2013-01-23 16:04:20 -08:00
Monty Taylor
d0e9f98b5b Replace demo references with incubator.
Change-Id: I94e88471e85ab5cf364ce995d6e09631030e3aeb
2012-12-19 15:07:48 -08:00
Chris Jones
2cefdd7e60 Tidy up base element:
Fix a typo in the base element itself.
Refer to it early in the README since it is likely to be useful to
almost everyone.

Change-Id: I4a753b61542f8a354ade7fcc4436076aec61e6c0
2012-12-17 16:53:46 +00:00
Devananda van der Veen
d212ffd1db Add guidelines for composing elements.
Change-Id: Id9bb81aefaad2024d9a73d02c58a73565250b813
2012-12-16 18:49:38 -08:00
Robert Collins
1f39f4c629 Add a test framework for testing elements.
Change-Id: I845ac3ec6bbcd212ee43151981a2bc5264f4a5b3
2012-12-14 20:17:39 +13:00
Robert Collins
d03825b504 Add the ability to break into a shell during builds.
Change-Id: I87af952d892f8622e4c916085fc896c735a35438
2012-12-14 20:17:29 +13:00
Monty Taylor
1eff4a436e Rename flavour to element.
Flavour is overloaded in openstack due to it being used by nova. Element
seems to have the same feeling of combinability without using a term already
in active use in the openstack community.

Change-Id: Ia4c028d4062a8f69c66665821c94dd4bcdf06031
2012-12-05 14:04:58 -08:00
Robert Collins
4b7cdb4fdc Fix copyrights for HP work. 2012-11-15 16:20:32 +13:00
Robert Collins
823e18fda2 Document more about the layers. 2012-11-13 10:00:33 +13:00
Robert Collins
40e954735c Make it possible to set a size from within a flavour, and use that for devstack. 2012-11-12 11:47:26 +13:00