Commit Graph

1586 Commits

Author SHA1 Message Date
James Slagle
697800987f Allow for disabling rhel registration
When using the rhel element, it can be uesful to disable registration.
For instance, if using an internal mirror repository that does not
require registration/authentication.

Change-Id: I42fa34e7f146137e5b1b9c5d7785702311e1dca1
2015-01-07 10:27:48 -05:00
Jenkins
c597e99f4e Merge "Ignore stderr from pkg-map" 2015-01-06 21:20:18 +00:00
Jenkins
ef0c043c85 Merge "Add Activation Key Support For Customer Portal" 2015-01-06 18:04:12 +00:00
Jenkins
76f5f199cb Merge "Don't trace RHEL registration scripts" 2015-01-02 18:37:22 +00:00
Jenkins
0516d45f8e Merge "Fail helpfully if uuidgen is missing" 2014-12-23 23:27:27 +00:00
Jenkins
ebe166448f Merge "Allow absolute path to image with ironic-agent" 2014-12-23 23:08:50 +00:00
Erwan Velu
75b34baa98 dracut-ramdisk: fix support for elements with ramdisk-install.d
Copy all of TMP_MOUNT_PATH into the ramdisk so that
ramdisk-install.d actions are respected.

Includes a workaround for a bug in Dracut that caused the copy
to fail.

Also moves init instead of copying it so we don't conflict with
the Dracut init.

Change-Id: Ia8d7b210369fe7eb7ab239cbdb7f96841104a35d
Closes-Bug: 1403121
2014-12-18 11:46:49 +01:00
Ben Nemec
68394e134e Don't trace RHEL registration scripts
These scripts are littered with references to passwords and keys,
so rather than try to disable tracing in every one of those places
I propose we simply turn it off for the scripts.  This will likely
need to be revisited after the global tracing discussion is
resolved anyway.

Change-Id: I805015300bf01b2f8eec9f70ccfdf533dd9386b3
Related-Bug: 1298205
2014-12-17 16:39:27 -06:00
Abel Lopez
da7787069d Ignore stderr from pkg-map
The latest update to package-install captures both stderr and stdout
from pkg-map, unfortunately, pkg-map has a 'missing-ok' option
which causes it to print an error message on stderr.
The result is that package-install tries to look for packages named
"Missing", "package", "name", etc.

Change-Id: I86b3b71a64b29d533b42fd0cae020e8ecf22cac2
Closes-bug: 1402085
2014-12-17 10:08:08 -08:00
Clint Byrum
4dceacd5ed Allow absolute path to image with ironic-agent
The element was prepending the work directory forcibly, which will have
problems when the image name has an absolute path, which is allowed.

Change-Id: I0cb7b96e24daab8ee73611936af72074c70ac1aa
Closes-Bug: #1400405
2014-12-16 10:40:55 -08:00
Yuriy Zveryanskyy
26e2ec6faa Add install section to Ironic agent systemd service file
"Install" section is necessary for for "systemctl enable" command.

Change-Id: I590ac3a1b58a80e156967dd2787a1ba88e8a6fd5
2014-12-16 18:53:45 +02:00
Jenkins
9a53631e1c Merge "Fix rst rendering" 2014-12-16 13:51:59 +00:00
Gregory Haynes
c94880aa2f Fail helpfully if uuidgen is missing
If uuidgen is not installed we currently fail when performing tune2fs.

Change-Id: I4062eb1d62322c455dac5b83b856f454da211320
2014-12-15 15:42:35 -08:00
Chris Jones
f4a2eb6ef3 Continue past dependency ordering diffs.
We now guard against diff returning non-zero (which it does when it
discovers changes). This allows dib-lint runs to continue past the point
of displaying a dependency ordering nit.

Change-Id: Ib7801597400d6d87146181935922c8832baf5aaa
2014-12-12 18:36:55 +00:00
Monty Taylor
a281cca038 Add element for ubuntu-core
Ubuntu has recently release their "Snappy Ubuntu Core" which is a
minimal base-layer for running docker applications. Seems like the sort
of thing someone might want to use for tasks.

Change-Id: I6cb724451d1862121dee4ccf1f599ab8938f0b7f
2014-12-11 18:04:58 -08:00
Monty Taylor
cd3dfe7395 Add rax-nova-agent element
VMs on Rackspace Cloud need nova-agent installed to get networking
information set up properly. Add a nova-agent element so that dib can
be used to create images to use on Rackspace cloud.

Change-Id: I075a50e9a2d7ae7641905b66bbbc627ad708b5ea
2014-12-11 18:04:26 -08:00
Monty Taylor
af2862a2be Add minimal ubuntu and centos base elements
There are times when a much more stripped down base image is desired
over the distro cloud images. For instance, Infra would like some base
images that do not have cloud-init or really much of anything else. This
is easy to accomplish with debootstrap and rinse.

