Commit Graph

594 Commits

Author SHA1 Message Date
Clint Byrum
04a208c866 Add dib-run-parts install command to sudoers.d
Change-Id: I8943d18efa4077da87cb822255f70c6541f32f30
2013-02-14 11:36:06 -08:00
Clint Byrum
91c30f6ab2 Use dib-run-parts for running scripts in target
Also modified dib-run-parts to apply a more workable solution for
filtering out unwanted files such as editor backups and VCS.

The script is installed in its own element, depended on by the OS
specific ubuntu element. This is  because the ubuntu element (and
later other OS's) are responsible for populating the root filesystem.
If we try to install this in base, the root filesystem will look to
be populated already and we will skip automatically choosing ubuntu.

Change-Id: I017646748c1a8360299106289b57d976d45875a8
2013-02-14 10:48:10 -08:00
Jenkins
3ce071c894 Merge "Move the dpkg specific stuff to a dpkg element rather than being hardcoded." 2013-02-14 18:28:55 +00:00
Jenkins
49920223b5 Merge "Change run-parts usage to be compatible with Fedora." 2013-02-14 16:55:03 +00:00
Arata Notsu
826c9c7935 Make populate_libs() more generic.
It can handle "path to path" output of ldd, such as
    /a/b/c.so => /x/y/z.so (0x123456789)

Change-Id: I68d1096694835818c9129212a02796e1ce1c181d
2013-02-14 20:50:27 +09:00
Clint Byrum
d84a2fa246 Work in progress run-parts replacement.
Change-Id: Ie95b3ed2145594b5f6436454a6756012fc1c4729
2013-02-13 16:41:27 -08: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
3860af4be5 Change run-parts usage to be compatible with Fedora.
Change-Id: I7a4e1252b0ced940cd4d8fa2fbd096c016933954
2013-02-14 11:16:12 +13:00
Tim Miller
9806b6e737 Give stack user passwordless sudo:
This is very helpful when performing automation.

Additionally, removed addition of stack user to admin group,
since that group does not exist on all systems, and
passwordless sudo eliminates the need it was addressing.

Change-Id: I727bd51acb920c6c2e66247069998b6ee4267895
2013-02-13 12:18:50 -08:00
Tim Miller
56e50ee5cf Consolidate common OS installation into a script:
Move common openstack service installation operations
into a new script `os-svc-install`, which simplifies
the elements for openstack services.

Change-Id: Ied8ac3278e7fe8af76e24748ec4e598a84afa03c
2013-02-13 11:06:00 -08:00
Robert Collins
8220c00095 Bad code landed, causing ubuntu to be always landed.
Change-Id: Ia77073563fde70140169dbbc5a7448aad54295e2
2013-02-13 13:58:35 +13:00
Jenkins
b98e8d1b3f Merge "ramdisk-image-create shows a failed binary dependency" 2013-02-12 23:16:23 +00:00
Jenkins
86a1294c28 Merge "cloud-init-nocloud element for non-cloud image" 2013-02-12 23:13:48 +00:00
Jenkins
792a4a5916 Merge "Add cfn-hup configuration for os-refresh-config" 2013-02-12 23:09:13 +00:00
Jenkins
e5e36ce2c1 Merge "Add element to call os-refresh-config" 2013-02-12 23:07:12 +00:00
Jenkins
750e4c3e06 Merge "Correct misuse of return in ramdisk-image-create" 2013-02-12 23:05:07 +00:00
Jenkins
4008475bfc Merge "Fix unnecessarily creating a temporary directory" 2013-02-12 23:04:56 +00:00
Jenkins
fd8b30fa59 Merge "Add default element selection" 2013-02-12 21:22:32 +00:00
Clint Byrum
f3dc4c9380 cloud-init-nocloud element for non-cloud image
Disables cloud-init from querying EC2 metadata, or any cloud metadata
service. It keeps only the Nocloud and None data sources, which are both
expected to be "baked in" to an image.  This speeds up boot by 2 minutes
on hosts where cloud-init cannot reach the EC2 metadata service.

Change-Id: I43522c4a442c0f2fc2044d4898768ceb4f839099
2013-02-12 12:49:20 -08:00
Clint Byrum
0841576862 Add cfn-hup configuration for os-refresh-config
Configures cfn-hup to run os-refresh-config on Metadata changes.

Change-Id: I65fcd8e09fe3cb070e3036156eaca4b5b0993d67
2013-02-12 12:21:42 -08:00
Clint Byrum
d9cc434fa0 Fix broken pep8 in setup.py
Change-Id: I304a581068d6513e5ee7acbb80b80a912c6f7a39
2013-02-12 08:56:35 -08:00
Clint Byrum
9ed4aaf2b0 Add element to call os-refresh-config
os-refresh-config simply runs things in a predictable order in directories
that other elements can populate. This element installs it and sets it
up to run at boot.

We also modify os-config-applier element to be called by this rather
than to have its own upstart job. This provides an example of how other
elements can insert themselves into the refresh process.

Change-Id: I52d72b7fd302ec317840af87fa77299387af99ad
2013-02-12 07:25:43 -08:00
Chris Jones
8f96a286d7 Add default element selection
This change includes the 'base' element by default and adds a
command line switch to prevent this behaviour. This should reduce
confusion since this element is almost always necessary.

Change-Id: Ib4a2ef53a76b119b764751fa21058f4e2cb37741
2013-02-12 09:29:19 +00:00
Arata Notsu
aa6f5f8005 Correct misuse of return in ramdisk-image-create
Replaced return with exit.

Change-Id: Iee26177cdb58af67b6919da12456debfe5940105
2013-02-12 17:43:35 +09:00
Arata Notsu
5c13dc1d75 Fix unnecessarily creating a temporary directory
mk_build_dir was executed twice in ramdisk-image-create.

Change-Id: I93cf83775fb5e7ba3e6b84643f723568a2420305
2013-02-12 17:29:52 +09:00
Arata Notsu
9386a35e47 ramdisk-image-create shows a failed binary dependency
This patch fixes a problem: if a binary is not found, the script
exits without a message informs what is needed (because of 'set -e').

Change-Id: I00b8917918f0e6eddf8506d6548432077eb4bf14
2013-02-12 17:07:09 +09:00
Jenkins
9605c7090a Merge "Add missing python-pip dependency in heat-jeos" 2013-02-12 07:08:53 +00:00
Robert Collins
8f9d433917 The default ARCH was broken due to $ARCH not being exported.
Change-Id: I84f2b60c391d90ed285bd30669260c8483a3c76f
2013-02-12 19:23:34 +13:00
Clint Byrum
41b93c99c4 Add missing python-pip dependency in heat-jeos
Change-Id: I9d0b5d0f86c8fc07cbd7e432df79f7b66c98af0f
2013-02-11 18:11:51 -08:00
Clint Byrum
80b9b45e31 Work around cfn API bug in HEAT w/ specific boto
See https://bugs.launchpad.net/heat/+bug/1122472 for information on the
specific problem in heat. This can be removed when that bug is resolved.

Change-Id: I76a7a42dea9472c54f03593c8c67856aa23f2c73
2013-02-11 14:23:02 -08: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
Jenkins
988bebcefb Merge "Add os-config-applier element." 2013-02-05 06:54:53 +00:00
Clint Byrum
c3ee071d73 Make it possible for openstack-CI to run tests
Per http://wiki.openstack.org/ProjectTestingInterface we enable all
of the commands except build_sphinx because we do not have any sphinx
documentation as of yet. Includes babel support though there are no
properly internationalized strings just yet.

Change-Id: Iae6e6b3f9e605106f4575196fa5527d2187255df
2013-02-04 22:26:17 -08:00
Robert Collins
3d95bf81c5 Export the ELEMENTS_DIR so that dependencies work.
Change-Id: I544b0762f8a13a11564cf02c5fdbe3cb521f63b3
2013-02-05 14:39:38 +13:00
Tim Miller
455bae12bd Add os-config-applier element.
Change-Id: Ie7ee15c26fbbcf93f2708bc63005cee5f75e8fc1
2013-01-30 21:07:10 -08:00
Robert Collins
24600defd0 Split stack user creation out of devstack element.
This makes it easy to create a local user without cloud init, for vm
instances.

Change-Id: Ifaae67418a725eb5a39cf9e46f0804b09986f63c
2013-01-31 16:50:41 +13:00
Jenkins
0135f07ad9 Merge "Improve error message for missing element." 2013-01-31 00:18:45 +00:00
Jenkins
cb40379523 Merge "Add option to clear environment" 2013-01-31 00:17:50 +00:00
Tim Miller
4688804bbc Improve error message for missing element.
Change-Id: I80beae77874e36d7f47880b030c225100b102e95
2013-01-30 16:07:02 -08:00
Ghe Rivero
11b4a5501d Create install-packages as a binary.
Only supports Debian family distribution so far.

Change-Id: I9fa0b833c34a614fe498c6c6ae599733a69c1309
2013-01-31 00:08:58 +01:00
Chris Jones
997165ff11 Add option to clear environment
This adds an option to disk-image-create that allows it to re-exec with
an empty environment if required.

Change-Id: I9e51aa07b903e18cdd0ed5f953800307f9899b5d
2013-01-30 18:24:24 +00:00
Jenkins
8997ec6d0b Merge "Add openstack-all element." 2013-01-30 09:42:29 +00:00
Jenkins
42a2d1cf44 Merge "Add sudoers rule to format and mount anykind of partitions in disks." 2013-01-30 09:26:11 +00:00
Jenkins
42cad78e20 Merge "Add element to install config-applier" 2013-01-30 09:17:19 +00:00
Chris Jones
15dbc42d72 Switch locale to C
Remove the explicit installation of an English language pack and instead
just default LANG to C. This settls Perl's noisy warnings and also stops
any side effects of different language build hosts.

Note that this is set right at the start of the build process, so it
should be entirely possible to override if needs be.

Change-Id: Id3b31162d4198fa02dc5a4d11168e57dbcd14a5d
2013-01-28 18:08:50 +00:00
Ghe Rivero
861f633196 Add sudoers rule to format and mount anykind of partitions in disks.
The element vm is the only one creating a partition in the disk.
If not included, it will ask for sudo password to format or mount
the whole nbd disk or disks with multiple partitions.

Change-Id: Iac0987d2088433873b7cbb68deecc9254b2d0103
2013-01-28 17:35:37 +01:00
Tim Miller
e831a06bad Add openstack-all element.
Change-Id: I192b03c64899c77f4bc739b6a09921284b600a98
2013-01-25 14:01:25 -08:00
Clint Byrum
b8d51d3c9a Add element to install config-applier
Change-Id: I91f519f5ecbe1c5a252e87af28b66eef983478b0
2013-01-25 10:17:35 -08:00
Clint Byrum
15a1ad0b5b Enable 'ec2-user' in HEAT for quantal images.
Employs some workarounds that can be removed when bugs reference in
comments are fixed elsewhere.

Change-Id: If423844f0dfabbddd4d0d7b8ad8fcf6d32693195
2013-01-25 06:13:19 +00: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