Merge "Remove support for CoreOS images"

This commit is contained in:
Zuul 2019-09-09 08:32:59 +00:00 committed by Gerrit Code Review
commit 03713c5644
31 changed files with 20 additions and 2008 deletions

View File

@ -1,59 +0,0 @@
FROM debian:stretch
# The add is before the RUN to ensure we get the latest version of packages
# Docker will cache RUN commands, but because the SHA1 of the dir will be
# different it will not cache this layer
ADD . /tmp/ironic-python-agent
# Copy the proxy.sh script which copies the proxy settings from the host
# environment (if they are set). This file will be dynamically created by
# imagebuild/coreos/docker_build.bash
# TODO(jlvilla): Once Docker 1.9 is widely deployed, 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.
COPY proxy.sh /usr/bin/proxy.sh
# Ensure we hit a single mirror for builds, since httpredir is flakey
RUN sed -i 's/httpredir/http.us/g' /etc/apt/sources.list
# Install requirements: Python for ironic-python-agent, others for putting an
# image on disk
RUN proxy.sh apt-get update && \
proxy.sh apt-get -y upgrade && \
proxy.sh apt-get install -y --no-install-recommends netbase gdisk \
python2.7 python2.7-dev python-pip qemu-utils parted hdparm \
util-linux genisoimage git gcc bash coreutils tgt dmidecode \
ipmitool psmisc dosfstools bsdmainutils open-iscsi udev \
smartmontools iptables lshw mdadm
# Some cleanup
RUN proxy.sh apt-get -y autoremove && \
proxy.sh apt-get clean
# Before cleaning mark packages that are required so they are not removed
RUN apt-mark manual python-setuptools
RUN apt-mark manual python-minimal
# Install requirements separately, because pip understands a git+https url
# while setuptools doesn't
RUN proxy.sh pip install --upgrade pip setuptools
RUN proxy.sh pip install -c /tmp/ironic-python-agent/upper-constraints.txt --no-cache-dir -r /tmp/ironic-python-agent/requirements.txt
# This will succeed because all the dependencies were installed previously
RUN proxy.sh pip install -c /tmp/ironic-python-agent/upper-constraints.txt --no-cache-dir /tmp/ironic-python-agent
# Remove no longer needed packages
# NOTE(jroll) leave git to avoid strange apt issues in downstream Dockerfiles
# that may inherit from this one.
RUN proxy.sh apt-get -y purge gcc-4.6 gcc python2.7-dev && \
proxy.sh apt-get -y autoremove && \
proxy.sh apt-get clean
RUN rm -rf /tmp/ironic-python-agent
RUN rm -rf /var/lib/apt/lists/*
# Remove metadata_csum option when creating filesystems
# since cirros doesn't support it.
# This option was added in Debian stretch as default.
RUN sed -i 's/,metadata_csum//g' /etc/mke2fs.conf
CMD [ "/usr/local/bin/ironic-python-agent" ]

View File

@ -14,11 +14,6 @@ gettext [test]
# these are needed to build a deploy ramdisk # these are needed to build a deploy ramdisk
# NOTE apparmor is an undeclared dependency for docker on ubuntu,
# see https://github.com/docker/docker/issues/9745
apparmor [platform:dpkg imagebuild]
docker.io [platform:dpkg imagebuild]
docker-io [platform:rpm imagebuild]
gnupg [imagebuild] gnupg [imagebuild]
squashfs-tools [platform:dpkg platform:redhat imagebuild] squashfs-tools [platform:dpkg platform:redhat imagebuild]
squashfs [platform:suse imagebuild] squashfs [platform:suse imagebuild]

View File

@ -28,12 +28,10 @@ in rescue mode.
The below has information about supported images that may be built to use The below has information about supported images that may be built to use
rescue mode. rescue mode.
CoreOS DIB
------ ---
The CoreOS image supports rescue mode when used with DHCP tenant networks. You The DIB image supports rescue mode when used with DHCP tenant networks.
may follow the normal process for `building a CoreOS ironic-python-agent
image`_ to create an image that supports rescue mode.
After the ``finalize_rescue`` command completes, DHCP will be configured on all After the ``finalize_rescue`` command completes, DHCP will be configured on all
network interfaces, and a `rescue` user will be created with the specified network interfaces, and a `rescue` user will be created with the specified
@ -49,5 +47,4 @@ After the ``finalize_rescue`` command completes, DHCP will be configured on all
network interfaces, and a `rescue` user will be created with the specified network interfaces, and a `rescue` user will be created with the specified
``rescue_password``. ``rescue_password``.
.. _`building a CoreOS ironic-python-agent image`: https://opendev.org/openstack/ironic-python-agent/src/branch/master/imagebuild/coreos/README.rst
.. _`build a TinyIPA image`: https://opendev.org/openstack/ironic-python-agent-builder/src/branch/master/tinyipa/README.rst .. _`build a TinyIPA image`: https://opendev.org/openstack/ironic-python-agent-builder/src/branch/master/tinyipa/README.rst

View File

@ -13,16 +13,6 @@ the image. Below we will cover several ways to do this.
Access via ssh Access via ssh
-------------- --------------
CoreOS
~~~~~~
To enable the ``core`` user on pre-built or CoreOS images a ssh public key
will need to added. To do this you will need to:
- Add ``sshkey="ssh-rsa AAAA..."`` to pxe_append_params setting in ironic.conf
file
- Restart the ironic-conductor with the command
``service ironic-conductor restart``
- ``ssh core@<ip-address-of-node>``
diskimage-builder (DIB) diskimage-builder (DIB)
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
@ -72,43 +62,6 @@ Access via console
If you need to use console access, passwords must be enabled there are a If you need to use console access, passwords must be enabled there are a
couple ways to enable this depending on how the IPA image was created: couple ways to enable this depending on how the IPA image was created:
CoreOS
~~~~~~
CoreOS has support for auto login on the console [4]_. This can be enabled by:
- Adding ``coreos.autologin`` to pxe_append_params setting
in the ``ironic.conf`` file. See [4]_ for more information on using
autologin.
If you do not wish to enable auto login users can be added to CoreOS by editing
the cloud-config.yml file and adding the following [2]_::
users:
- name: username
passwd: $6$5s2u6/jR$un0AvWnqilcgaNB3Mkxd5... <example password hash>
groups:
- sudo
If using a pre-built image the cloud-config.yml must first be extracted::
mkdir tmp_folder
cd tmp_folder
zcat ../coreos_production_pxe_image-oem-stable-mitaka.cpio | cpio --extract --make-directories
To create a password hash the mkpasswd command can be used::
mkpasswd --method=SHA-512 --rounds=4096
After adding the user block with your favorite editor recompress the image::
find . | cpio --create --format='newc' |gzip -c -9 > ../coreos_production_pxe_image-oem-stable-mitaka.cpio.NEW.gz
An alternative to editing the embedded cloud-config.yml [4]_ file is to pass a
new one on the kernel command line by:
- adding ``cloud-config-url=http://example.com/cloud-config.yml``
to pxe_append_params setting in the ``ironic.conf`` file
diskimage-builder (DIB) diskimage-builder (DIB)
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
Users wishing to use password access can be add the dynamic-login [0]_ or the Users wishing to use password access can be add the dynamic-login [0]_ or the
@ -131,7 +84,7 @@ Example::
export DIB_DEV_USER_USERNAME=username export DIB_DEV_USER_USERNAME=username
export DIB_DEV_USER_PWDLESS_SUDO=yes export DIB_DEV_USER_PWDLESS_SUDO=yes
export DIB_DEV_USER_PASSWORD=PASSWORD export DIB_DEV_USER_PASSWORD=PASSWORD
disk-image-create -o /path/to/custom-ipa debian ironic-agent devuser ironic-python-agent-builder -o /path/to/custom-ipa -e devuser debian
tinyipa tinyipa
~~~~~~~ ~~~~~~~
@ -152,20 +105,6 @@ add ``ipa-debug=1`` to the kernel command line. To do this:
- Restart the ironic-conductor with the command - Restart the ironic-conductor with the command
``service ironic-conductor restart`` ``service ironic-conductor restart``
Another method is to edit the cloud-config.yml file. IPA's instructions on
building a custom image can be found at [3]_.
This essentially boils down to the following steps:
#. ``git clone https://opendev.org/openstack/ironic-python-agent``
#. ``cd ironic-python-agent``
#. ``pip install -r ./requirements.txt``
#. If not installed, please install the docker container engine. [5]_
#. ``cd imagebuild/coreos``
#. Edit ``oem/cloud-config.yml`` and add ``--debug`` to the end of the
ExecStart setting for the ironic-python-agent.service unit.
#. Execute ``make`` to complete the build process.
If the system is running and uses systemd then editing the services file If the system is running and uses systemd then editing the services file
will be required. will be required.
@ -183,14 +122,10 @@ Retrieving the IPA logs will differ depending on which base image was used.
- logs will be found in the /var/log/ folder. - logs will be found in the /var/log/ folder.
* Operating system that do use ``systemd`` (ie Fedora 22, CoreOS) * Operating system that do use ``systemd`` (ie Fedora, CentOS, RHEL)
- logs may be viewed with ``sudo journalctl -u ironic-python-agent`` - logs may be viewed with ``sudo journalctl -u ironic-python-agent``
.. note::
sudo is not required with the CoreOS images.
Manually restart IPA Manually restart IPA
==================== ====================
@ -208,7 +143,3 @@ References
========== ==========
.. [0] `Dynamic-login DIB element`: https://github.com/openstack/diskimage-builder/tree/master/diskimage_builder/elements/dynamic-login .. [0] `Dynamic-login DIB element`: https://github.com/openstack/diskimage-builder/tree/master/diskimage_builder/elements/dynamic-login
.. [1] `DevUser DIB element`: https://github.com/openstack/diskimage-builder/tree/master/diskimage_builder/elements/devuser .. [1] `DevUser DIB element`: https://github.com/openstack/diskimage-builder/tree/master/diskimage_builder/elements/devuser
.. [2] `Add User to CoreOS`: https://coreos.com/os/docs/latest/adding-users.html
.. [3] `IPA image build reference`: https://github.com/openstack/ironic-python-agent/tree/master/imagebuild/coreos/README.rst
.. [4] `Booting CoreOS via PXE`: https://coreos.com/os/docs/latest/booting-with-pxe.html
.. [5] `Install docker engine`: https://docs.docker.com/engine/installation/

View File

@ -8,46 +8,19 @@ Unlike most other python software, you must build an IPA ramdisk image before
use. This is because it's not installed in an operating system, but instead is use. This is because it's not installed in an operating system, but instead is
run from within a ramdisk. run from within a ramdisk.
CoreOS
------
One way to build a ramdisk image for IPA is with the CoreOS image [0]_.
Prebuilt copies of the CoreOS image, suitable for pxe, are available on
`tarballs.openstack.org <https://tarballs.openstack.org/ironic-python-agent/coreos/files/>`__.
Build process
~~~~~~~~~~~~~
On a high level, the build steps are as follows:
1) A docker build is performed using the ``Dockerfile`` in the root of the
ironic-python-agent project.
2) The resulting docker image is exported to a filesystem image.
3) The filesystem image, along with a cloud-config.yml [1]_, are embedded into
the CoreOS PXE image at /usr/share/oem/.
4) On boot, the ironic-python-agent filesystem image is extracted and run
inside a systemd-nspawn container. /usr/share/oem is mounted into this
container as /mnt.
Customizing the image
~~~~~~~~~~~~~~~~~~~~~
There are several methods you can use to customize the IPA ramdisk:
* Embed SSH keys by putting an authorized_keys file in /usr/share/oem/
* Add your own hardware managers by modifying the Dockerfile to install
additional python packages.
* Modify the cloud-config.yml [1]_ to perform additional tasks at boot time.
diskimage-builder diskimage-builder
----------------- -----------------
Another way to build a ramdisk image for IPA is by using diskimage-builder
[2]_. The ironic-agent diskimage-builder element builds the IPA ramdisk, which A production ready way to build a ramdisk image for IPA is by using
installs all the required packages and configures services as needed. ironic-python-agent-builder_. The ``ironic-python-agent-ramdisk``
diskimage-builder element builds the IPA ramdisk, which installs all the
required packages and configures services as needed.
tinyipa tinyipa
------- -------
Now, this method is provided Now this method is provided by ironic-python-agent-builder_
by `Ironic Python Agent Builder <https://opendev.org/openstack/ironic-python-agent-builder>`_ repository. It provides a set of scripts to build a
repo. It provides a set of scripts to build a
Tiny Core Linux-based deployment kernel and ramdisk (code name ``tinyipa``) Tiny Core Linux-based deployment kernel and ramdisk (code name ``tinyipa``)
under ``tinyipa`` folder. under ``tinyipa`` folder.
@ -74,15 +47,12 @@ packaged with IPA, pass it an initrd and kernel. e.g.::
./iso-image-create -o /path/to/output.iso -i /path/to/ipa.initrd -k /path/to/ipa.kernel ./iso-image-create -o /path/to/output.iso -i /path/to/ipa.initrd -k /path/to/ipa.kernel
This is a generic tool that can be used to combine any initrd and kernel into This is a generic tool that can be used to combine any initrd and kernel into
a suitable ISO for booting, and so should work against any IPA ramdisk created a suitable ISO for booting, and so should work against any IPA ramdisk.
-- both DIB and CoreOS.
IPA Flags IPA Flags
========= =========
You can pass a variety of flags to IPA on start up to change its behavior. You can pass a variety of flags to IPA on start up to change its behavior.
If you're using the CoreOS image, you can modify the
ironic-python-agent.service unit in cloud-config.yaml [3]_.
* ``--standalone``: This disables the initial lookup and heartbeats to Ironic. * ``--standalone``: This disables the initial lookup and heartbeats to Ironic.
Lookup sends some information to Ironic in order to determine Ironic's node Lookup sends some information to Ironic in order to determine Ironic's node
@ -186,13 +156,7 @@ Operators wishing to build their own hardware managers should reference
the documentation available at `Hardware Managers`_. the documentation available at `Hardware Managers`_.
.. _Hardware Managers: https://docs.openstack.org/ironic-python-agent/latest/contributor/hardware_managers.html .. _Hardware Managers: https://docs.openstack.org/ironic-python-agent/latest/contributor/hardware_managers.html
.. _ironic-python-agent-builder: https://docs.openstack.org/ironic-python-agent-builder
References
==========
.. [0] CoreOS PXE Images - https://coreos.com/docs/running-coreos/bare-metal/booting-with-pxe/
.. [1] CoreOS Cloud Init - https://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/
.. [2] DIB Element for IPA - https://docs.openstack.org/diskimage-builder/latest/elements/ironic-agent/README.html
.. [3] cloud-config.yaml - https://opendev.org/openstack/ironic-python-agent/src/branch/master/imagebuild/coreos/oem/cloud-config.yml
Indices and tables Indices and tables
================== ==================

View File

@ -1,28 +0,0 @@
BUILD_DIR=UPLOAD
KERNEL=$(BUILD_DIR)/coreos_production_pxe.vmlinuz
INITRD=$(BUILD_DIR)/coreos_production_pxe_image-oem.cpio.gz
default: docker coreos
docker:
./docker_build.bash
coreos:
mkdir -p $(BUILD_DIR)
./coreos-oem-inject.py oem $(BUILD_DIR)
clean:
rm -rf ironic-python-agent
rm -f oem/container.tar.gz
rm -f $(INITRD)
rm -f $(KERNEL)
rm -rf ../.image_cache
docker_clean:
./docker_clean.bash
iso: docker coreos
./iso-image-create -o $(BUILD_DIR)/ipa-coreos.iso -i $(INITRD) -k $(KERNEL)
pin_latest:
./pin_latest_coreos.sh

View File

@ -1,102 +0,0 @@
ironic-python-agent CoreOS Image builder.
=========================================
Builds a CoreOS image suitable for running the ironic-python-agent on a
server.
Requirements
============
Must be run from a linux machine with a working docker installation and
python-pip
Run the following locally or from a virtualenv to install the python
requirements
::
pip install -r requirements.txt
Booting the agent with this image
=================================
PXE
---
The image is typically booted via PXE. Here's an example ipxe
configuration (replace my-web-server with the IP/hostname of the http
server hosting your image):
::
#!ipxe
dhcp
kernel http://my-web-server/coreos_production_pxe.vmlinuz
initrd http://my-web-server/coreos_production_pxe_image-oem.cpio.gz
boot
You can either embed a configuration file into the image, or set
configuration options via the kernel command line. The only value most
people will need is:
- ``ipa-api-url=http://ironic-api-server:6385``
But any config value supported in the agent can be given to the agent
via the kernel command line, which allows the use of the same agent
image across environments because it contains no state.
Virtual Media
-------------
Openstack Ironic supports booting IPA via virtual media in the form of
an ISO image. Please see Ironic documentation for details on running in
this configuration.
Getting the agent
=================
Download
--------
If you don't want to build your own image, you can download a copy of
ironic-python-agent ramdisk and kernel, built using CoreOS, at:
https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe-master.vmlinuz
and
https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem-master.cpio.gz
"master" may be replaced with "stable-$branch" (e.g. "stable-mitaka") to
download an image built from the stable/$branch (e.g. stable/mitaka) version
of ironic-python-agent.
Build instructions
------------------
To create a docker repository and embed it into a CoreOS pxe image:
::
make
To just create the docker repository in oem/container.tar.gz:
::
make docker
To embed the oem/ directory into a CoreOS pxe image:
Note: In order to have the ability to ssh into the created image, you
need to pass ssh keys in via the kernel command line for CoreOS, or
create oem/authorized\_keys with the keys you need added before building
the image.
::
make coreos
To create a CoreOS ISO image to boot with virtual media:
::
make iso

View File

@ -1,28 +0,0 @@
#!/bin/bash -xe
#
# This builds a CoreOS IPA image, assuming dependencies are installed
#
# The system this runs on needs these binaries available, most of which
# are installed by default on Ubuntu Trusty:
# - docker
# - gzip / gunzip
# - uuidgen
# - cpio
# - find (gnu)
# - grep
# - gpg (to validate key of downloaded CoreOS image)
#
# Alternatively, run full_trusty_build.bash which will install
# all requirements then perform the build.
if [[ -x /usr/bin/docker.io ]]; then
sudo -E ln -sf /usr/bin/docker.io /usr/local/bin/docker
fi
sudo -E pip install -r requirements.txt
cd imagebuild/coreos
sudo -E make clean
sudo -E make
# Output of make is owned by root, so convert owner to user who started the script
me=`whoami`
sudo chown -R $me: UPLOAD

View File

@ -1,472 +0,0 @@
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import os
import shutil
import subprocess
import sys
import tempfile
import time
import requests
def get_coreos_version(version_file, key='COREOS_VERSION_ID'):
with open(version_file) as f:
for line in f:
if line.startswith("%s=" % key):
return line.strip().split("=")[1]
raise ValueError('Could not read CoreOS version number from file')
COREOS_VERSION_FILE = os.path.join(os.path.dirname(__file__), 'version.txt')
COREOS_VERSION = os.environ.get('COREOS_VERSION',
get_coreos_version(COREOS_VERSION_FILE))
COREOS_ARCH = "amd64-usr"
COREOS_BASE_URL = ("http://stable.release.core-os.net/{arch}/{ver}"
.format(arch=COREOS_ARCH, ver=COREOS_VERSION))
COREOS_PXE_DIGESTS = "coreos_production_pxe_image.cpio.gz.DIGESTS.asc"
COREOS_PXE_KERNEL = "coreos_production_pxe.vmlinuz"
COREOS_PXE_IMAGE = "coreos_production_pxe_image.cpio.gz"
COREOS_PXE_IMAGE_URL = "{url}/{img}".format(url=COREOS_BASE_URL,
img=COREOS_PXE_IMAGE)
COREOS_PXE_KERNEL_URL = "{url}/{kernel}".format(url=COREOS_BASE_URL,
kernel=COREOS_PXE_KERNEL)
COREOS_PXE_DIGESTS_URL = "{url}/{digests}".format(url=COREOS_BASE_URL,
digests=COREOS_PXE_DIGESTS)
def get_etag(cache_name):
etag_file = "{}.etag".format(cache_name)
if not os.path.exists(etag_file):
return None
with open(etag_file, 'rb') as fp:
etag = fp.read()
etag.strip()
return etag
def save_etag(cache_name, etag):
etag_file = "{}.etag".format(cache_name)
with open(etag_file, 'w+b') as fp:
fp.write(etag)
def cache_file(cache_name, remote_url):
print("{cname} <- {url}".format(cname=cache_name, url=remote_url))
etag = get_etag(cache_name)
headers = {}
if etag:
headers['If-None-Match'] = etag
start = time.time()
r = requests.get(remote_url, headers=headers)
if r.status_code == 304:
print("[etag-match]")
return
if r.status_code != 200:
raise RuntimeError('Failed to download {url}, got HTTP {code} Status '
'Code.'.format(url=remote_url, code=r.status_code))
with open(cache_name, 'w+b') as fp:
fp.write(r.content)
print("{length} bytes in {timespan} seconds"
.format(length=len(r.content), timespan=time.time() - start))
save_etag(cache_name, r.headers['etag'])
def inject_oem(archive, oem_dir, output_file):
d = tempfile.mkdtemp(prefix="oem-inject")
try:
dest_oem_dir = os.path.join(d, 'usr', 'share', 'oem')
cmd_chain = 'gunzip -c {} | cpio -iv'.format(archive)
execute(cmd_chain, shell=True, cwd=d)
shutil.copytree(oem_dir, dest_oem_dir)
cmd_chain = 'find . -depth -print | sort | cpio -o -H newc | ' \
'gzip > {}'.format(output_file)
execute(cmd_chain, shell=True, cwd=d)
finally:
shutil.rmtree(d)
return output_file
def validate_digests(digests, target, hash_type='sha1'):
cmd_chain = 'grep -i -A1 "^# {htype} HASH$" {digests} | grep {tgt} | ' \
'{htype}sum -c /dev/stdin'.format(htype=hash_type,
digests=digests,
tgt=os.path.basename(target))
execute(cmd_chain, shell=True, cwd=os.path.dirname(digests))
def main():
if len(sys.argv) != 3:
print("usage: {} [oem-directory-to-inject] [output-directory]"
.format(os.path.basename(__file__)))
return
oem_dir = os.path.abspath(os.path.expanduser(sys.argv[1]))
output_dir = os.path.abspath(os.path.expanduser(sys.argv[2]))
if not os.path.exists(oem_dir):
print("Error: {} doesn't exist.".format(oem_dir))
return
if not os.path.exists(os.path.join(oem_dir, 'cloud-config.yml')):
print("Error: {} is missing cloud-config.yml".format(oem_dir))
return
here = os.path.abspath(os.path.dirname(__file__))
top_cache_dir = os.path.join(os.path.dirname(here), ".image_cache")
cache_dir = os.path.join(top_cache_dir, COREOS_ARCH, COREOS_VERSION)
if not os.path.exists(cache_dir):
os.makedirs(cache_dir)
orig_cpio = os.path.join(cache_dir, COREOS_PXE_IMAGE)
digests = os.path.join(cache_dir, COREOS_PXE_DIGESTS)
kernel = os.path.join(cache_dir, COREOS_PXE_KERNEL)
cache_file(digests, COREOS_PXE_DIGESTS_URL)
gpg_verify_file(digests)
cache_file(kernel, COREOS_PXE_KERNEL_URL)
validate_digests(digests, kernel)
cache_file(orig_cpio, COREOS_PXE_IMAGE_URL)
validate_digests(digests, orig_cpio)
if not os.path.exists(output_dir):
os.makedirs(output_dir)
output_kernel = os.path.join(output_dir, os.path.basename(kernel))
output_cpio = os.path.join(
output_dir,
os.path.basename(orig_cpio).replace('.cpio.gz', '-oem.cpio.gz'))
inject_oem(orig_cpio, oem_dir, output_cpio)
shutil.copy(kernel, output_kernel)
def gpg_verify_file(ascfile):
d = tempfile.mkdtemp(prefix="oem-gpg-validate")
try:
tmpring = os.path.join(d, 'tmp.gpg')
key = os.path.join(d, 'coreos.key')
with open(key, 'w+b') as fp:
fp.write(GPG_KEY)
execute(['gpg', '--batch', '--no-default-keyring',
'--keyring', tmpring, '--import', key])
execute(['gpg', '--batch', '--no-default-keyring',
'--keyring', tmpring, '--verify', ascfile])
finally:
shutil.rmtree(d)
def execute(cmd, shell=False, cwd=None):
popen_obj = subprocess.Popen(cmd, shell=shell, cwd=cwd)
popen_obj.communicate()
if popen_obj.returncode != 0:
raise subprocess.CalledProcessError(returncode=popen_obj.returncode,
cmd=cmd)
GPG_KEY = """-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFIqVhQBEADjC7oxg5N9Xqmqqrac70EHITgjEXZfGm7Q50fuQlqDoeNWY+sN
szpw//dWz8lxvPAqUlTSeR+dl7nwdpG2yJSBY6pXnXFF9sdHoFAUI0uy1Pp6VU9b
/9uMzZo+BBaIfojwHCa91JcX3FwLly5sPmNAjgiTeYoFmeb7vmV9ZMjoda1B8k4e
8E0oVPgdDqCguBEP80NuosAONTib3fZ8ERmRw4HIwc9xjFDzyPpvyc25liyPKr57
UDoDbO/DwhrrKGZP11JZHUn4mIAO7pniZYj/IC47aXEEuZNn95zACGMYqfn8A9+K
mHIHwr4ifS+k8UmQ2ly+HX+NfKJLTIUBcQY+7w6C5CHrVBImVHzHTYLvKWGH3pmB
zn8cCTgwW7mJ8bzQezt1MozCB1CYKv/SelvxisIQqyxqYB9q41g9x3hkePDRlh1s
5ycvN0axEpSgxg10bLJdkhE+CfYkuANAyjQzAksFRa1ZlMQ5I+VVpXEECTVpLyLt
QQH87vtZS5xFaHUQnArXtZFu1WC0gZvMkNkJofv3GowNfanZb8iNtNFE8r1+GjL7
a9NhaD8She0z2xQ4eZm8+Mtpz9ap/F7RLa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prepares and outputs a tarball'd docker repository
# suitable for injection into a coreos pxe image
#
set -e
OUTPUT_FILE="oem/container.tar.gz"
IPA_ROOT=$(readlink -f $(dirname $0)/../../)
# If there's already a container.tar.gz, don't overwrite it -- instead, bail
if [[ -e "${OUTPUT_FILE}" ]]; then
echo "${OUTPUT_FILE} already exists. Will not overwrite. Exiting."
exit 1
fi
# Build the docker image
# Everything from ${IPA_ROOT} will be available under /tmp/ironic-python-agent in Docker
cd ${IPA_ROOT}
imagebuild/common/generate_upper_constraints.sh ${IPA_ROOT}/upper-constraints.txt
# TODO(jlvilla): Once Docker 1.9 is widely deployed, 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.
mv proxy.sh .proxy.sh.save || true
# Create a temporary proxy.sh script, that will be used by the Dockerfile.
# Since we are calling 'docker build' we can not use --env-file/--env as those
# are arguments to 'docker run'
echo '#!/bin/sh' > proxy.sh
echo 'echo Running: $*' >> proxy.sh
echo "http_proxy=${http_proxy:-} https_proxy=${https_proxy:-} no_proxy=${no_proxy:-} "'$*' >> proxy.sh
chmod 0755 proxy.sh
docker build -t oemdocker .
# Restore saved copy
mv .proxy.sh.save proxy.sh || true
cd -
# Create a UUID to identify the build
CONTAINER_UUID=`uuidgen`
# Export the oemdocker repository to a tarball so it can be embedded in CoreOS
# TODO: Investigate running a container and using "export" to flatten the
# image to shrink the CoreOS fs size. This will also require run.sh to
# use docker import instead of docker load as well.
docker run oemdocker echo $CONTAINER_UUID
CONTAINER=`docker ps -a --no-trunc |grep $CONTAINER_UUID|awk '{print $1}'|head -n1`
echo $CONTAINER
docker export $CONTAINER | gzip > ${OUTPUT_FILE}

View File

@ -1,16 +0,0 @@
#!/bin/bash
#
# Cleans up docker images and containers
containers=$(docker ps -a -q)
images=$(docker images -q)
# All the docker commands followed by || true because occasionally docker
# will fail to remove an image or container, & I want make to keep going anyway
if [[ ! -z "$containers" ]]; then
docker rm $containers || true
fi
if [[ ! -z "$images" ]]; then
docker rmi $images || true
fi

View File

@ -1,55 +0,0 @@
#!/bin/bash -xe
#
# From a base-trusty node, this should build a CoreOS IPA image
# suitable for use in testing or production.
#
BRANCH_PATH=${BRANCH_PATH:-master}
# NOTE(lucasagomes): List of dependencies for Red Hat systems
REDHAT_PACKAGES="docker-io gpg"
if [ -x "/usr/bin/apt-get" ]; then
sudo -E apt-get update
# apparmor is an undeclared dependency for docker on ubuntu
# https://github.com/docker/docker/issues/9745
sudo -E apt-get install -y docker.io apparmor cgroup-lite
elif [ -x "/usr/bin/dnf" ]; then
sudo -E dnf install -y $REDHAT_PACKAGES
elif [ -x "/usr/bin/yum" ]; then
sudo -E yum install -y $REDHAT_PACKAGES
else
echo "No supported package manager installed on system. Supported: apt, yum, dnf"
exit 1
fi
imagebuild/coreos/build_coreos_image.sh
BUILD_DIR=imagebuild/coreos/UPLOAD
if [ "$BRANCH_PATH" != "master" ]; then
# add the branch name
mv $BUILD_DIR/coreos_production_pxe_image-oem.cpio.gz $BUILD_DIR/coreos_production_pxe_image-oem-$BRANCH_PATH.cpio.gz
mv $BUILD_DIR/coreos_production_pxe.vmlinuz $BUILD_DIR/coreos_production_pxe-$BRANCH_PATH.vmlinuz
else
# in the past, we published master without branch name
# copy the files in this case such that both are published
cp $BUILD_DIR/coreos_production_pxe_image-oem.cpio.gz $BUILD_DIR/coreos_production_pxe_image-oem-$BRANCH_PATH.cpio.gz
cp $BUILD_DIR/coreos_production_pxe.vmlinuz $BUILD_DIR/coreos_production_pxe-$BRANCH_PATH.vmlinuz
fi
# Generate checksum files
pushd $BUILD_DIR > /dev/null
for x in *.vmlinuz *.cpio.gz; do
sha256sum $x > $x.sha256
done
popd > /dev/null
tar czf ipa-coreos-$BRANCH_PATH.tar.gz $BUILD_DIR/coreos_production_pxe_image-oem-$BRANCH_PATH.cpio.gz $BUILD_DIR/coreos_production_pxe-$BRANCH_PATH.vmlinuz
if [ "$BRANCH_PATH" = "master" ]; then
# again, publish with and without the branch on master for historical reasons
cp ipa-coreos-$BRANCH_PATH.tar.gz ipa-coreos.tar.gz
fi
# Generate checksum files
for x in *.tar.gz; do
sha256sum $x > $x.sha256
done

View File

@ -1,168 +0,0 @@
#!/bin/bash
#
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# This script generates iso image from the given kernel and ramdisk
SCRIPTNAME=`basename $0`
TMP_BUILD_DIR="/tmp/$SCRIPTNAME.$$"
QEMU_IMG="/usr/bin/qemu-img"
MKISOFS="/usr/bin/mkisofs"
function show_options() {
echo "Usage: ${SCRIPTNAME} [options]"
echo
echo "Options:"
echo " -o output filename "
echo " -i initrd "
echo " -k kernel "
}
function cleanup() {
v_print "Cleaning up.."
rm -rf $TMP_BUILD_DIR
}
function err_print() {
echo "ERROR: $@" 1>&2;
}
function v_print() {
echo "$*"
}
# Parse command line options
ARGS=`getopt -o "o:i:k:" -l "output,initrd,kernel:" \
-n "$SCRIPTNAME" -- "$@"`
if [ $? -ne 0 ];
then
exit 1
fi
eval set -- "$ARGS"
while true ; do
case "$1" in
-o) OUTPUT_FILENAME=$2; shift 2 ;;
-i) INITRD=$2; shift 2 ;;
-k) KERNEL=$2; shift 2 ;;
# *) show_options ; exit 1 ;;
--) shift; break ;;
esac
done
# Verify whether kernel, initrd, and the image file is present
if [ -z "$OUTPUT_FILENAME" ]; then
err_print "Output filename not provided."
show_options
exit 1
fi
if [ -z "$INITRD" ]; then
err_print "Initrd not provided."
show_options
exit 1
fi
if [ -z "$KERNEL" ]; then
err_print "Kernel not provided."
show_options
exit 1
fi
# Create a temporary build directory for holiding the contents of iso
TMP_IMAGE_DIR="$TMP_BUILD_DIR/image"
v_print "Creating temporary directory $TMP_IMAGE_DIR"
mkdir -p "$TMP_IMAGE_DIR"
# Copy isolinux bin to the isolinux directory
mkdir -p "$TMP_IMAGE_DIR/isolinux"
v_print "Copying isolinux.bin"
if [ -f /usr/share/syslinux/isolinux.bin ]
then
cp /usr/share/syslinux/isolinux.bin "$TMP_IMAGE_DIR/isolinux"
elif [ -f /usr/lib/syslinux/isolinux.bin ]
then
cp /usr/lib/syslinux/isolinux.bin "$TMP_IMAGE_DIR/isolinux"
elif [ -f /usr/lib/ISOLINUX/isolinux.bin ]
then
cp /usr/lib/ISOLINUX/isolinux.bin "$TMP_IMAGE_DIR/isolinux"
else
err_print "Could not find isolinux.bin. Install syslinux or isolinux?"
cleanup
exit 1
fi
# Copy ldlinux.c32 to the isolinux directory
v_print "Copying ldlinux.c32"
if [ -f /usr/share/syslinux/ldlinux.c32 ]
then
cp /usr/share/syslinux/ldlinux.c32 "$TMP_IMAGE_DIR/isolinux"
elif [ -f /usr/lib/syslinux/modules/bios/ldlinux.c32 ]
then
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 "$TMP_IMAGE_DIR/isolinux"
fi
# Copy initrd, kernel
v_print "Copying kernel to $TMP_IMAGE_DIR/vmlinuz"
cp $KERNEL "$TMP_IMAGE_DIR/vmlinuz"
if [ $? -ne 0 ]; then
err_print "Failed to copy $KERNEL to $TMP_IMAGE_DIR"
cleanup
exit 1
fi
v_print "Copying initrd to $TMP_IMAGE_DIR/initrd"
cp $INITRD "$TMP_IMAGE_DIR/initrd"
if [ $? -ne 0 ]; then
err_print "Failed to copy $INITRD to $TMP_IMAGE_DIR"
cleanup
exit 1
fi
# Generate isolinux.cfg for default booting
v_print "Generating isolinux.cfg"
echo "\
DEFAULT install
LABEL install
menu label "Install image"
kernel /vmlinuz
append initrd=/initrd boot_method=vmedia --
TIMEOUT 5
PROMPT 0 " > "$TMP_IMAGE_DIR/isolinux/isolinux.cfg"
# Convert relative path output filename to absolute path
echo $OUTPUT_FILENAME | grep -q '^/'
if [ $? -ne 0 ]; then
OUTPUT_FILENAME="$PWD/$OUTPUT_FILENAME"
fi
# Create the ISO
v_print "Generating the ISO"
cd $TMP_IMAGE_DIR && $MKISOFS -r -V "INSTALL_IMAGE" -cache-inodes -J -l -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -o $OUTPUT_FILENAME .
# Cleanup
cleanup

View File

@ -1,265 +0,0 @@
#cloud-config
coreos:
units:
- name: user-configdrive.service
mask: true
- name: user-configvirtfs.service
mask: true
- name: user-configdrive.path
mask: true
- name: media-configdrive.mount
mask: true
- name: media-configvirtfs.mount
mask: true
- name: update-engine.service
mask: true
- name: update-engine-stub.service
mask: true
- name: resize-btrfs.service
mask: true
- name: locksmithd.service
mask: true
- name: fleet.service
mask: true
- name: etcd.service
mask: true
- name: usr-share-oem.mount
mask: true
- name: ironic-python-agent-embed-ssh-keys.service
command: start
content: |
[Unit]
Description=Migrate embedded SSH keys into core user
ConditionFileNotEmpty=/usr/share/oem/authorized_keys
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/update-ssh-keys -a oem /usr/share/oem/authorized_keys
- name: ironic-python-agent-container-creation.service
command: start
content: |
[Unit]
Description=Untar Provided IPA Container
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/mkdir -p /opt/ironic-python-agent
ExecStart=/usr/bin/tar -x --no-xattrs \
-C /opt/ironic-python-agent \
-f /usr/share/oem/container.tar.gz
- name: opt-ironic\x2dpython\x2dagent-proc.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/proc
Where=/opt/ironic-python-agent/proc
Type=none
Options=bind
- name: opt-ironic\x2dpython\x2dagent-dev.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/dev
Where=/opt/ironic-python-agent/dev
Type=none
Options=bind
- name: opt-ironic\x2dpython\x2dagent-dev-pts.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/dev/pts
Where=/opt/ironic-python-agent/dev/pts
Type=none
Options=bind
- name: opt-ironic\x2dpython\x2dagent-sys.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/sys
Where=/opt/ironic-python-agent/sys
Type=none
Options=bind
- name: opt-ironic\x2dpython\x2dagent-run.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/run
Where=/opt/ironic-python-agent/run
Type=none
Options=bind
- name: opt-ironic\x2dpython\x2dagent-mnt.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/usr/share/oem
Where=/opt/ironic-python-agent/mnt
Type=none
Options=bind
- name: opt-ironic\x2dpython\x2dagent-etc-resolvconf.service
command: start
content: |
[Unit]
Description="Provide host resolv.conf to chroot"
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/ln -f /etc/resolv.conf /opt/ironic-python-agent/etc/resolv.conf
- name: opt-ironic\x2dpython\x2dagent-run-log.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Mount]
What=/run/log
Where=/opt/ironic-python-agent/run/log
Type=none
Options=bind
- name: setup-rescue-directories.service
command: start
content: |
[Unit]
Description=Create directories for rescue mode configuration
After=ironic-python-agent-container-creation.service
Requires=ironic-python-agent-container-creation.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/mkdir /etc/ipa-rescue-config
ExecStart=/usr/bin/mkdir /opt/ironic-python-agent/etc/ipa-rescue-config
- name: opt-ironic\x2dpython\x2dagent-etc-ipa\x2drescue\x2dconfig.mount
command: start
content: |
[Unit]
DefaultDependencies=no
Conflicts=umount.target
Before=umount.target
After=ironic-python-agent-container-creation.service
After=setup-rescue-directories.service
Requires=ironic-python-agent-container-creation.service
Requires=setup-rescue-directories.service
[Mount]
What=/etc/ipa-rescue-config
Where=/opt/ironic-python-agent/etc/ipa-rescue-config
Type=none
Options=bind
- name: ironic-python-agent.service
command: start
content: |
[Unit]
Description=Ironic Python Agent
After=ironic-python-agent-container-creation.service
After=opt-ironic\x2dpython\x2dagent-proc.mount
After=opt-ironic\x2dpython\x2dagent-dev.mount
After=opt-ironic\x2dpython\x2dagent-dev-pts.mount
After=opt-ironic\x2dpython\x2dagent-sys.mount
After=opt-ironic\x2dpython\x2dagent-run.mount
After=opt-ironic\x2dpython\x2dagent-mnt.mount
After=opt-ironic\x2dpython\x2dagent-etc-resolvconf.service
After=opt-ironic\x2dpython\x2dagent-run-log.mount
After=setup-rescue-directories.service
After=opt-ironic\x2dpython\x2dagent-etc-ipa\x2drescue\x2dconfig.mount
Requires=ironic-python-agent-container-creation.service
Requires=opt-ironic\x2dpython\x2dagent-proc.mount
Requires=opt-ironic\x2dpython\x2dagent-dev.mount
Requires=opt-ironic\x2dpython\x2dagent-dev-pts.mount
Requires=opt-ironic\x2dpython\x2dagent-sys.mount
Requires=opt-ironic\x2dpython\x2dagent-run.mount
Requires=opt-ironic\x2dpython\x2dagent-mnt.mount
Requires=opt-ironic\x2dpython\x2dagent-etc-resolvconf.service
Requires=opt-ironic\x2dpython\x2dagent-run-log.mount
Requires=setup-rescue-directories.service
Requires=opt-ironic\x2dpython\x2dagent-etc-ipa\x2drescue\x2dconfig.mount
[Service]
ExecStartPre=-/usr/sbin/modprobe ipmi_msghandler
ExecStartPre=-/usr/sbin/modprobe ipmi_devintf
ExecStartPre=-/usr/sbin/modprobe ipmi_si
ExecStart=/usr/bin/chroot /opt/ironic-python-agent \
env PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH \
/usr/local/bin/ironic-python-agent
ExecStopPost=/usr/share/oem/finalize_rescue.sh
Restart=on-failure
RestartSec=30s

View File

@ -1,37 +0,0 @@
#!/bin/bash
create_rescue_user() {
echo "Adding rescue user with root privileges..."
crypted_pass=$(</etc/ipa-rescue-config/ipa-rescue-password)
sudo useradd -m rescue -G sudo -p $crypted_pass
sudo echo "rescue ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/rescue
}
setup_dhcp_network() {
DHCP_CONFIG_TEMPLATE=/usr/share/oem/rescue-dhcp-config.network
echo "Configuring DHCP networks on all interfaces..."
echo "Removing all existing network configuration..."
sudo rm /etc/systemd/network/*
echo "Configuring all interfaces except loopback to DHCP..."
for interface in $(ls /sys/class/net) ; do
if [ $interface != "lo" ]; then
sudo sed "s/RESCUE_NETWORK_INTERFACE/$interface/" $DHCP_CONFIG_TEMPLATE > /etc/systemd/network/50-$interface.network || true
fi
done
sudo systemctl restart systemd-networkd
}
echo "Attempting to start rescue mode configuration..."
if [ -f /etc/ipa-rescue-config/ipa-rescue-password ]; then
# NOTE(mariojv) An exit code of 0 is always forced here to avoid making IPA
# restart after something fails. IPA should not restart when this script
# executes to avoid exposing its API to a tenant network.
create_rescue_user || exit 0
setup_dhcp_network || exit 0
# TODO(mariojv) Add support for configdrive and static networks
else
echo "One or more of the files needed for rescue mode does not exist, not rescuing."
fi

View File

@ -1,5 +0,0 @@
[Match]
Name=RESCUE_NETWORK_INTERFACE
[Network]
DHCP=yes

View File

@ -1,11 +0,0 @@
#!/bin/bash -xe
HERE=$(dirname $0)
CHANNEL="stable"
ARCH="amd64-usr"
VERSION="current"
URL="https://${CHANNEL}.release.core-os.net/${ARCH}/${VERSION}/version.txt"
wget $URL -O "${HERE}/version.txt"

View File

@ -1,7 +0,0 @@
COREOS_BUILD=1688
COREOS_BRANCH=5
COREOS_PATCH=3
COREOS_VERSION=1688.5.3
COREOS_VERSION_ID=1688.5.3
COREOS_BUILD_ID="2018-04-03-0540"
COREOS_SDK_VERSION=1688.5.2

View File

@ -48,11 +48,6 @@
make clean make clean
popd popd
;; ;;
coreos)
imagebuild/coreos/full_trusty_build.sh
mv imagebuild/coreos/UPLOAD/coreos_production_pxe* UPLOAD_RAW
mv ipa-coreos*.tar.gz* UPLOAD_TAR
;;
dib) dib)
NAME=ipa-{{ image_distro }}-$BRANCH_PATH NAME=ipa-{{ image_distro }}-$BRANCH_PATH
ironic-python-agent-builder -e dhcp-all-interfaces -o $NAME {{ image_distro }} ironic-python-agent-builder -e dhcp-all-interfaces -o $NAME {{ image_distro }}

View File

@ -1,15 +0,0 @@
- hosts: primary
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,111 +0,0 @@
- hosts: all
name: Autoconverted job legacy-tempest-dsvm-ironic-ipa-partition-bios-agent_ipmitool-coreos-src
from old job gate-tempest-dsvm-ironic-ipa-partition-bios-agent_ipmitool-coreos-src-ubuntu-xenial
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
https://opendev.org \
openstack/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
# NOTE(TheJulia): The CoreOS ramdisk is generally slow to startup,
# on the order of 300-500 seconds.
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1800
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_ENGINE=auto"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_CPU=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=2048"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=coreos"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-vars-early
# use tempest plugin
export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
export TEMPEST_CONCURRENCY=1
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PROJECTS="openstack/ironic $PROJECTS"
export PROJECTS="openstack/ironic-lib $PROJECTS"
export PROJECTS="openstack/ironic-python-agent $PROJECTS"
export PROJECTS="openstack/ironic-tempest-plugin $PROJECTS"
export PROJECTS="openstack/python-ironicclient $PROJECTS"
export PROJECTS="openstack/virtualbmc $PROJECTS"
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_IRONIC=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_VIRT_DRIVER=ironic
export DEVSTACK_GATE_CONFIGDRIVE=1
export DEVSTACK_GATE_IRONIC_DRIVER=ipmi
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEFAULT_DEPLOY_INTERFACE=direct"
# direct deploy requires Swift temporary URLs
export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_ENABLE_TEMPURLS=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_TEMPURL_KEY=secretkey"
if [[ ! "stable/newton stable/ocata stable/pike" =~ $ZUUL_BRANCH ]] ; then
export DEVSTACK_GATE_TLSPROXY=1
fi
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_TEMPEST_WHOLE_DISK_IMAGE=False"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=1"
export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=1
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_BUILD_RAMDISK=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"USE_SUBNETPOOL=False"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"LIBVIRT_NIC_DRIVER=e1000"
# Ensure the ironic-vars-EARLY file exists
touch ironic-vars-early
# Pull in the EARLY variables injected by the optional builders
source ironic-vars-early
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic https://opendev.org/openstack/ironic"
# Ensure the ironic-EXTRA-vars file exists
touch ironic-extra-vars
# Pull in the EXTRA variables injected by the optional builders
source ironic-extra-vars
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,15 +0,0 @@
- hosts: primary
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,108 +0,0 @@
- hosts: all
name: Autoconverted job legacy-tempest-dsvm-ironic-ipa-partition-bios-pxe_ipmitool-coreos-src
from old job gate-tempest-dsvm-ironic-ipa-partition-bios-pxe_ipmitool-coreos-src-ubuntu-xenial
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
https://opendev.org \
openstack/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
# NOTE(TheJulia): The CoreOS ramdisk is generally slow to startup,
# on the order of 300-500 seconds.
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1800
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_ENGINE=auto"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_CPU=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=2048"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=coreos"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-vars-early
# use tempest plugin
export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
export TEMPEST_CONCURRENCY=1
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PROJECTS="openstack/ironic $PROJECTS"
export PROJECTS="openstack/ironic-lib $PROJECTS"
export PROJECTS="openstack/ironic-python-agent $PROJECTS"
export PROJECTS="openstack/ironic-tempest-plugin $PROJECTS"
export PROJECTS="openstack/python-ironicclient $PROJECTS"
export PROJECTS="openstack/virtualbmc $PROJECTS"
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_IRONIC=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_VIRT_DRIVER=ironic
export DEVSTACK_GATE_CONFIGDRIVE=1
export DEVSTACK_GATE_IRONIC_DRIVER=ipmi
if [[ ! "stable/newton stable/ocata stable/pike" =~ $ZUUL_BRANCH ]] ; then
export DEVSTACK_GATE_TLSPROXY=1
fi
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_TEMPEST_WHOLE_DISK_IMAGE=False"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=1"
export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=1
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_BUILD_RAMDISK=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"USE_SUBNETPOOL=False"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"LIBVIRT_NIC_DRIVER=e1000"
# Ensure the ironic-vars-EARLY file exists
touch ironic-vars-early
# Pull in the EARLY variables injected by the optional builders
source ironic-vars-early
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic https://opendev.org/openstack/ironic"
# Ensure the ironic-EXTRA-vars file exists
touch ironic-extra-vars
# Pull in the EXTRA variables injected by the optional builders
source ironic-extra-vars
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,15 +0,0 @@
- hosts: primary
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,112 +0,0 @@
- hosts: all
name: Autoconverted job legacy-tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-coreos-src
from old job gate-tempest-dsvm-ironic-ipa-wholedisk-bios-agent_ipmitool-coreos-src-ubuntu-xenial
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
https://opendev.org \
openstack/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
# NOTE(TheJulia): The CoreOS ramdisk is generally slow to startup,
# on the order of 300-500 seconds.
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1800
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_ENGINE=auto"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_CPU=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=2048"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=coreos"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-vars-early
# use tempest plugin
export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
export TEMPEST_CONCURRENCY=1
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PROJECTS="openstack/ironic $PROJECTS"
export PROJECTS="openstack/ironic-lib $PROJECTS"
export PROJECTS="openstack/ironic-python-agent $PROJECTS"
export PROJECTS="openstack/ironic-tempest-plugin $PROJECTS"
export PROJECTS="openstack/python-ironicclient $PROJECTS"
export PROJECTS="openstack/virtualbmc $PROJECTS"
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_IRONIC=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_VIRT_DRIVER=ironic
export DEVSTACK_GATE_CONFIGDRIVE=1
export DEVSTACK_GATE_IRONIC_DRIVER=ipmi
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_DEFAULT_DEPLOY_INTERFACE=direct"
# direct deploy requires Swift temporary URLs
export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_ENABLE_TEMPURLS=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"SWIFT_TEMPURL_KEY=secretkey"
if [[ ! "stable/newton stable/ocata stable/pike" =~ $ZUUL_BRANCH ]] ; then
export DEVSTACK_GATE_TLSPROXY=1
fi
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_TEMPEST_WHOLE_DISK_IMAGE=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=0"
export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=1
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_BUILD_RAMDISK=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"USE_SUBNETPOOL=False"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"LIBVIRT_NIC_DRIVER=e1000"
# Ensure the ironic-vars-EARLY file exists
touch ironic-vars-early
# Pull in the EARLY variables injected by the optional builders
source ironic-vars-early
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic https://opendev.org/openstack/ironic"
# Ensure the ironic-EXTRA-vars file exists
touch ironic-extra-vars
# Pull in the EXTRA variables injected by the optional builders
source ironic-extra-vars
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,15 +0,0 @@
- hosts: primary
tasks:
- name: Copy files from {{ ansible_user_dir }}/workspace/ on node
synchronize:
src: '{{ ansible_user_dir }}/workspace/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/logs/**
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,108 +0,0 @@
- hosts: all
name: Autoconverted job legacy-tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_ipmitool-coreos-src
from old job gate-tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_ipmitool-coreos-src-ubuntu-xenial
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
https://opendev.org \
openstack/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
# NOTE(TheJulia): The CoreOS ramdisk is generally slow to startup,
# on the order of 300-500 seconds.
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_OS_TEST_TIMEOUT=2400
export DEVSTACK_GATE_TEMPEST_BAREMETAL_BUILD_TIMEOUT=1800
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_ENGINE=auto"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_CPU=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_RAM=2048"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_RAMDISK_TYPE=coreos"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-extra-vars
export DEVSTACK_GATE_TEMPEST_REGEX="ironic_tempest_plugin.tests.scenario"
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cat << 'EOF' >> ironic-vars-early
# use tempest plugin
export DEVSTACK_LOCAL_CONFIG+=$'\n'"TEMPEST_PLUGINS+=' /opt/stack/new/ironic-tempest-plugin'"
export TEMPEST_CONCURRENCY=1
EOF
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PROJECTS="openstack/ironic $PROJECTS"
export PROJECTS="openstack/ironic-lib $PROJECTS"
export PROJECTS="openstack/ironic-python-agent $PROJECTS"
export PROJECTS="openstack/ironic-tempest-plugin $PROJECTS"
export PROJECTS="openstack/python-ironicclient $PROJECTS"
export PROJECTS="openstack/virtualbmc $PROJECTS"
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_IRONIC=1
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_VIRT_DRIVER=ironic
export DEVSTACK_GATE_CONFIGDRIVE=1
export DEVSTACK_GATE_IRONIC_DRIVER=ipmi
if [[ ! "stable/newton stable/ocata stable/pike" =~ $ZUUL_BRANCH ]] ; then
export DEVSTACK_GATE_TLSPROXY=1
fi
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_TEMPEST_WHOLE_DISK_IMAGE=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=0"
export DEVSTACK_GATE_IRONIC_BUILD_RAMDISK=1
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_INSPECTOR_BUILD_RAMDISK=True"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"USE_SUBNETPOOL=False"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_COUNT=1"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"LIBVIRT_NIC_DRIVER=e1000"
# Ensure the ironic-vars-EARLY file exists
touch ironic-vars-early
# Pull in the EARLY variables injected by the optional builders
source ironic-vars-early
export DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin ironic https://opendev.org/openstack/ironic"
# Ensure the ironic-EXTRA-vars file exists
touch ironic-extra-vars
# Pull in the EXTRA variables injected by the optional builders
source ironic-extra-vars
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Images based on CoreOS are no longer supported and built. They were
deprecated in the Stein cycle and an alternative based on diskimage-builder
is being developed.

View File

@ -97,15 +97,6 @@
- openstack/ironic-python-agent - openstack/ironic-python-agent
- openstack/ironic-python-agent-builder - openstack/ironic-python-agent-builder
- job:
name: ironic-python-agent-buildimage-coreos
parent: ironic-python-agent-buildimage-base
vars:
image_name: 'coreos'
# TODO(dtantsur): refactor run.yaml, so that this variable is only
# required for DIB jobs.
image_distro: ''
- job: - job:
name: ironic-python-agent-buildimage-tinyipa name: ironic-python-agent-buildimage-tinyipa
parent: ironic-python-agent-buildimage-base parent: ironic-python-agent-buildimage-base

View File

@ -1,51 +0,0 @@
- job:
name: legacy-ipa-dsvm-base
# NOTE: We do not use 'legacy-ironic-dsvm-base' as simpler and less
# confusing to define it all here and then use 'legacy-dsvm-base'
parent: legacy-dsvm-base
irrelevant-files:
- ^test-requirements.txt$
- ^.*\.rst$
- ^doc/.*$
- ^ironic_python_agent/tests/.*$
- ^releasenotes/.*$
- ^setup.cfg$
- ^tools/.*$
- ^tox.ini$
required-projects:
- openstack/devstack-gate
- openstack/ironic
- openstack/ironic-lib
- openstack/ironic-python-agent
- openstack/ironic-tempest-plugin
- openstack/python-ironicclient
- openstack/tempest
- openstack/virtualbmc
- job:
name: ipa-tempest-dsvm-wholedisk-bios-ipmi-direct-coreos-src
parent: legacy-ipa-dsvm-base
run: playbooks/legacy/ipa-tempest-dsvm-wholedisk-bios-ipmi-direct-coreos-src/run.yaml
post-run: playbooks/legacy/ipa-tempest-dsvm-wholedisk-bios-ipmi-direct-coreos-src/post.yaml
timeout: 7200
- job:
name: ipa-tempest-dsvm-partition-bios-ipmi-direct-coreos-src
parent: legacy-ipa-dsvm-base
run: playbooks/legacy/ipa-tempest-dsvm-partition-bios-ipmi-direct-coreos-src/run.yaml
post-run: playbooks/legacy/ipa-tempest-dsvm-partition-bios-ipmi-direct-coreos-src/post.yaml
timeout: 5400
- job:
name: ipa-tempest-dsvm-partition-bios-ipmi-iscsi-coreos-src
parent: legacy-ipa-dsvm-base
run: playbooks/legacy/ipa-tempest-dsvm-partition-bios-ipmi-iscsi-coreos-src/run.yaml
post-run: playbooks/legacy/ipa-tempest-dsvm-partition-bios-ipmi-iscsi-coreos-src/post.yaml
timeout: 7200
- job:
name: ipa-tempest-dsvm-wholedisk-bios-ipmi-iscsi-coreos-src
parent: legacy-ipa-dsvm-base
run: playbooks/legacy/ipa-tempest-dsvm-wholedisk-bios-ipmi-iscsi-coreos-src/run.yaml
post-run: playbooks/legacy/ipa-tempest-dsvm-wholedisk-bios-ipmi-iscsi-coreos-src/post.yaml
timeout: 7200

View File

@ -18,16 +18,6 @@
voting: false voting: false
- metalsmith-integration-ipa-src: - metalsmith-integration-ipa-src:
voting: false voting: false
# NOTE(TheJulia): CoreOS jobs have a high failure rate.
# In order to reduce the odds of things like nested virt
# being detected but not available, we should treat them
# as non-voting. This is in order to reduce the need to
# recheck. If we non-voting tem on the gate, they are
# pointless, and the odds seem to enable them to pass
# more often than not.
# https://storyboard.openstack.org/#!/story/2003985
- ipa-tempest-dsvm-wholedisk-bios-ipmi-direct-coreos-src:
voting: false
- openstack-tox-functional: - openstack-tox-functional:
voting: false voting: false
- openstack-tox-lower-constraints - openstack-tox-lower-constraints
@ -48,6 +38,5 @@
- ipa-tempest-dsvm-partition-ipmi-iscsi-tinyipa-python3 - ipa-tempest-dsvm-partition-ipmi-iscsi-tinyipa-python3
post: post:
jobs: jobs:
- ironic-python-agent-buildimage-coreos
- ironic-python-agent-buildimage-tinyipa - ironic-python-agent-buildimage-tinyipa
- ironic-python-agent-buildimage-dib - ironic-python-agent-buildimage-dib