Commit Graph

38 Commits

Author SHA1 Message Date
Dmitry Tantsur e446a5e6c4 Remove support for CoreOS images
Change-Id: Id9737067c678d4d01b20eae0b4a681c6cf9171a8
2019-08-28 19:46:37 +02:00
Arne Wiebalck e2bdb30662 Software RAID: Add mdadm to IPA images
With the addition of Software RAID we need 'mdadm' in our images.

Change-Id: I29a4ce98dbd456b104683a2202ba3115b966469d
2019-06-07 14:34:14 +02:00
Riccardo Pittau 4e086f9f0f Do not use metadata checksums with ext4
Remove metadata_csum option when creating filesystems
since cirros doesn't support it.
This option was added in Debian stretch and Ubuntu bionic
as default and it breaks compatibility with filesystems
created with older versions.

Change-Id: I6772e455f5d1ee7587c2dc43203b02e5e54cb714
2019-05-06 17:00:23 +02:00
Dmitry Tantsur ac4904ed96 Switch to Debian Stretch for building CoreOS images
It seems that Jessie is no longer supported, and its backports repo
is no longer available, hence all CoreOS jobs fail.

Also install setuptools into the environment explicitly, since some
dependencies fail to install without it.

Change-Id: I751522209d07caa26422a75b108f8c8baf782028
2019-04-17 15:18:51 +02:00
Pierre Riteau c6ea17d413 Add missing dependencies to CoreOS IPA docker image
The iptables and lshw utilities are both required for IPA: iptables is
used when collecting system logs and lshw is used to get the total
physical memory and system details. However, they were not installed in
the docker image embedded in CoreOS IPA images. Since the docker image
is used as a chroot to run IPA, it cannot access binaries available
outside in the main CoreOS file system.

Change-Id: Ic2188b49e717c62315db6c33b74b2e161436b052
Story: #2004092
Task: #27494
2018-10-16 11:51:43 +01:00
Julia Kreger aef703b879 Refuse secure erase if ATA command does not work
Adds dependency upon smartmontools's binary smartctl to
query the block devices via ATA mode which fails on pass-thru
buses such as ATA over SCSI and ATA over USB, in an effort
to prevent the initiation of ATA secure erase with one
of these interfaces in place which may render the disk
unreachable after security options are enabled for
ATA Secure Erase or upon the Secure Erase command being
sent to the Hard Disk.

Change-Id: I7635a197eb000650e919fac386b38ac15ef17041
Story: #2002546
Task: #22109
Depends-On: Ibbfd168844524d91927bdd6e67d973e0bd519bf2
2018-06-28 18:38:10 +00:00
Julia Kreger 3164053f08 Fix gate and bump CoreOS version to latest stable.
Increases the amount of ram for CoreOS IPA to 2GB
as the base CoreOS image is now 310MB.

Bumped CPU count for CoreOS runs to 2 CPUs as the
concurrency helps boot times for the CoreOS ramdisk.

Adds netbase, udev, and open-iscsi to debian jessie container
as they are no longer present in the default container.

Explicitly set path variable for execution in the debian
container as udevadm is in /sbin, and we may not have
/sbin on the path that is passed through to the
chroot.

Also fixed new pep8 test failures.

Story: #1600228
Task: #16287
Change-Id: I488445dfd261b7bca322a0be7b4d8ca6105750a3
2018-05-10 15:50:05 -07:00
Shivanand Tendulker c5bf7b088f Fix to return 'root_uuid' as part of command status
IPA does not return 'root_uuid' as part of command status when
provisioning of whole disk image is done using 'agent' deploy
interface from ironic. This commit fixes the issue.
Also updated Dockerfile to include package 'bsdmainutils' related
to 'hexdump' binary.

Change-Id: I89597fe4a704686fe31c064c3443fd8404a300e5
Partial-Bug: #1713916
2017-10-24 05:00:16 -04:00
Mathieu Mitchell a0ca6ce157 Enforce upper-constraints when building ramdisks
Currently, building ramdisks installs ironic-python-agent without any
upper-constraints. This causes the package to be installed with newer,
untested dependencies.