Change-Id: I44ff22457165afb048fdaea469210ae47d83dd3f
2014-12-11 13:27:36 -08:00
Jenkins
2dfb931d95 Merge "Use env python" 2014-12-11 21:26:03 +00:00
Monty Taylor
98d008c6af Rework package-installs to collapse on build host
Instead of doing the work in the image of parsing through the element's
package-install declarations, we can squash it on hostside, where we
have both YAML and JSON available to us, and then emit a single
pre-processed file into the target to be used later.

Change-Id: I3f182aa3aae0a79b2f3ea4e66c1878ad12878b0a
2014-12-11 00:05:32 -08:00
Adam Gandelman
441b30f89f Fallback to a boot_server kernel param if ip= not passed
Depending on bootloader and configuration, ramdisks may receive
a ip= kernel parameter that is used for manual network bring up
in the ramdisk.  This parameter contains the address of the boot
server.  In the absence of ip=, we want the ramdisk to DHCP and
proceed as normal.  However, in this case need to know the address
of the boot server.  This falls back to a 'boot_server' parameter
for this address if it is not provided via kernel cmdline.

Change-Id: Id1ed15ba125d91fa0a13d8e19d1385082ee5d9e9
Closes-bug: #1401289
Related-bug: #1401298
2014-12-10 15:36:15 -08:00
Jenkins
1273cd5532 Merge "Add some speedups to dpkg" 2014-12-10 19:45:34 +00:00
Monty Taylor
6be5c396d1 Add some speedups to dpkg
The docker build folks obsess about image size and speed a bit. Grab a
few of their optimizations from their debootstrap build process and
apply them to ours.

Change-Id: Ic3d3565423b0ae090896d99fd3bf1145eca6303d
2014-12-10 06:53:17 -08:00
Jenkins
1795682b6d Merge "Improve --ramdisk-element docs" 2014-12-10 05:44:58 +00:00
Jenkins
5de977e575 Merge "Migrate to new package-installs" 2014-12-10 05:44:45 +00:00
Jenkins
b74bb649e2 Merge "Allow injecting arbitrary yum repo configuration" 2014-12-09 18:56:08 +00:00
Ryan Brady
2fb72d6ed9 Deprecates username and password from boot time registration
The username and password combination is considered insecure to store in
the metadata passed to the stack as they can easily be obtained and
possibly used in an unathorized manner by logging into one of the
registration systems. The use of an activation key is more desirable
as it can only be used in conjunction with subscription-manager to
register a RHEL system.

This patch deprecates the username and password support from the script
that registers RHEL with either Satellite or RH Customer Portal during
boot-time.  This patch also adds a warning if the username and password
combination is used in the stack metadata. The documentation and examples
have also been updated to warn operators of the deprecation of username
and password.

This patch does not affect the username and password support for
registration activities while building images with diskimage-builder.

Change-Id: I05b7a18e910d31ad2273042409f8657ad9dee36a
2014-12-09 10:56:55 -05:00
Abel Lopez
fc862f460c Use env python
Change the shebang from /usr/bin/python to /usr/bin/env python
Some users, especially on older systems don't use the python
supplied with the OS. This has an impact with module loading if
the python in /usr/bin is 2.6, and user wants to use 2.7
in /usr/local/bin, for example

Change-Id: Ib31b369a94c33fb7508f0539c2b2f14177e507e0
2014-12-08 13:42:16 -08:00
Ryan Brady
386a7a01d3 Fix repo enablement for RHEL during registration
Previously the REG_REPOS value was a space delimited list of repo
names, but the spaces were incompatible with passing through json.
If you pass a list in json through the heat parameter, the output
is the string representation of a python list of unicode vaules.
This patch changes the rhel-registration scripts to process the
REG_REPOS value as a comma delimited list which is more easily
passed through json.  Both scripts have been updated to remain
consistent.

Change-Id: I21b3fd115e53aa3b0fa4af9bbfb1f08b6fe163ab
2014-12-04 21:52:16 -05:00
James Slagle
70880780f0 Allow injecting arbitrary yum repo configuration
Allows specifying the path to a yum repo configuration file to be used
during the image build process. The repo configuration file is removed
at the end of the build. This is useful in that it allows using any
arbitrary repo configuration during an image build.

Change-Id: I7d5c67d74a0bb4722ffc60aacfd9fa7e80fb59d5
2014-12-04 15:08:57 -05:00
Abel Lopez
acccfaf181 Don't use lsb_release
Using lsb_release to figure out what distro and release an image is
is redundant, as the same information is available in DIB_ vars.
Further, it causes errors when creating new rhel7/centos7 images
like this: http://paste.openstack.org/show/144729/

Change-Id: I213ee581b8abfe119ffe3b783e6a3236e58e3e47
2014-12-04 11:07:24 -08:00
Abel Lopez
563d334105 Fix rst rendering
The file extention claims rst format, but it's plain text
as such, the online documentation doesn't render properly

Change-Id: I24accb45ab8c7803a25f2642ce1b2d479d5a6e9c
2014-12-03 12:30:28 -08:00
Ryan Brady
bf8b77a8ea Add Activation Key Support For Customer Portal
This patch adds support to register with the hosted customer portal
using activation keys.  If an activation key is present in either
the REG_ACTIVATION_KEY or rh_registration.activation_key, it will
use that value instead of username and password credentials when
registering with Satellite or the hosted Customer Portal.  This
patch also enforces that an org must be set in either the REG_ORG
or rh_registration.org to use the activation key.

