add ubi and minimal variants
This commit is contained in:
parent
cc4cf4c0cd
commit
414d2cf615
@ -1,4 +1,4 @@
|
|||||||
- imagename: Rocky-9-Container
|
- imagename: Rocky-9-Container-Base
|
||||||
types: [tar]
|
types: [tar]
|
||||||
docker-target: git.resf.org/sig_cloud/images:9.3
|
docker-target: git.resf.org/sig_cloud/images:9.3
|
||||||
elements: [rocky-container-base]
|
elements: [rocky-container-base]
|
10
9-container-minimal.yaml
Normal file
10
9-container-minimal.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- imagename: Rocky-9-Container-Minimal
|
||||||
|
types: [tar]
|
||||||
|
docker-target: git.resf.org/sig_cloud/images:9.3-ubi
|
||||||
|
elements: [rocky-container-minimal]
|
||||||
|
arch: ppc64le
|
||||||
|
environment:
|
||||||
|
DIB_ARCHITECTURE: ppc64le
|
||||||
|
DIB_YUM_DNF_CONTENTDIR: stg/rocky
|
||||||
|
DIB_AVOID_ISCSI: '1'
|
||||||
|
DIB_YUM_ROCKY_CONTAINER_MINIMAL: '1'
|
9
9-container-ubi.yaml
Normal file
9
9-container-ubi.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
- imagename: Rocky-9-Container-UBI
|
||||||
|
types: [tar]
|
||||||
|
docker-target: git.resf.org/sig_cloud/images:9.3-ubi
|
||||||
|
elements: [rocky-container-ubi]
|
||||||
|
arch: ppc64le
|
||||||
|
environment:
|
||||||
|
DIB_ARCHITECTURE: ppc64le
|
||||||
|
DIB_YUM_DNF_CONTENTDIR: stg/rocky
|
||||||
|
DIB_AVOID_ISCSI: '1'
|
@ -1 +1 @@
|
|||||||
Subproject commit 16026735e5b3f4f8f05dd3adc2c93d41f5d2f111
|
Subproject commit d17d7b15f9477c95001e9974a9150deb0a4474f9
|
117
elements/rocky-common/bin/map-packages
Executable file
117
elements/rocky-common/bin/map-packages
Executable file
@ -0,0 +1,117 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# dib-lint: disable=indent
|
||||||
|
# dib-lint indent requirements causes issue with pep8
|
||||||
|
|
||||||
|
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||||
|
#
|
||||||
|
# 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 sys
|
||||||
|
|
||||||
|
# Manually maintained for brevity; consider making this compiled from
|
||||||
|
# distromatch or other rich data sources.
|
||||||
|
# Debian name on the left, Fedora/RHEL on the right.
|
||||||
|
|
||||||
|
#
|
||||||
|
# !!! DO NOT ADD ANY ENTRIES TO THIS FILE !!!
|
||||||
|
#
|
||||||
|
# This global list has been deprecated by the pkg-map element. New
|
||||||
|
# package mappings should go in pkg-map files inside each element.
|
||||||
|
#
|
||||||
|
package_map = {
|
||||||
|
'apache2': 'httpd',
|
||||||
|
'arping': 'iputils',
|
||||||
|
'augeas-tools': 'augeas',
|
||||||
|
'build-essential': 'make automake gcc gcc-c++ kernel-devel',
|
||||||
|
'default-jre': 'java',
|
||||||
|
'extlinux': 'syslinux-extlinux',
|
||||||
|
'gearman-job-server': 'gearmand',
|
||||||
|
'grub-pc': 'grub2-tools grub2',
|
||||||
|
'libaio1': 'libaio',
|
||||||
|
'libapache2-mod-wsgi': 'mod_wsgi',
|
||||||
|
'libc6-dev': 'glibc-devel',
|
||||||
|
'libmariadb-dev': 'mariadb-devel',
|
||||||
|
'libffi-dev': 'libffi-devel',
|
||||||
|
'libldap2-dev': 'python-ldap',
|
||||||
|
'libmysql-dev': 'mysql++-devel',
|
||||||
|
'libmysql-java': 'mysql-connector-java',
|
||||||
|
'libmysqlclient-dev': 'mysql-devel',
|
||||||
|
'libpq-dev': 'libpqxx-devel',
|
||||||
|
'libxslt-dev': 'libxslt-devel',
|
||||||
|
'libsasl2-dev': 'cyrus-sasl-devel',
|
||||||
|
'libsqlite3-dev': 'libsqlite3x-devel',
|
||||||
|
'libssl-dev': 'openssl-devel',
|
||||||
|
'libvirt-bin': 'libvirt',
|
||||||
|
'libxml2-dev': 'libxml2-devel',
|
||||||
|
'libz-dev': 'zlib-devel',
|
||||||
|
'linux-headers-generic': 'kernel-headers',
|
||||||
|
'linux-image-generic': 'kernel',
|
||||||
|
'lm-sensors': 'lm_sensors',
|
||||||
|
'mysql-client-5.5': 'mariadb',
|
||||||
|
'mysql-server-5.5': 'mariadb-server',
|
||||||
|
'nagios-plugins-basic': 'nagios-plugins-all',
|
||||||
|
'netcat-openbsd': 'nmap-ncat',
|
||||||
|
'nfs-common': 'nfs-utils',
|
||||||
|
'nfs-kernel-server': 'nfs-utils',
|
||||||
|
'open-iscsi': 'iscsi-initiator-utils',
|
||||||
|
'openjdk-7-jre-headless': 'java-1.7.0-openjdk-headless',
|
||||||
|
'openssh-client': 'openssh-clients',
|
||||||
|
'openvswitch-common': 'openvswitch',
|
||||||
|
'openvswitch-switch': 'openvswitch',
|
||||||
|
'python-dev': 'python-devel',
|
||||||
|
'python-libvirt': 'libvirt-python',
|
||||||
|
'python-memcache': 'python-memcached',
|
||||||
|
'python-mysqldb': 'MySQL-python',
|
||||||
|
'python-numpy': 'numpy',
|
||||||
|
'python-pyopenssl': 'pyOpenSSL',
|
||||||
|
'python-xattr': 'pyxattr',
|
||||||
|
'qemu-utils': 'qemu-img',
|
||||||
|
'qpid-client': 'qpid-cpp-client',
|
||||||
|
'qpidd': 'qpid-cpp-server',
|
||||||
|
'snmp-mibs-downloader': '',
|
||||||
|
'snmpd': 'net-snmp',
|
||||||
|
'stunnel4': 'stunnel',
|
||||||
|
'tftpd-hpa': 'tftp-server',
|
||||||
|
'tgt': 'scsi-target-utils',
|
||||||
|
'vlan': 'vconfig',
|
||||||
|
# openstack mappings
|
||||||
|
'openstack-neutron-dhcp-agent': 'openstack-neutron',
|
||||||
|
}
|
||||||
|
|
||||||
|
deprecated = []
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
if arg not in package_map and arg.endswith('-dev'):
|
||||||
|
# convert -dev into devel
|
||||||
|
converted = '%s%s' % (arg, 'el')
|
||||||
|
deprecated.append((arg, converted))
|
||||||
|
print(converted)
|
||||||
|
else:
|
||||||
|
converted = package_map.get(arg, arg)
|
||||||
|
if converted != arg:
|
||||||
|
deprecated.append((arg, converted))
|
||||||
|
print(converted)
|
||||||
|
|
||||||
|
if deprecated:
|
||||||
|
print("WARNING: The following packages were re-mapped by "
|
||||||
|
"redhat-common map-packages\n"
|
||||||
|
"They should be converted to pkg-map:", file=sys.stderr)
|
||||||
|
for arg, converted in deprecated:
|
||||||
|
print(" %s -> %s" % (arg, converted), file=sys.stderr)
|
||||||
|
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
# Tell emacs to use python-mode
|
||||||
|
# Local variables:
|
||||||
|
# mode: python
|
||||||
|
# End:
|
@ -1,2 +1,2 @@
|
|||||||
export YUM=dnf
|
export YUM="dnf"
|
||||||
export DNF_VAR_contentdir=stg/rocky
|
export DNF_VAR_contentdir=stg/rocky
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Verify we can build a rocky-minimal image.
|
|
@ -1,2 +0,0 @@
|
|||||||
block-device-gpt
|
|
||||||
vm
|
|
1
elements/rocky-container-minimal/element-deps
Normal file
1
elements/rocky-container-minimal/element-deps
Normal file
@ -0,0 +1 @@
|
|||||||
|
rocky-container-base
|
@ -0,0 +1,2 @@
|
|||||||
|
export YUM="microdnf"
|
||||||
|
export DIB_YUM_ROCKY_CONTAINER_MINIMAL=1
|
6
elements/rocky-container-minimal/package-installs.yaml
Normal file
6
elements/rocky-container-minimal/package-installs.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
bash:
|
||||||
|
coreutils-single:
|
||||||
|
glibc-minimal-langpack:
|
||||||
|
microdnf:
|
||||||
|
rocky-release:
|
||||||
|
util-linux:
|
1
elements/rocky-container-ubi/element-deps
Normal file
1
elements/rocky-container-ubi/element-deps
Normal file
@ -0,0 +1 @@
|
|||||||
|
rocky-container-base
|
29
elements/rocky-container-ubi/package-installs.yaml
Normal file
29
elements/rocky-container-ubi/package-installs.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
bash:
|
||||||
|
coreutils-single:
|
||||||
|
crypto-policies-scripts:
|
||||||
|
curl-minimal:
|
||||||
|
findutils:
|
||||||
|
gdb-gdbserver:
|
||||||
|
glibc-minimal-langpack:
|
||||||
|
gzip:
|
||||||
|
hostname:
|
||||||
|
uninstall: true
|
||||||
|
less:
|
||||||
|
uninstall: true
|
||||||
|
libcurl-minimal:
|
||||||
|
libusbx:
|
||||||
|
uninstall: true
|
||||||
|
linux-firmware-whence:
|
||||||
|
uninstall: true
|
||||||
|
linux-firmware:
|
||||||
|
uninstall: true
|
||||||
|
rocky-release:
|
||||||
|
rootfiles:
|
||||||
|
systemd:
|
||||||
|
tar:
|
||||||
|
usermode:
|
||||||
|
uninstall: true
|
||||||
|
util-linux:
|
||||||
|
vim-minimal:
|
||||||
|
which:
|
||||||
|
yum:
|
@ -1,3 +1,4 @@
|
|||||||
|
package-installs
|
||||||
rocky-common
|
rocky-common
|
||||||
rpm-distro
|
rpm-distro
|
||||||
yum
|
yum
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
export DIB_YUM_ROCKY_CONTAINER_MINIMAL="${DIB_YUM_ROCKY_CONTAINER_MINIMAL:-0}"
|
@ -1,23 +1,39 @@
|
|||||||
bash:
|
bash:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
binutils:
|
binutils:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
coreutils-single:
|
coreutils-single:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
crypto-policies-scripts:
|
crypto-policies-scripts:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
curl-minimal:
|
curl-minimal:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
findutils:
|
findutils:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
glibc-minimal-langpack:
|
glibc-minimal-langpack:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
gzip:
|
gzip:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
hostname:
|
hostname:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
less:
|
less:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
libcurl-minimal:
|
libcurl-minimal:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
libusbx:
|
libusbx:
|
||||||
linux-firmware:
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
uninstall: true
|
|
||||||
linux-firmware-whence:
|
|
||||||
uninstall: true
|
|
||||||
lsb_release:
|
lsb_release:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
rootfiles:
|
rootfiles:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
tar:
|
tar:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
usermode:
|
usermode:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
systemd-libs:
|
systemd-libs:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
vim-minimal:
|
vim-minimal:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
yum:
|
yum:
|
||||||
|
when: DIB_YUM_ROCKY_CONTAINER_MINIMAL!=1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"family": {
|
"family": {
|
||||||
"redhat": {
|
"redhat": {
|
||||||
"lsb_release": "ed hostname patch postfix tar time"
|
"lsb_release": "hostname tar"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
11
elements/rocky-minimal-yum/post-install.d/99-cleanup-container
Executable file
11
elements/rocky-minimal-yum/post-install.d/99-cleanup-container
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
rm /etc/dnf/protected.d/sudo.conf
|
||||||
|
${YUM} clean all
|
||||||
|
${YUM} -y remove sudo python3 python-unversioned-command python3-pyyaml expat python3-libs python3-setuptools-wheel python3-pip-wheel
|
@ -23,10 +23,10 @@ for dir in $(ls -d /usr/share/locale/* | grep -v 'en_US\|all_languages\|locale\.
|
|||||||
|
|
||||||
rm -fr /usr/share/man
|
rm -fr /usr/share/man
|
||||||
|
|
||||||
|
|
||||||
# Cleanup caches left by chroot
|
# Cleanup caches left by chroot
|
||||||
rm -fr /usr/lib64/python*/__pycache__/
|
find /usr/lib* -type d -name __pycache__ -print0 | xargs --null -I {} rm -frv {}
|
||||||
rm -fr /var/cache/dnf/*
|
rm -fr /var/cache/dnf/*
|
||||||
|
rm -fr /var/lib/dnf/repos/*
|
||||||
rm -fr /run
|
rm -fr /run
|
||||||
rm -fr /home/ansible/
|
rm -fr /home/ansible/
|
||||||
|
|
@ -319,7 +319,7 @@ _install_repos
|
|||||||
# (https://docs.fedoraproject.org/en-US/modularity/) we can pick up
|
# (https://docs.fedoraproject.org/en-US/modularity/) we can pick up
|
||||||
# seemingly mismatched libraries.
|
# seemingly mismatched libraries.
|
||||||
if [[ ${DISTRO_NAME} =~ (fedora|openeuler|rocky) ]]; then
|
if [[ ${DISTRO_NAME} =~ (fedora|openeuler|rocky) ]]; then
|
||||||
_install_pkg_manager dnf curl-minimal libcurl-minimal
|
_install_pkg_manager ${YUM} curl-minimal libcurl-minimal
|
||||||
elif [[ ${DISTRO_NAME} == centos && $DIB_RELEASE > "7" ]]; then
|
elif [[ ${DISTRO_NAME} == centos && $DIB_RELEASE > "7" ]]; then
|
||||||
_install_pkg_manager dnf dnf-plugins-core curl libcurl
|
_install_pkg_manager dnf dnf-plugins-core curl libcurl
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user