This commits introduces a tool to generate a local upper-constraints
file based on predefined strategies (below). Additionally, the fallback
to the openstack/requirements uses the URL defined in tox.ini instead of
redefining it. This prevents having to keep track of two separate
variables when releasing.

upper-constraints lookup strategies (in order):

  * UPPER_CONSTRAINTS_FILE points to a local file
  * UPPER_CONSTRAINTS_FILE points to a URL
  * /opt/stack/new/requirements/upper-constraints.txt
  * upper-constraints.txt from openstack/requirements git repository

Partial-bug: #1616554
Change-Id: Ib5c0c57cafdb6ffd7456e61f3b1bb5fa57520e5a
2016-08-26 09:06:24 -04:00
Jim Rollenhagen 4e35b0ee64 Use constraints for all the things
This configures tox to use upper-constraints for everything, except
environments used for post jobs (as constraints aren't supported there
yet).

This also doesn't enable constraints for our image builds, as it isn't
possible to pass an environment variable into the Dockerfile to allow
folks to choose their own constraints file (and we don't want to force
people to rely on git.o.o for building images).

Change-Id: I285855c6386f59e9dd352473aa28463109818c90
2016-05-19 10:08:56 -04:00
Jay Faulkner 407a91c369 Force container builds to use http.us.debian.org
httpredir has multiple mirrors behind it, meaning on any given build
we're relying on several mirrors to all stay up at the same time. This
happens much less often than we'd like.

By forcing this to http.us.debian.org, we're using a more curated set of
mirrors which are less likely to be flakey.

The long term fix is to use a debian mirror provided by infra for
check/gate builds, but until that exists this should help.

Depends-on: I5169faf25c36cfb494c9c1fafb14fb4f7f82cd9e
Related-bug: #1571829
Change-Id: Ia7ea8d909df9ae86a6dbd68ba94746b171535eb8
2016-04-20 17:20:08 +00:00
vsaienko 52066d0a49 Install qemu-image from backports repo
qemu-image has been installed from testing to fix issues when
qemu-img can't convert image:
qemu-img: error writing zeroes at sector 0: Invalid argument

The issue has been fixed in qemu 2.2.0-rc2, reference [0].

Which has been added to debian backports.

This patch fixes issue with building coreos image, when qemu-utils
can't be installed from testing due to dependency problems.

Reference:
[0] http://git.qemu-project.org/?p=qemu.git;a=commitdiff;h=f3a9cfddae
[1] https://bugs.launchpad.net/cinder/+bug/1389728

Change-Id: Ie62a88e1d012aba1392b19c18137529c4c3ebf31
Related-Bug: #1490086
Closes-bug: #1570090
Closes-Bug: #1569835
2016-04-13 22:01:55 +00:00
Nisha Agarwal b9368292c7 Add psmisc and dosfstools to IPA packages list
This commit adds the 'psmisc' and 'dosfstools'
packages for python-ironic-agent. 'psmisc' is required
by fuser command and dosfstools is required by
mkfs for vfat creation.

Partial-Bug: 1526289
Change-Id: I30bda5cd50c66d3a22ea611ad3ae7f43533d5770
2016-03-21 15:04:12 +00:00
John L. Villalovos 1ffaaf6abf Add support for proxy servers during image build
When building the docker image, the 'apt-get' and 'pip install' that are
run inside the docker image will fail in a an environment that uses
proxy servers.

Support environments with proxy servers by dynamically propagating
'http_proxy', 'https_proxy', and 'no_proxy' into the docker environment
when running 'apt-get' and 'pip install'

This can not be done with either --env-file or --env as those are
arguments to 'docker run'. The command being run here is 'docker build'

Once Docker 1.9 is widely deployed, we should switch to using the 'ARG'
command which was added in Docker 1.9. Currently Ubuntu 14.04 uses
Docker 1.6.  Using the ARG command will be a much cleaner solution.