Change-Id: If40dd78ba793d508afb1a5ab345470ee5929afb0
2014-12-03 12:46:58 -05:00
Jenkins
f1c90ae72a Merge "Add element for hardware discovery ramdisk for ironic-discoverd" 2014-12-02 16:18:30 +00:00
Gregory Haynes
2626606980 Migrate to new package-installs
We have a new package-installs file format. Migrating existing
package-installs files to the new format.

Change-Id: I57d4a007efee9624e60c41357cefa627d8c7373f
2014-12-01 21:32:13 -08:00
Gregory Haynes
e5b8656141 Add new package-installs system
We currently support package-installs definitions which has some
limitations and oddities. This new format requires only one definition
which does not reside in our run-parts directories and follows a
consistent naming scheme (package-installs.yaml).

Change-Id: Ie51a7c4fdc15634ae8e069728e5e07cc1dc36095
2014-12-01 21:29:47 -08:00
Jenkins
ef8121141a Merge "Remove the grub2 install from redhat-common" 2014-12-02 02:54:48 +00:00
Jenkins
2d7885a984 Merge "Remove use of sudo from yum pre and post elements" 2014-12-01 17:26:22 +00:00
Ben Nemec
ff2a89215e Improve --ramdisk-element docs
Unlike most of the options to disk-image-create, this one didn't
document its default value, and it also didn't have any context for
why one might use it.

Change-Id: I57ea529cf387ab8ec8497d35be19ac64198df47a
Related-Bug: 1397073
2014-12-01 10:21:13 -06:00
Jenkins
407c824cbf Merge "disk-image-create: fix test when no argument is given." 2014-12-01 09:56:31 +00:00
Jenkins
c4ad904ee6 Merge "Unset requiretty if it exists in sudoers" 2014-11-28 19:13:42 +00:00
Monty Taylor
bec83686f4 Unset requiretty if it exists in sudoers
Fedora sets requiretty globally by default. This makes sense for
interactive machines with lots of password typing, but is pretty
attrocious for machines that might need users who remotely sudo to do
things. Just remove the setting.

Change-Id: Ic32bd92061a73f854683cc0d2d8919071dabe8cf
2014-11-28 11:35:00 -05:00
Monty Taylor
1b51e22f7d Remove the grub2 install from redhat-common
We immediately remove this, but the -grub2 causes a later attempt to
remove it again which fails. Don't install it in the first place.

Change-Id: I31d64abc9596707bdb8a0505d0dcbf7b82e1b82d
2014-11-28 11:01:40 -05:00
Monty Taylor
9cd5068854 Remove use of sudo from yum pre and post elements
sudo is not needed, since in-chroot elements are run in the context
of the root user. Furthermore, sudo in pre-install is problematic as
sudo may not have been installed yet (imagine a debootstrap build)

Change-Id: Ib5c7e176a90fe3b8fa9c3cd702d3d815df54f472
2014-11-28 11:01:40 -05:00
Dmitry Tantsur
13c6b6bdf1 Add element for hardware discovery ramdisk for ironic-discoverd
ironic-discoverd [1] is a StackForge project for conducting hardware properties
discovery via booting a special discovery ramdisk and interrogating hardware
from within it. It aims to be one of the official means of hardware properties
discovery for Ironic in Kilo release [2].

The ramdisk collects hardware information from the machine
it's booted on and posts it to the URL provided via
kernel argument 'discoverd_callback_url'.

[1] https://pypi.python.org/pypi/ironic-discoverd
[2] https://review.openstack.org/#/c/135605/

Co-Authored-By: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: Ic81fe8b3bd0884971bb522b48658c7ee538a31f2
2014-11-27 10:51:44 +01:00
Jenkins
83c97e8129 Merge "Allow multiple identical sources" 2014-11-27 03:41:54 +00:00
Jenkins
37ec06cd0b Merge "Warning when using pypi element without a mirror" 2014-11-26 05:27:50 +00:00
Jenkins
ccf95e7857 Merge "Update RHEL Registration" 2014-11-25 22:17:52 +00:00
Frederic Lepied
ccd7811dc0 disk-image-create: fix test when no argument is given.
Avoid a warning when multiple arguments are passed to disk-image-create
like:

bin/disk-image-create: 146: [: aa: unexpected operator

Change-Id: I619d7bf2e4b56885d629019b80b249bc80b8f43e
2014-11-25 22:28:01 +01:00
Jenkins
9fae41c898 Merge "Fail helpfully if no elements are specified" 2014-11-25 12:29:06 +00:00
Ghe Rivero
91977e7c8f Warning when using pypi element without a mirror
Using only a local filesystem mirror could lead opaque errors.
Print a warning message in this situations.

Change-Id: I5f77151ea928868f4c441e8a1bb2eb0966b21832
Closes-Bug: #1297948
2014-11-25 11:41:11 +01:00