Change-Id: Idd994cd58b9fb75bae13a43fc8363c36f113527d
Closes-Bug: #1533796
2016-02-04 14:27:49 -08:00
Jim Rollenhagen 7c85ed8041 Leave git installed in docker builder
Downstream agent builders that inherit from this Dockerfile will often
need git installed to be able to install hardware managers and such.
Removing git and reinstalling it can cause weird apt dependency issues
down the line, so leave it installed.

Change-Id: I8d5f35d0c8c6a231144a7b0a5b5c8f6d051ab0b1
2016-02-03 11:43:54 -08:00
Martin André 5f7bc48707 Reduce size of CoreOS ramdisk
By disabling pip cache, we're able to reduce the size of generated
docker image by 10%. The resulting ramdisk size goes from 229MB to
218MB.

It is possible to decrease the size even further by combining all the
RUN instructions into one but it doesn't provide a substantial gain and
it harms readability.

Change-Id: Ie23636fe709ab7c1bcf4d6c51299c173a5b642ac
2015-10-08 14:58:23 +09:00
Shivanand Tendulker 2d341c7f0d Fixes config drive creation failure in UEFI boot mode
This fix enables creation of config drive for UEFI only whole disk
images.
It will not work with the hybrid images that support booting in BIOS
and UEFI boot mode.

Change-Id: Ib4dd8c082a50e1dbaf0df91477b062716cb780ff
Closes-Bug: #1486887
Depends-On: I81400305f166d62aa4612aab54602abb8178b64c
2015-09-23 23:14:46 +00:00
Lucas Alvares Gomes f683a783af Install "dmidecode" and "ipmitool" by default
The get_memory() method relies on dmidecode to get the total amount of
RAM present in the node but, but by default dmidecode is not installed
in the image.

Same for get_bmc_address() and ipmitool.

This patch fixes both cases by installing the "dmidecode" and "ipmitool"
packages when generating the CoreOS image of IPA.

Closes-Bug: 1494367
Change-Id: Ibded7bd533d604cf21a3b60afd396dc7b8b8750b
2015-09-10 16:38:05 +01:00
Jacob McCann b0aaa53003 Update qemu-utils package from testing
Latest version of qemu-utils contains bugfix for qemu-img

Change-Id: I8033dacbc00e6e3a4dd7109050b21f1cc9988c93
Closes-Bug: 1490086
2015-08-31 14:32:48 +00:00
Jim Rollenhagen d71258b1ea Change Dockerfile to use Debian as a base
Ubuntu licensing does not allow for distributing derivatives of Ubuntu,
including containers based on Ubuntu. We currently publish a CoreOS PXE
image with an IPA container embedded. Basing this container on Ubuntu
appears to violate Ubuntu's license. Let's move to Debian to fix this.

Also remove the python3 purge as python3 doesn't exist in the Debian
base image.

Closes-Bug: #1475325
Change-Id: I051e3123f0cd1e66b5e3bae727559fe31467791b
2015-07-16 14:38:22 +00:00
Jacob McCann b4dea3eb41 Mark required packages before cleanup
Mark required packages before purging and autoremove'ing for cleanup.

* python-minimal - For /usr/bin/python
* python-setuptools - For required setuptools module

Change-Id: Ibe5cbe9090041db2d158cfccee82c66dcfe3fb2f
Closes-Bug: #1470199
2015-07-02 10:19:03 -05:00
Jim Rollenhagen 7d1c852bee Use latest pip in Docker build
Turns out we're using whatever Ubuntu ships, which could go badly. :)

Change-Id: I2d41a9036f84f2ebcab96a5137642a4225d2b053
2015-05-07 16:32:07 -07:00
Lucas Alvares Gomes d3aa7c93aa Add iscsi extension
This extension allows IPA to be used with the PXE/iSCSI methodology of
deployment in Ironic.

Change-Id: I32ec9fa74182c0d03c7ef1b698b1d0c0e3007773
2015-02-26 12:13:00 +00:00
Jay Faulkner 992c4b745d Prevent python 2.7 from being purged in container
Python 2.7 is being removed, somehow, despite python3 being specified.
This should fix the issue and make the container usable again.

Change-Id: Ida8aa7e527f8230cc893adf9192003340fc0dbf5
2014-07-31 15:11:04 -07:00
Jay Faulkner fee7ca28b4 Bump IPA container to use Trusty
Bump IPA container to use trusty. This gives us a newer version of pip
which is required to install newer requirements that are packaged as
wheels.

Only other change to dockerfile is to ensure python 3 is
removed, in order to avoid raising the size of the container. After this
patch, the agent image goes up in size 3M, which is managable.

Change-Id: I11f39fadb87d42dd15885e6afc63df2c927ce771
2014-07-30 15:48:19 -07:00
Jay Faulkner 965acb55ae Add two undeclared dependencies to the Dockerfile
While auditing our dependencies in antipiation of DIB elements being
created, I found these dependencies not being explicitly installed by
docker. We should explicitly install them even if we expect them to
exist in the base image.

Change-Id: I38ec7167ae24b9abbda08cbbbdd55205612b7288
2014-07-29 10:54:54 -07:00
Jay Faulkner 8e131e75e3 Fix invalid command in Dockerfile
This cleanup command was invalid. Not removing the apt lists adds a few
unneeded megabytes to the agent image.

Change-Id: I55ad4434d20a8984ea4cf5866360fd2622d811f4
2014-06-18 15:47:29 -07:00
Russell Haering dff46583d3 Add a HardwareManager method to erase devices
Add erase_devices method to the HardwareManager class. By default this
method iterates block devices, and calls a new abstract
erase_block_device method for each device. This patch includes a
simple implementation of erase_block_device on the
GenericHardwareManager which attempts to issue an ATA secure erase on
supported devices.

Change-Id: I81da065395b8785f636f1b0a0d60c9f1c045441e
2014-06-06 10:27:53 -07:00
Jay Faulkner 5ed7137871 Uninstall more buildtime only deps and clean lists
- Apt lists were not getting cleaned out, adding almost 100M of unneeded
  stuff to the final image.
- Also removed some unneeded post-build deps

Change-Id: I716aba65ae0e9153a64a359f431d6d8a6adfb4da
2014-05-05 11:09:01 -07:00
Jay Faulkner 89cbcbd0e3 Make docker image smaller by using Precise
Changing to precise means we don't have both python 3 and 2 installed in
the image, only python 2. Also do some cleanup at the end of the build
since we are exporting the final filesystem, and don't care about the
size of the intermediate layers.

Change-Id: Iac61d4a882aee19214de5dd74bbbaacc8b0f3414
2014-04-28 16:19:16 -07:00
Josh Gachnang 63fa74582d Renaming things in Dockerfile 2014-03-19 16:27:43 -07:00
Josh Gachnang 5914e36b30 Replacing teeth/overlord with ipa/ironic 2014-03-19 16:19:52 -07:00
Jim Rollenhagen 2c77d82204 Remove dependency on teeth-rest.
This commit:
- Removes all references to teeth-rest.
- Brings in encoding.py and errors.py from teeth-rest.
- Removes the "view" thing from the encoding module.
- Adds structlog as a dep. This was missing and overlooked
  because teeth-rest was installing it in the environment.
2014-03-17 10:58:39 -07:00
Jim Rollenhagen 016f8b77f9 fix dockerfile cmd 2014-01-23 11:14:16 -08:00
Jay Faulkner eb5773c4bf fix(Dockerfile): Use CMD instead of Entrypoint
- This allows the container to be started with a shell rather than only
  with the agent, which is helpful for troubleshooting
2014-01-23 09:40:36 -08:00
Jay Faulkner 3f4c93c0a2 fix(Dockerfile): Install requirements separately 2014-01-22 17:02:22 -08:00
Jay Faulkner 0d75f1007c fix(docker): git required to install from repo 2014-01-22 16:16:55 -08:00
Jay Faulkner 8a8d5d6691 add(Dockerfile): Add Dockerfile for building teeth-agent 2014-01-17 12:55:30 -08:00