diff --git a/2.4-micro/.build-args-c9s b/2.4-micro/.build-args-c9s deleted file mode 100644 index 3f9af48b..00000000 --- a/2.4-micro/.build-args-c9s +++ /dev/null @@ -1 +0,0 @@ ---cap-add=CAP_SYS_CHROOT diff --git a/2.4-micro/.exclude-c8s b/2.4-micro/.exclude-c8s deleted file mode 100644 index e69de29b..00000000 diff --git a/2.4-micro/2.4-micro b/2.4-micro/2.4-micro deleted file mode 120000 index 945c9b46..00000000 --- a/2.4-micro/2.4-micro +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/2.4-micro/Dockerfile.c10s b/2.4-micro/Dockerfile.c10s index aecd17e1..60bd8771 100644 --- a/2.4-micro/Dockerfile.c10s +++ b/2.4-micro/Dockerfile.c10s @@ -3,7 +3,7 @@ FROM quay.io/centos/centos:stream10-development AS build RUN mkdir -p /mnt/rootfs RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ INSTALL_PKGS="${MICRO_PKGS} httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" && \ - dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 9 --setopt install_weak_deps=false --nodocs -y && \ + dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever 10 --setopt install_weak_deps=false --nodocs -y && \ dnf -y --installroot /mnt/rootfs clean all && \ rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* @@ -60,13 +60,12 @@ ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ HTTPD_DATA_ORIG_PATH=/var/www \ HTTPD_LOG_PATH=/var/log/httpd -COPY ${HTTPD_VERSION}-micro/s2i/bin/ ${STI_SCRIPTS_PATH} -COPY ${HTTPD_VERSION}-micro/root / -COPY ${HTTPD_VERSION}-micro/core-scripts/usr /usr +COPY 2.4-micro/s2i/bin/ ${STI_SCRIPTS_PATH} +COPY 2.4-micro/root / +COPY 2.4-micro/core-scripts/usr /usr WORKDIR ${HOME} -# Add default user and prepare httpd RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ diff --git a/2.4-micro/Dockerfile.c9s b/2.4-micro/Dockerfile.c9s index 5362b00c..7376bc68 100644 --- a/2.4-micro/Dockerfile.c9s +++ b/2.4-micro/Dockerfile.c9s @@ -60,13 +60,12 @@ ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ HTTPD_DATA_ORIG_PATH=/var/www \ HTTPD_LOG_PATH=/var/log/httpd -COPY ${HTTPD_VERSION}-micro/s2i/bin/ ${STI_SCRIPTS_PATH} -COPY ${HTTPD_VERSION}-micro/root / -COPY ${HTTPD_VERSION}-micro/core-scripts/usr /usr +COPY 2.4-micro/s2i/bin/ ${STI_SCRIPTS_PATH} +COPY 2.4-micro/root / +COPY 2.4-micro/core-scripts/usr /usr WORKDIR ${HOME} -# Add default user and prepare httpd RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ diff --git a/2.4-micro/Dockerfile.fedora b/2.4-micro/Dockerfile.fedora index fe3a37e8..2a375459 100644 --- a/2.4-micro/Dockerfile.fedora +++ b/2.4-micro/Dockerfile.fedora @@ -60,13 +60,12 @@ ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ HTTPD_DATA_ORIG_PATH=/var/www \ HTTPD_LOG_PATH=/var/log/httpd -COPY ${HTTPD_VERSION}-micro/s2i/bin/ ${STI_SCRIPTS_PATH} -COPY ${HTTPD_VERSION}-micro/root / -COPY ${HTTPD_VERSION}-micro/core-scripts/usr /usr +COPY 2.4-micro/s2i/bin/ ${STI_SCRIPTS_PATH} +COPY 2.4-micro/root / +COPY 2.4-micro/core-scripts/usr /usr WORKDIR ${HOME} -# Add default user and prepare httpd RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ diff --git a/2.4-micro/core-scripts b/2.4-micro/core-scripts index c28fe81b..9495ee6a 120000 --- a/2.4-micro/core-scripts +++ b/2.4-micro/core-scripts @@ -1 +1 @@ -../common/shared-scripts/core/ \ No newline at end of file +../common/shared-scripts/core \ No newline at end of file diff --git a/2.4-micro/root b/2.4-micro/root new file mode 120000 index 00000000..bb2cc8d2 --- /dev/null +++ b/2.4-micro/root @@ -0,0 +1 @@ +../src/root \ No newline at end of file diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/common.sh b/2.4-micro/root/usr/share/container-scripts/httpd/common.sh deleted file mode 100644 index c0908f28..00000000 --- a/2.4-micro/root/usr/share/container-scripts/httpd/common.sh +++ /dev/null @@ -1,216 +0,0 @@ -# Set of functions used in other scripts - -if [ "x$PLATFORM" == "xel8" ]; then - HTTPCONF_LINENO=154 -elif [ "x$PLATFORM" == "xel9" ]; then - HTTPCONF_LINENO=156 -else - HTTPCONF_LINENO=156 -fi - -gen_ssl_certs() { - local sslcert=$HTTPD_TLS_CERT_PATH/localhost.crt - local sslkey=$HTTPD_TLS_CERT_PATH/localhost.key - local fqdn=`hostname` - - # A >59 char FQDN means "root@FQDN" exceeds 64-char max length for emailAddress - if [ "x${fqdn}" = "x" -o ${#fqdn} -gt 59 ]; then - fqdn=localhost.localdomain - fi - - if [ -f ${sslcert} -o -f ${sslkey} ]; then - return 0 - fi - - echo "---> Generating SSL key pair for httpd..." - if [ -x "/usr/bin/sscg" ]; then - if sscg --help | grep -q dhparams-file; then - # This is not used by mod_ssl but sscg now generates it - # See https://bugzilla.redhat.com/show_bug.cgi?id=2143206 - dhparams=$HTTPD_TLS_CERT_PATH/dhparams.pem - fi - sscg -q \ - --cert-file $sslcert \ - --cert-key-file $sslkey \ - --ca-file $sslcert \ - --lifetime 365 \ - --hostname $fqdn \ - --email root@$fqdn \ - ${dhparams+--dhparams-file $dhparams} - else - openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 2048 > ${sslkey} 2> /dev/null - - cat << EOF | openssl req -new -key ${sslkey} \ - -x509 -sha256 -days 365 -set_serial $RANDOM -extensions v3_req \ - -out ${sslcert} 2>/dev/null --- -SomeState -SomeCity -SomeOrganization -SomeOrganizationalUnit -${fqdn} -root@${fqdn} -EOF - fi - - chmod 640 ${sslcert} - chmod 640 ${sslkey} -} - -config_general() { - sed -i -e 's/^Listen 80$/Listen 8080/' ${HTTPD_MAIN_CONF_PATH}/httpd.conf && \ - sed -i -e ${HTTPCONF_LINENO}'s%AllowOverride None%AllowOverride All%' ${HTTPD_MAIN_CONF_PATH}/httpd.conf && \ - sed -i -e 's/^Listen 443/Listen 8443/' ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - sed -i -e 's/_default_:443/_default_:8443/' ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - - # do sed for SSLCertificateFile and SSLCertificateKeyFile - sed -i -e "s|^SSLCertificateFile .*$|SSLCertificateFile ${HTTPD_TLS_CERT_PATH}/localhost.crt|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - sed -i -e "s|^SSLCertificateKeyFile .*$|SSLCertificateKeyFile ${HTTPD_TLS_CERT_PATH}/localhost.key|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf -} - -config_log_to_stdout() { - sed -ri " s!^(\s*CustomLog)\s+\S+!\1 |/usr/bin/cat!g; s!^(\s*ErrorLog)\s+\S+!\1 |/usr/bin/cat!g;" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - sed -ri " s!^(\s*CustomLog)\s+\S+!\1 |/usr/bin/cat!g; s!^(\s*TransferLog)\s+\S+!\1 |/usr/bin/cat!g; s!^(\s*ErrorLog)\s+\S+!\1 |/usr/bin/cat!g;" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf -} - -runs_privileged() { - test "$(id -u)" == "0" - return $? -} - -config_privileged() { - # Change the s2i permissions back to the normal ones - chmod 644 ${HTTPD_MAIN_CONF_PATH}/* && \ - chmod 755 ${HTTPD_MAIN_CONF_PATH} && \ - chmod 644 ${HTTPD_MAIN_CONF_D_PATH}/* && \ - chmod 755 ${HTTPD_MAIN_CONF_D_PATH} && \ - chmod 644 ${HTTPD_MAIN_CONF_MODULES_D_PATH}/* && \ - chmod 755 ${HTTPD_MAIN_CONF_MODULES_D_PATH} && \ - chmod 600 ${HTTPD_TLS_CERT_PATH}/localhost.crt && \ - chmod 600 ${HTTPD_TLS_CERT_PATH}/localhost.key && \ - chmod 710 ${HTTPD_VAR_RUN} - - if ! [ -v HTTPD_LOG_TO_VOLUME ] ; then - config_log_to_stdout - fi -} - -config_s2i() { - sed -i -e "s%^DocumentRoot \"${HTTPD_DATA_ORIG_PATH}/html\"%DocumentRoot \"${HTTPD_APP_ROOT}/src\"%" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - sed -i -e "s%^> ${HTTPD_MAIN_CONF_PATH}/httpd.conf && \ - head -n${HTTPCONF_LINENO} ${HTTPD_MAIN_CONF_PATH}/httpd.conf | tail -n1 | grep "AllowOverride All" || exit -} - -config_non_privileged() { - sed -i -e "s/^User apache/User default/" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - sed -i -e "s/^Group apache/Group root/" ${HTTPD_MAIN_CONF_PATH}/httpd.conf - config_log_to_stdout - if [ -v HTTPD_LOG_TO_VOLUME ] ; then - echo "Error: Option HTTPD_LOG_TO_VOLUME is only valid for privileged runs (as UID 0)." - return 1 - fi -} - -config_mpm() { - if [ -v HTTPD_MPM -a -f ${HTTPD_MAIN_CONF_MODULES_D_PATH}/00-mpm.conf ]; then - local mpmconf=${HTTPD_MAIN_CONF_MODULES_D_PATH}/00-mpm.conf - sed -i -e 's,^LoadModule,#LoadModule,' ${mpmconf} - sed -i -e "/LoadModule mpm_${HTTPD_MPM}/s,^#LoadModule,LoadModule," ${mpmconf} - echo "---> Set MPM to ${HTTPD_MPM} in ${mpmconf}" - fi -} - -# get_matched_files finds file for image extending -function get_matched_files() { - local custom_dir default_dir - custom_dir="$1" - default_dir="$2" - files_matched="$3" - find "$default_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" - [ -d "$custom_dir" ] && find "$custom_dir" -maxdepth 1 -type f -name "$files_matched" -printf "%f\n" -} - -# process_extending_files process extending files in $1 and $2 directories -# - source all *.sh files -# (if there are files with same name source only file from $1) -function process_extending_files() { - local custom_dir default_dir - custom_dir=$1 - default_dir=$2 - while read filename ; do - echo "=> sourcing $filename ..." - # Custom file is prefered - if [ -f $custom_dir/$filename ]; then - source $custom_dir/$filename - elif [ -f $default_dir/$filename ]; then - source $default_dir/$filename - fi - done <<<"$(get_matched_files "$custom_dir" "$default_dir" '*.sh' | sort -u)" -} - -# Set current user in nss_wrapper -generate_container_user() { - local passwd_output_dir="${HTTPD_APP_ROOT}/etc" - - export USER_ID=$(id -u) - export GROUP_ID=$(id -g) - cp ${HTTPD_CONTAINER_SCRIPTS_PATH}/passwd.template ${passwd_output_dir}/passwd - echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/bin/bash" >> ${passwd_output_dir}/passwd - export LD_PRELOAD=libnss_wrapper.so - export NSS_WRAPPER_PASSWD=${passwd_output_dir}/passwd - export NSS_WRAPPER_GROUP=/etc/group -} - -# Copy config files from application to the location where httd expects them -# Param sets the directory where to look for files -process_config_files() { - local dir=${1:-.} - if [ -d ${dir}/httpd-cfg ]; then - echo "---> Copying httpd configuration files..." - if [ "$(ls -A ${dir}/httpd-cfg/*.conf)" ]; then - cp -v ${dir}/httpd-cfg/*.conf "${HTTPD_CONFIGURATION_PATH}" - rm -rf ${dir}/httpd-cfg - fi - else - if [ -d ${dir}/cfg ]; then - echo "---> Copying httpd configuration files from deprecated './cfg' directory, use './httpd-cfg' instead..." - if [ "$(ls -A ${dir}/cfg/*.conf)" ]; then - cp -v ${dir}/cfg/*.conf "${HTTPD_CONFIGURATION_PATH}" - rm -rf ${dir}/cfg - fi - fi - fi -} - -# Copy SSL files provided in application source -process_ssl_certs() { - local dir=${1:-.} - if [ -d ${dir}/httpd-ssl/private ] && [ -d ${dir}/httpd-ssl/certs ]; then - echo "---> Moving the httpd-ssl directory included in the source to a directory that isn't exposed by httpd..." - mv ${dir}/httpd-ssl ${HTTPD_APP_ROOT} - fi - if [ -d ${HTTPD_APP_ROOT}/httpd-ssl/private ] && [ -d ${HTTPD_APP_ROOT}/httpd-ssl/certs ]; then - echo "---> Looking for SSL certs for httpd..." - local ssl_cert="$(ls -A ${HTTPD_APP_ROOT}/httpd-ssl/certs/*.pem | head -n 1)" - local ssl_private="$(ls -A ${HTTPD_APP_ROOT}/httpd-ssl/private/*.pem | head -n 1)" - if [ -f "${ssl_cert}" ] ; then - # do sed for SSLCertificateFile and SSLCertificateKeyFile - echo "---> Setting SSL cert file for httpd..." - sed -i -e "s|^SSLCertificateFile .*$|SSLCertificateFile ${ssl_cert}|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - if [ -f "${ssl_private}" ]; then - echo "---> Setting SSL key file for httpd..." - sed -i -e "s|^SSLCertificateKeyFile .*$|SSLCertificateKeyFile ${ssl_private}|" ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - else - echo "---> Removing SSL key file settings for httpd..." - sed -i '/^SSLCertificateKeyFile .*/d' ${HTTPD_MAIN_CONF_D_PATH}/ssl.conf - fi - else - # Generate TLS key pair if no SSL cert was found - gen_ssl_certs - fi - else - gen_ssl_certs - fi -} - diff --git a/2.4-micro/s2i b/2.4-micro/s2i new file mode 120000 index 00000000..97484fc8 --- /dev/null +++ b/2.4-micro/s2i @@ -0,0 +1 @@ +../src/s2i \ No newline at end of file diff --git a/2.4-micro/test b/2.4-micro/test new file mode 120000 index 00000000..419df4f9 --- /dev/null +++ b/2.4-micro/test @@ -0,0 +1 @@ +../test \ No newline at end of file diff --git a/2.4-micro/test/__init__.py b/2.4-micro/test/__init__.py deleted file mode 120000 index d0f4746a..00000000 --- a/2.4-micro/test/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../test/__init__.py \ No newline at end of file diff --git a/2.4-micro/test/check_imagestreams.py b/2.4-micro/test/check_imagestreams.py deleted file mode 120000 index 56bb2be7..00000000 --- a/2.4-micro/test/check_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../common/check_imagestreams.py \ No newline at end of file diff --git a/2.4-micro/test/conftest.py b/2.4-micro/test/conftest.py deleted file mode 120000 index 3f2d7840..00000000 --- a/2.4-micro/test/conftest.py +++ /dev/null @@ -1 +0,0 @@ -../../test/conftest.py \ No newline at end of file diff --git a/2.4-micro/test/examples b/2.4-micro/test/examples deleted file mode 120000 index da7b1965..00000000 --- a/2.4-micro/test/examples +++ /dev/null @@ -1 +0,0 @@ -../../examples/ \ No newline at end of file diff --git a/2.4-micro/test/imagestreams b/2.4-micro/test/imagestreams deleted file mode 120000 index 0dcbe9e0..00000000 --- a/2.4-micro/test/imagestreams +++ /dev/null @@ -1 +0,0 @@ -../../imagestreams/ \ No newline at end of file diff --git a/2.4-micro/test/run b/2.4-micro/test/run deleted file mode 120000 index 44977d63..00000000 --- a/2.4-micro/test/run +++ /dev/null @@ -1 +0,0 @@ -../../test/run \ No newline at end of file diff --git a/2.4-micro/test/run-openshift-pytest b/2.4-micro/test/run-openshift-pytest deleted file mode 120000 index 5063ae30..00000000 --- a/2.4-micro/test/run-openshift-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-pytest \ No newline at end of file diff --git a/2.4-micro/test/run-openshift-remote-cluster b/2.4-micro/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/2.4-micro/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/2.4-micro/test/run-pytest b/2.4-micro/test/run-pytest deleted file mode 120000 index efe32b48..00000000 --- a/2.4-micro/test/run-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-pytest \ No newline at end of file diff --git a/2.4-micro/test/sample-test-app b/2.4-micro/test/sample-test-app deleted file mode 120000 index ba0a23be..00000000 --- a/2.4-micro/test/sample-test-app +++ /dev/null @@ -1 +0,0 @@ -../../examples/sample-test-app/ \ No newline at end of file diff --git a/2.4-micro/test/self-signed-ssl b/2.4-micro/test/self-signed-ssl deleted file mode 120000 index 1c1fd187..00000000 --- a/2.4-micro/test/self-signed-ssl +++ /dev/null @@ -1 +0,0 @@ -../../examples/self-signed-ssl/ \ No newline at end of file diff --git a/2.4-micro/test/settings.py b/2.4-micro/test/settings.py deleted file mode 120000 index 44504a45..00000000 --- a/2.4-micro/test/settings.py +++ /dev/null @@ -1 +0,0 @@ -../../test/settings.py \ No newline at end of file diff --git a/2.4-micro/test/test-lib-httpd.sh b/2.4-micro/test/test-lib-httpd.sh deleted file mode 120000 index 2b24e986..00000000 --- a/2.4-micro/test/test-lib-httpd.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-httpd.sh \ No newline at end of file diff --git a/2.4-micro/test/test-lib-openshift.sh b/2.4-micro/test/test-lib-openshift.sh deleted file mode 120000 index 4f9f2996..00000000 --- a/2.4-micro/test/test-lib-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-openshift.sh \ No newline at end of file diff --git a/2.4-micro/test/test-lib-remote-openshift.sh b/2.4-micro/test/test-lib-remote-openshift.sh deleted file mode 120000 index 92ad2f4d..00000000 --- a/2.4-micro/test/test-lib-remote-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-remote-openshift.sh \ No newline at end of file diff --git a/2.4-micro/test/test-lib.sh b/2.4-micro/test/test-lib.sh deleted file mode 120000 index 1ac99b93..00000000 --- a/2.4-micro/test/test-lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib.sh \ No newline at end of file diff --git a/2.4-micro/test/test_container_httpd.py b/2.4-micro/test/test_container_httpd.py deleted file mode 120000 index 1c002d86..00000000 --- a/2.4-micro/test/test_container_httpd.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd.py \ No newline at end of file diff --git a/2.4-micro/test/test_container_httpd_s2i.py b/2.4-micro/test/test_container_httpd_s2i.py deleted file mode 120000 index 6dbab8e8..00000000 --- a/2.4-micro/test/test_container_httpd_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd_s2i.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_ex_template.py b/2.4-micro/test/test_ocp_ex_template.py deleted file mode 120000 index 002c0c4a..00000000 --- a/2.4-micro/test/test_ocp_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_ex_template.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_imagestream_s2i.py b/2.4-micro/test/test_ocp_imagestream_s2i.py deleted file mode 120000 index 89eb6791..00000000 --- a/2.4-micro/test/test_ocp_imagestream_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestream_s2i.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_imagestreams.py b/2.4-micro/test/test_ocp_imagestreams.py deleted file mode 120000 index ee905e77..00000000 --- a/2.4-micro/test/test_ocp_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestreams.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_integration.py b/2.4-micro/test/test_ocp_integration.py deleted file mode 120000 index 12a7b4f0..00000000 --- a/2.4-micro/test/test_ocp_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_integration.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_shared_helm_imagestreams.py b/2.4-micro/test/test_ocp_shared_helm_imagestreams.py deleted file mode 120000 index 76d5701d..00000000 --- a/2.4-micro/test/test_ocp_shared_helm_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_imagestreams.py \ No newline at end of file diff --git a/2.4-micro/test/test_ocp_shared_helm_template.py b/2.4-micro/test/test_ocp_shared_helm_template.py deleted file mode 120000 index 9cf469bf..00000000 --- a/2.4-micro/test/test_ocp_shared_helm_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_template.py \ No newline at end of file diff --git a/2.4/root b/2.4/root new file mode 120000 index 00000000..bb2cc8d2 --- /dev/null +++ b/2.4/root @@ -0,0 +1 @@ +../src/root \ No newline at end of file diff --git a/2.4/root/usr/bin/run-httpd b/2.4/root/usr/bin/run-httpd deleted file mode 100755 index e03578fd..00000000 --- a/2.4/root/usr/bin/run-httpd +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -eu - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Check whether we run as s2i -if ! [ -v HTTPD_RUN_BY_S2I ] && runs_privileged ; then - config_privileged -else - # We run as non-root or as s2i - config_non_privileged - generate_container_user -fi - -process_extending_files ${HTTPD_APP_ROOT}/src/httpd-pre-init/ ${HTTPD_CONTAINER_SCRIPTS_PATH}/pre-init/ - -exec httpd -D FOREGROUND $@ diff --git a/2.4/root/usr/libexec/httpd-prepare b/2.4/root/usr/libexec/httpd-prepare deleted file mode 100755 index 3454cd1d..00000000 --- a/2.4/root/usr/libexec/httpd-prepare +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -set -e - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -mkdir -p ${HTTPD_CONFIGURATION_PATH} -chmod -R a+rwx ${HTTPD_MAIN_CONF_PATH} -chmod -R a+rwx ${HTTPD_MAIN_CONF_D_PATH} -chmod -R a+rwx ${HTTPD_MAIN_CONF_MODULES_D_PATH} -mkdir -p ${HTTPD_APP_ROOT}/etc -chmod -R a+rwx ${HTTPD_APP_ROOT}/etc -chmod -R a+rwx ${HTTPD_VAR_RUN} -chown -R 1001:0 ${HTTPD_APP_ROOT} -chown -R 1001:0 ${HTTPD_DATA_PATH} -chmod -R g+rwx ${HTTPD_LOG_PATH} -chown -R 1001:0 ${HTTPD_LOG_PATH} - -# remove bundled key pair and create new dir, where we store it -rm -f /etc/pki/tls/certs/localhost.crt -rm -f /etc/pki/tls/private/localhost.key -mkdir -p $HTTPD_TLS_CERT_PATH -chmod -R a+rwx $HTTPD_TLS_CERT_PATH - -mkdir -p ${HTTPD_CONTAINER_SCRIPTS_PATH}/pre-init - -config_general - diff --git a/2.4/root/usr/share/container-scripts/httpd/passwd.template b/2.4/root/usr/share/container-scripts/httpd/passwd.template deleted file mode 100644 index c937416f..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/passwd.template +++ /dev/null @@ -1,14 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -bin:x:1:1:bin:/bin:/sbin/nologin -daemon:x:2:2:daemon:/sbin:/sbin/nologin -adm:x:3:4:adm:/var/adm:/sbin/nologin -lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin -sync:x:5:0:sync:/sbin:/bin/sync -shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown -halt:x:7:0:halt:/sbin:/sbin/halt -mail:x:8:12:mail:/var/spool/mail:/sbin/nologin -operator:x:11:0:operator:/root:/sbin/nologin -games:x:12:100:games:/usr/games:/sbin/nologin -ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin -nobody:x:99:99:Nobody:/:/sbin/nologin -apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin diff --git a/2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh b/2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh deleted file mode 100644 index 2fd03c7d..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy config files from application to the location where httpd expects them -process_config_files diff --git a/2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh b/2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh deleted file mode 100644 index cbad2c37..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy SSL files provided in application source -process_ssl_certs diff --git a/2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh b/2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh deleted file mode 100644 index f7de4959..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh +++ /dev/null @@ -1,3 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -config_mpm diff --git a/2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh b/2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh deleted file mode 100644 index f7ce08b5..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy config files from application to the location where httd expects them -process_config_files ${HTTPD_APP_ROOT}/src diff --git a/2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh b/2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh deleted file mode 100644 index 38bc8cf3..00000000 --- a/2.4/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh +++ /dev/null @@ -1,4 +0,0 @@ -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -# Copy SSL files provided in application source -process_ssl_certs ${HTTPD_APP_ROOT}/src diff --git a/2.4/s2i b/2.4/s2i new file mode 120000 index 00000000..97484fc8 --- /dev/null +++ b/2.4/s2i @@ -0,0 +1 @@ +../src/s2i \ No newline at end of file diff --git a/2.4/s2i/bin/assemble b/2.4/s2i/bin/assemble deleted file mode 100755 index ad6f7c8b..00000000 --- a/2.4/s2i/bin/assemble +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -e - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -echo "---> Enabling s2i support in httpd24 image" - -config_s2i - -echo "---> Installing application source" -cp -af /tmp/src/. ./ -rm -rf ./.hg ./.git ./.svn - -# Fix source directory permissions -fix-permissions ./ - -process_extending_files ${HTTPD_APP_ROOT}/src/httpd-post-assemble/ ${HTTPD_CONTAINER_SCRIPTS_PATH}/post-assemble/ - -# Fix source directory permissions -fix-permissions ./ diff --git a/2.4/s2i/bin/run b/2.4/s2i/bin/run deleted file mode 100755 index f8f8aa39..00000000 --- a/2.4/s2i/bin/run +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -source ${HTTPD_CONTAINER_SCRIPTS_PATH}/common.sh - -export HTTPD_RUN_BY_S2I=1 - -exec run-httpd $@ diff --git a/2.4/s2i/bin/usage b/2.4/s2i/bin/usage deleted file mode 100755 index 9ebe8e2a..00000000 --- a/2.4/s2i/bin/usage +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -DISTRO=`cat /etc/*-release | grep ^ID= | grep -Po '".*?"' | tr -d '"'` -NAMESPACE=sclorg -if [[ $DISTRO =~ rhel* ]]; then - NAMESPACE=rhel10 - DISTRO="" -else - DISTRO="-c10s" -fi - -cat < ${HTTPD_APP_ROOT}/src/index.html diff --git a/2.4/test/pre-init-test-app/index.html b/2.4/test/pre-init-test-app/index.html deleted file mode 100644 index 38f417d0..00000000 --- a/2.4/test/pre-init-test-app/index.html +++ /dev/null @@ -1 +0,0 @@ -This is a sample s2i application with static content. diff --git a/2.4/test/run b/2.4/test/run deleted file mode 120000 index 44977d63..00000000 --- a/2.4/test/run +++ /dev/null @@ -1 +0,0 @@ -../../test/run \ No newline at end of file diff --git a/2.4/test/run-openshift-pytest b/2.4/test/run-openshift-pytest deleted file mode 120000 index 5063ae30..00000000 --- a/2.4/test/run-openshift-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-pytest \ No newline at end of file diff --git a/2.4/test/run-openshift-remote-cluster b/2.4/test/run-openshift-remote-cluster deleted file mode 120000 index 1bffcba8..00000000 --- a/2.4/test/run-openshift-remote-cluster +++ /dev/null @@ -1 +0,0 @@ -../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/2.4/test/run-pytest b/2.4/test/run-pytest deleted file mode 120000 index efe32b48..00000000 --- a/2.4/test/run-pytest +++ /dev/null @@ -1 +0,0 @@ -../../test/run-pytest \ No newline at end of file diff --git a/2.4/test/sample-test-app b/2.4/test/sample-test-app deleted file mode 120000 index ba0a23be..00000000 --- a/2.4/test/sample-test-app +++ /dev/null @@ -1 +0,0 @@ -../../examples/sample-test-app/ \ No newline at end of file diff --git a/2.4/test/self-signed-ssl b/2.4/test/self-signed-ssl deleted file mode 120000 index 1c1fd187..00000000 --- a/2.4/test/self-signed-ssl +++ /dev/null @@ -1 +0,0 @@ -../../examples/self-signed-ssl/ \ No newline at end of file diff --git a/2.4/test/settings.py b/2.4/test/settings.py deleted file mode 120000 index 44504a45..00000000 --- a/2.4/test/settings.py +++ /dev/null @@ -1 +0,0 @@ -../../test/settings.py \ No newline at end of file diff --git a/2.4/test/test-lib-httpd.sh b/2.4/test/test-lib-httpd.sh deleted file mode 120000 index 2b24e986..00000000 --- a/2.4/test/test-lib-httpd.sh +++ /dev/null @@ -1 +0,0 @@ -../../test/test-lib-httpd.sh \ No newline at end of file diff --git a/2.4/test/test-lib-openshift.sh b/2.4/test/test-lib-openshift.sh deleted file mode 120000 index 4f9f2996..00000000 --- a/2.4/test/test-lib-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-openshift.sh \ No newline at end of file diff --git a/2.4/test/test-lib-remote-openshift.sh b/2.4/test/test-lib-remote-openshift.sh deleted file mode 120000 index 92ad2f4d..00000000 --- a/2.4/test/test-lib-remote-openshift.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib-remote-openshift.sh \ No newline at end of file diff --git a/2.4/test/test-lib.sh b/2.4/test/test-lib.sh deleted file mode 120000 index 1ac99b93..00000000 --- a/2.4/test/test-lib.sh +++ /dev/null @@ -1 +0,0 @@ -../../common/test-lib.sh \ No newline at end of file diff --git a/2.4/test/test-openshift.yaml b/2.4/test/test-openshift.yaml deleted file mode 120000 index 8613fbba..00000000 --- a/2.4/test/test-openshift.yaml +++ /dev/null @@ -1 +0,0 @@ -../../common/test-openshift.yaml \ No newline at end of file diff --git a/2.4/test/test_container_httpd.py b/2.4/test/test_container_httpd.py deleted file mode 120000 index 1c002d86..00000000 --- a/2.4/test/test_container_httpd.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd.py \ No newline at end of file diff --git a/2.4/test/test_container_httpd_s2i.py b/2.4/test/test_container_httpd_s2i.py deleted file mode 120000 index 6dbab8e8..00000000 --- a/2.4/test/test_container_httpd_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_container_httpd_s2i.py \ No newline at end of file diff --git a/2.4/test/test_ocp_ex_template.py b/2.4/test/test_ocp_ex_template.py deleted file mode 120000 index 002c0c4a..00000000 --- a/2.4/test/test_ocp_ex_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_ex_template.py \ No newline at end of file diff --git a/2.4/test/test_ocp_imagestream_s2i.py b/2.4/test/test_ocp_imagestream_s2i.py deleted file mode 120000 index 89eb6791..00000000 --- a/2.4/test/test_ocp_imagestream_s2i.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestream_s2i.py \ No newline at end of file diff --git a/2.4/test/test_ocp_imagestreams.py b/2.4/test/test_ocp_imagestreams.py deleted file mode 120000 index ee905e77..00000000 --- a/2.4/test/test_ocp_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_imagestreams.py \ No newline at end of file diff --git a/2.4/test/test_ocp_integration.py b/2.4/test/test_ocp_integration.py deleted file mode 120000 index 12a7b4f0..00000000 --- a/2.4/test/test_ocp_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_integration.py \ No newline at end of file diff --git a/2.4/test/test_ocp_shared_helm_imagestreams.py b/2.4/test/test_ocp_shared_helm_imagestreams.py deleted file mode 120000 index 76d5701d..00000000 --- a/2.4/test/test_ocp_shared_helm_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_imagestreams.py \ No newline at end of file diff --git a/2.4/test/test_ocp_shared_helm_template.py b/2.4/test/test_ocp_shared_helm_template.py deleted file mode 120000 index 9cf469bf..00000000 --- a/2.4/test/test_ocp_shared_helm_template.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ocp_shared_helm_template.py \ No newline at end of file diff --git a/2.4/test/utils.sh b/2.4/test/utils.sh deleted file mode 100755 index 525c3e21..00000000 --- a/2.4/test/utils.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash - -function print_result { - local RESET='\e[0m' - local RED='\e[0;31m' - local GREEN='\e[0;32m' - local YELLOW='\e[1;33m' - local PASS="${RESET}${GREEN}[PASS]" - local FAIL="${RESET}${RED}[FAIL]" - local WORKING="${RESET}${YELLOW}[....]" - local STATUS="$1" - shift - - if [ "${STATUS}" = pass ]; then - echo -en "${PASS}" - elif [ "${STATUS}" = fail ]; then - echo -en "${FAIL}" - elif [ "${STATUS}" = working ]; then - echo -en "${WORKING}" - else - return - fi - - echo -en " ${@}${RESET}" - echo -} - -function get_status { - if [ "$1" = "$2" ]; then - echo pass - else - echo fail - fi -} - -function run_command { - local cmd="$1" - local expected="${2:-0}" - local msg="${3:-Running command '$cmd'}" - print_result working "$msg" - eval $cmd - local res="$?" - status=`get_status "$res" "$expected"` - print_result "$status" "$msg" - return "$res" -} diff --git a/Makefile b/Makefile index b394377d..40f6cdea 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,14 @@ DOCKER_BUILD_CONTEXT = .. .PHONY: $(shell test -f common/common.mk || echo >&2 'Please do "git submodule update --init" first.') include common/common.mk + +generate: + for version in ${VERSIONS} ; do \ + if [[ "$$version" == *-micro ]]; then \ + $(generator) -v $$version -m manifest-micro.yml -s specs/multispec.yml ; \ + elif [[ "$$version" == *-minimal ]]; then \ + $(generator) -v $$version -m manifest-minimal.yml -s specs/multispec.yml ; \ + else \ + $(generator) -v $$version -m manifest.yml -s specs/multispec.yml ; \ + fi \ + done diff --git a/manifest-micro.yml b/manifest-micro.yml new file mode 100644 index 00000000..5ed66636 --- /dev/null +++ b/manifest-micro.yml @@ -0,0 +1,34 @@ +# Manifest for micro image directories creation +# every dest path will be prefixed by $DESTDIR/$version + +# Files containing distgen directives, which are used for each +# (distro, version) combination not excluded in multispec +DISTGEN_MULTI_RULES: + - src: src/Dockerfile.micro + dest: Dockerfile.c9s + + - src: src/Dockerfile.micro + dest: Dockerfile.c10s + + - src: src/Dockerfile.micro + dest: Dockerfile.fedora + + +# Symbolic links +# This section is the last one on purpose because the generator.py +# does not allow dead symlinks. +SYMLINK_RULES: + - src: ../src/root + dest: root + + - src: root/usr/share/container-scripts/httpd/README.md + dest: README.md + + - src: ../src/s2i + dest: s2i + + - src: ../common/shared-scripts/core + dest: core-scripts + + - src: ../test + dest: test diff --git a/manifest.yml b/manifest.yml new file mode 100644 index 00000000..1945b7c7 --- /dev/null +++ b/manifest.yml @@ -0,0 +1,43 @@ +# Manifest for image directories creation +# every dest path will be prefixed by $DESTDIR/$version + +# Files containing distgen directives, which are used for each +# (distro, version) combination not excluded in multispec +DISTGEN_MULTI_RULES: + - src: src/Dockerfile + dest: Dockerfile.rhel8 + + - src: src/Dockerfile + dest: Dockerfile.rhel9 + + - src: src/Dockerfile + dest: Dockerfile.rhel10 + + - src: src/Dockerfile + dest: Dockerfile.c9s + + - src: src/Dockerfile + dest: Dockerfile.c10s + + - src: src/Dockerfile + dest: Dockerfile.fedora + + +# Symbolic links +# This section is the last one on purpose because the generator.py +# does not allow dead symlinks. +SYMLINK_RULES: + - src: . + dest: "2.4" + + - src: ../src/root + dest: root + + - src: root/usr/share/container-scripts/httpd/README.md + dest: README.md + + - src: ../src/s2i + dest: s2i + + - src: ../test + dest: test diff --git a/specs/multispec.yml b/specs/multispec.yml new file mode 100644 index 00000000..6fb655c0 --- /dev/null +++ b/specs/multispec.yml @@ -0,0 +1,160 @@ +version: 1 + +specs: + distroinfo: + rhel8: + distros: + - rhel-8-x86_64 + s2i_base: ubi8/s2i-core:1 + org: "rhel8" + prod: "rhel8" + img_name: "{{ spec.org }}/httpd-{{ spec.short }}" + base_image_tag: ":1" + env_init: "simple" + var_style: "dollar" + pkg_manager: "yum" + pkgs: "gettext hostname nss_wrapper-libs httpd mod_ssl mod_ldap mod_session mod_security mod_auth_mellon sscg" + pkg_verify: true + module_enable: "yum -y module enable httpd:$HTTPD_VERSION && \\" + redhat_component: "httpd-{{ spec.short }}-container" + version_label: "1" + license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" + usage_image: "{{ spec.org }}/httpd-{{ spec.short }}" + copy_version: "{{ spec.version }}" + + rhel9: + distros: + - rhel-9-x86_64 + s2i_base: ubi9/s2i-core:1 + org: "rhel9" + prod: "rhel9" + img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}" + base_image_tag: ":1" + env_init: "combined" + var_style: "braces" + pkg_manager: "yum" + pkgs: "gettext hostname nss_wrapper-libs httpd mod_ssl mod_ldap mod_session mod_security mod_auth_mellon sscg" + pkg_verify: false + redhat_component: "${NAME}-${HTTPD_SHORT_VERSION}-container" + version_label: "1" + license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" + usage_image: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}" + + rhel10: + distros: + - rhel-10-x86_64 + s2i_base: ubi10/s2i-core + org: "ubi10" + prod: "rhel10" + img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}" + base_image_tag: "" + env_init: "combined_with_arch" + var_style: "braces" + pkg_manager: "dnf" + pkgs: "gettext hostname nss_wrapper-libs httpd mod_ssl mod_ldap mod_session sscg" + pkg_verify: false + redhat_component: "${NAME}-${HTTPD_SHORT_VERSION}-container" + version_label: "" + license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" + usage_image: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}" + + c9s: + distros: + - centos-stream-9-x86_64 + s2i_base: quay.io/sclorg/s2i-core-c9s:c9s + org: "sclorg" + prod: "c9s" + img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-{{ spec.prod }}" + base_image_tag: ":c9s" + env_init: "combined" + var_style: "braces" + pkg_manager: "yum" + pkgs: "gettext hostname nss_wrapper-libs httpd mod_ssl mod_ldap mod_session mod_security mod_auth_mellon sscg" + pkg_verify: false + redhat_component: "${NAME}-${HTTPD_SHORT_VERSION}-container" + version_label: "1" + license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" + usage_image: "quay.io/{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-{{ spec.prod }}" + micro_build_base: "quay.io/centos/centos:stream9" + micro_releasever: "9" + micro_pkgs: "httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" + micro_platform: "el9" + micro_img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-micro-{{ spec.prod }}" + + c10s: + distros: + - centos-stream-10-x86_64 + s2i_base: quay.io/sclorg/s2i-core-c10s:c10s + org: "sclorg" + prod: "c10s" + img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-{{ spec.prod }}" + base_image_tag: ":c10s" + env_init: "combined_with_arch" + var_style: "braces" + pkg_manager: "dnf" + pkgs: "gettext hostname nss_wrapper-libs httpd mod_ssl mod_ldap mod_session sscg" + pkg_verify: false + redhat_component: "${NAME}-${HTTPD_SHORT_VERSION}-container" + version_label: "1" + license_terms: "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI" + usage_image: "quay.io/{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-{{ spec.prod }}" + micro_build_base: "quay.io/centos/centos:stream10-development" + micro_releasever: "10" + micro_pkgs: "httpd-core mod_ssl findutils hostname nss_wrapper-libs redhat-logos-httpd" + micro_platform: "el10" + micro_img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-micro-{{ spec.prod }}" + + fedora42: + distros: + - fedora-42-x86_64 + s2i_base: quay.io/fedora/s2i-core:42 + org: "fedora" + prod: "fedora" + img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}" + base_image_tag: ":42" + env_init: "combined_with_arch" + var_style: "braces" + pkg_manager: "dnf" + pkg_clean: "dnf clean all" + pkgs: "nss_wrapper-libs httpd mod_ssl mod_ldap mod_session mod_security sscg" + extra_install: "dnf install -y yum-utils gettext hostname && \\" + pkg_verify: false + redhat_component: "${NAME}" + version_label: "version" + license_terms: "" + usage_image: "quya.io/{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}" + fedora_specific: true + micro_build_base: "quay.io/fedora/fedora:42" + micro_releasever: "42" + micro_pkgs: "httpd-core mod_ssl findutils hostname nss_wrapper-libs fedora-logos-httpd" + micro_platform: "fedora" + micro_use_host_config: true + micro_img_name: "{{ spec.org }}/${NAME}-${HTTPD_SHORT_VERSION}-micro" + + version: + "2.4": + version: "2.4" + short: "24" + common_image_name: "{{ spec.org }}/httpd-{{ spec.short }}-{{ spec.prod }}" + + "2.4-micro": + version: "2.4" + short: "24" + suffix: "-micro" + +matrix: + include: + - version: "2.4" + distros: + - rhel-8-x86_64 + - rhel-9-x86_64 + - rhel-10-x86_64 + - centos-stream-9-x86_64 + - centos-stream-10-x86_64 + - fedora-42-x86_64 + + - version: "2.4-micro" + distros: + - centos-stream-9-x86_64 + - centos-stream-10-x86_64 + - fedora-42-x86_64 diff --git a/src/Dockerfile b/src/Dockerfile new file mode 100644 index 00000000..501c95ee --- /dev/null +++ b/src/Dockerfile @@ -0,0 +1,158 @@ +FROM {{ spec.s2i_base }} + +# Apache HTTP Server image. +# +# Volumes: +# * /var/www - Datastore for httpd +{% if spec.prod == "fedora" %} +# * /var/log/httpd - Storage for logs when $HTTPD_LOG_TO_VOLUME is set +# Environment: +# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd +{% else %} +# * /var/log/httpd24 - Storage for logs when $HTTPD_LOG_TO_VOLUME is set +# Environment: +# * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24 +{% endif %} + +{% if spec.env_init == "simple" %} +ENV HTTPD_VERSION={{ spec.version }} + +ENV SUMMARY="Platform for running Apache httpd $HTTPD_VERSION or building httpd-based application" \ + DESCRIPTION="Apache httpd $HTTPD_VERSION available as container, is a powerful, efficient, \ +{% elif spec.env_init == "combined" %} +ENV HTTPD_VERSION={{ spec.version }} \ + HTTPD_SHORT_VERSION={{ spec.short }} \ + NAME=httpd + +ENV SUMMARY="Platform for running Apache httpd ${HTTPD_VERSION} or building httpd-based application" \ + DESCRIPTION="Apache httpd ${HTTPD_VERSION} available as container, is a powerful, efficient, \ +{% else %} +ENV HTTPD_VERSION={{ spec.version }} \ + HTTPD_SHORT_VERSION={{ spec.short }} \ + NAME=httpd \ + ARCH=x86_64 + +ENV SUMMARY="Platform for running Apache httpd ${HTTPD_VERSION} or building httpd-based application" \ + DESCRIPTION="Apache httpd ${HTTPD_VERSION} available as container, is a powerful, efficient, \ +{% endif %} +and extensible web server. Apache supports a variety of features, many implemented as compiled modules \ +which extend the core functionality. \ +These can range from server-side programming language support to authentication schemes. \ +Virtual hosting allows one Apache installation to serve many different Web sites." + +{% if spec.var_style == "dollar" %} +LABEL summary="$SUMMARY" \ + description="$DESCRIPTION" \ + io.k8s.description="$DESCRIPTION" \ + io.k8s.display-name="Apache httpd $HTTPD_VERSION" \ + io.openshift.expose-services="8080:http,8443:https" \ + io.openshift.tags="builder,httpd,httpd-{{ spec.short }}" \ + name="{{ spec.img_name }}" \ +{% if spec.version_label %} + version="{{ spec.version_label }}" \ +{% endif %} +{% if spec.license_terms %} + com.redhat.license_terms="{{ spec.license_terms }}" \ +{% endif %} + com.redhat.component="{{ spec.redhat_component }}" \ + usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ {{ spec.usage_image }} sample-server" \ + maintainer="SoftwareCollections.org " +{% elif spec.fedora_specific %} +LABEL summary="${SUMMARY}" \ + description="${DESCRIPTION}" \ + io.k8s.description="${SUMMARY}" \ + io.k8s.display-name="Apache httpd ${HTTPD_VERSION}" \ + io.openshift.expose-services="8080:http,8443:https" \ + io.openshift.tags="builder,${NAME},${NAME}${HTTPD_SHORT_VERSION}" \ + com.redhat.component="{{ spec.redhat_component }}" \ + name="{{ spec.img_name }}" \ + version="${HTTPD_VERSION}" \ + usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ {{ spec.usage_image }} sample-server" \ + maintainer="SoftwareCollections.org " +{% else %} +LABEL summary="${SUMMARY}" \ + description="${DESCRIPTION}" \ + io.k8s.description="${DESCRIPTION}" \ + io.k8s.display-name="Apache httpd ${HTTPD_VERSION}" \ + io.openshift.expose-services="8080:http,8443:https" \ + io.openshift.tags="builder,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \ + name="{{ spec.img_name }}" \ +{% if spec.version_label %} + version="{{ spec.version_label }}" \ +{% endif %} +{% if spec.license_terms %} + com.redhat.license_terms="{{ spec.license_terms }}" \ +{% endif %} + com.redhat.component="{{ spec.redhat_component }}" \ + usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ {{ spec.usage_image }} sample-server" \ + maintainer="SoftwareCollections.org " +{% endif %} + +EXPOSE 8080 +EXPOSE 8443 + +{% if spec.extra_install %} +RUN {{ spec.extra_install }} + INSTALL_PKGS="{{ spec.pkgs }}" && \ + {{ spec.pkg_manager }} install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \ + httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ +{% if spec.pkg_clean %} + {{ spec.pkg_clean }} +{% else %} + {{ spec.pkg_manager }} -y clean all --enablerepo='*' +{% endif %} +{% elif spec.pkg_verify %} +RUN {% if spec.module_enable %}{{ spec.module_enable }} + {% endif %}{% if spec.var_style == "dollar" %} INSTALL_PKGS="{{ spec.pkgs }}" && \ + {{ spec.pkg_manager }} install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ + rpm -V $INSTALL_PKGS && \ + httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ +{% else %}INSTALL_PKGS="{{ spec.pkgs }}" && \ + {{ spec.pkg_manager }} install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \ + rpm -V ${INSTALL_PKGS} && \ + httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ +{% endif %} + {{ spec.pkg_manager }} -y clean all --enablerepo='*' +{% else %} +RUN INSTALL_PKGS="{{ spec.pkgs }}" && \ + {{ spec.pkg_manager }} install -y --setopt=tsflags=nodocs ${INSTALL_PKGS} && \ + httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ + {{ spec.pkg_manager }} -y clean all --enablerepo='*' +{% endif %} + +ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ + HTTPD_APP_ROOT=${APP_ROOT} \ + HTTPD_CONFIGURATION_PATH=${APP_ROOT}/etc/httpd.d \ + HTTPD_MAIN_CONF_PATH=/etc/httpd/conf \ + HTTPD_MAIN_CONF_MODULES_D_PATH=/etc/httpd/conf.modules.d \ + HTTPD_MAIN_CONF_D_PATH=/etc/httpd/conf.d \ + HTTPD_TLS_CERT_PATH=/etc/httpd/tls \ + HTTPD_VAR_RUN=/var/run/httpd \ + HTTPD_DATA_PATH=/var/www \ + HTTPD_DATA_ORIG_PATH=/var/www \ + HTTPD_LOG_PATH=/var/log/httpd + +{% if spec.copy_version %} +COPY {{ spec.copy_version }}/s2i/bin/ $STI_SCRIPTS_PATH +COPY {{ spec.copy_version }}/root / +{% else %} +COPY ${HTTPD_VERSION}/s2i/bin/ ${STI_SCRIPTS_PATH} +COPY ${HTTPD_VERSION}/root / +{% endif %} + +{% if spec.fedora_specific %} +# Generate SSL certs and reset permissions of filesystem to default values +# Reset permissions of filesystem to default values +{% else %} +# Reset permissions of filesystem to default values +{% endif %} +RUN /usr/libexec/httpd-prepare && rpm-file-permissions + +USER 1001 + +# Not using VOLUME statement since it's not working in OpenShift Online: +# https://github.com/sclorg/httpd-container/issues/30 +# VOLUME ["${HTTPD_DATA_PATH}"] +# VOLUME ["${HTTPD_LOG_PATH}"] + +CMD ["/usr/bin/run-httpd"] diff --git a/2.4-micro/Dockerfile.c8s b/src/Dockerfile.micro similarity index 57% rename from 2.4-micro/Dockerfile.c8s rename to src/Dockerfile.micro index 40f0d05c..f84fd2b8 100644 --- a/2.4-micro/Dockerfile.c8s +++ b/src/Dockerfile.micro @@ -1,10 +1,13 @@ -FROM quay.io/centos/centos:stream8 AS build +FROM {{ spec.micro_build_base }} AS build RUN mkdir -p /mnt/rootfs -RUN dnf -y module enable httpd:2.4 && \ - MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ - INSTALL_PKGS="$MICRO_PKGS httpd mod_ssl findutils hostname nss_wrapper redhat-logos-httpd" && \ - dnf install --installroot /mnt/rootfs $INSTALL_PKGS --releasever 8 --setopt install_weak_deps=false --nodocs -y && \ +RUN MICRO_PKGS="coreutils-single glibc-minimal-langpack" && \ + INSTALL_PKGS="${MICRO_PKGS} {{ spec.micro_pkgs }}" && \ +{% if spec.micro_use_host_config %} + dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever {{ spec.micro_releasever }} --use-host-config --setopt install_weak_deps=false --nodocs -y && \ +{% else %} + dnf install --installroot /mnt/rootfs ${INSTALL_PKGS} --releasever {{ spec.micro_releasever }} --setopt install_weak_deps=false --nodocs -y && \ +{% endif %} dnf -y --installroot /mnt/rootfs clean all && \ rm -rf /mnt/rootfs/var/cache/* /mnt/rootfs/var/log/dnf* /mnt/rootfs/var/log/yum.* @@ -17,10 +20,12 @@ FROM scratch # Environment: # * $HTTPD_LOG_TO_VOLUME (optional) - When set, httpd will log into /var/log/httpd24 -ENV HTTPD_VERSION=2.4 +ENV HTTPD_VERSION={{ spec.version }} \ + HTTPD_SHORT_VERSION={{ spec.short }} \ + NAME=httpd -ENV SUMMARY="Platform for running Apache httpd $HTTPD_VERSION or building httpd-based application" \ - DESCRIPTION="Apache httpd $HTTPD_VERSION available as container, is a powerful, efficient, \ +ENV SUMMARY="Platform for running Apache httpd ${HTTPD_VERSION} or building httpd-based application" \ + DESCRIPTION="Apache httpd ${HTTPD_VERSION} available as container, is a powerful, efficient, \ and extensible web server. Apache supports a variety of features, many implemented as compiled modules \ which extend the core functionality. \ These can range from server-side programming language support to authentication schemes. \ @@ -29,17 +34,17 @@ Virtual hosting allows one Apache installation to serve many different Web sites STI_SCRIPTS_PATH=/usr/libexec/s2i \ APP_ROOT=/opt/app-root \ HOME=/opt/app-root/src \ - PLATFORM="el8" + PLATFORM="{{ spec.micro_platform }}" -LABEL summary="$SUMMARY" \ - description="$DESCRIPTION" \ - io.k8s.description="$DESCRIPTION" \ - io.k8s.display-name="Apache httpd $HTTPD_VERSION" \ +LABEL summary="${SUMMARY}" \ + description="${DESCRIPTION}" \ + io.k8s.description="${DESCRIPTION}" \ + io.k8s.display-name="Apache httpd ${HTTPD_VERSION}" \ io.openshift.expose-services="8080:http,8443:https" \ - io.openshift.tags="builder,httpd,httpd-24" \ - name="sclorg/httpd-24-micro-c8s" \ + io.openshift.tags="builder,${NAME},${NAME}-${HTTPD_SHORT_VERSION}" \ + name="{{ spec.micro_img_name }}" \ version="1" \ - usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ sclorg/httpd-24-micro-c8s sample-server" \ + usage="s2i build https://github.com/sclorg/httpd-container.git --context-dir=examples/sample-test-app/ {{ spec.micro_img_name }} sample-server" \ maintainer="SoftwareCollections.org " EXPOSE 8080 @@ -59,16 +64,15 @@ ENV HTTPD_CONTAINER_SCRIPTS_PATH=/usr/share/container-scripts/httpd/ \ HTTPD_DATA_ORIG_PATH=/var/www \ HTTPD_LOG_PATH=/var/log/httpd -COPY 2.4-micro/s2i/bin/ $STI_SCRIPTS_PATH -COPY 2.4-micro/root / -COPY 2.4-micro/core-scripts/usr /usr +COPY {{ spec.version }}{{ spec.suffix }}/s2i/bin/ ${STI_SCRIPTS_PATH} +COPY {{ spec.version }}{{ spec.suffix }}/root / +COPY {{ spec.version }}{{ spec.suffix }}/core-scripts/usr /usr WORKDIR ${HOME} -# Add default user and prepare httpd RUN useradd -u 1001 -r -g 0 -d ${HOME} -c "Default Application User" default && \ chown -R 1001:0 ${APP_ROOT} && \ - httpd -v | grep -qe "Apache/$HTTPD_VERSION" && echo "Found VERSION $HTTPD_VERSION" && \ + httpd -v | grep -qe "Apache/${HTTPD_VERSION}" && echo "Found VERSION ${HTTPD_VERSION}" && \ /usr/libexec/httpd-prepare USER 1001 diff --git a/src/README.md b/src/README.md new file mode 120000 index 00000000..299cf2b6 --- /dev/null +++ b/src/README.md @@ -0,0 +1 @@ +root/usr/share/container-scripts/httpd/README.md \ No newline at end of file diff --git a/2.4/root/usr/share/container-scripts/httpd/README.md b/src/root/README.md similarity index 100% rename from 2.4/root/usr/share/container-scripts/httpd/README.md rename to src/root/README.md diff --git a/2.4-micro/root/usr/bin/run-httpd b/src/root/usr/bin/run-httpd similarity index 100% rename from 2.4-micro/root/usr/bin/run-httpd rename to src/root/usr/bin/run-httpd diff --git a/2.4-micro/root/usr/libexec/httpd-prepare b/src/root/usr/libexec/httpd-prepare similarity index 100% rename from 2.4-micro/root/usr/libexec/httpd-prepare rename to src/root/usr/libexec/httpd-prepare diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/README.md b/src/root/usr/share/container-scripts/httpd/README.md similarity index 89% rename from 2.4-micro/root/usr/share/container-scripts/httpd/README.md rename to src/root/usr/share/container-scripts/httpd/README.md index cc608a93..318b2854 100644 --- a/2.4-micro/root/usr/share/container-scripts/httpd/README.md +++ b/src/root/usr/share/container-scripts/httpd/README.md @@ -1,8 +1,8 @@ -Apache HTTP Server 2.4 Micro Container Image -========================================== +Apache HTTP Server 2.4 Container Image +====================================== This container image includes Apache HTTP Server 2.4 for OpenShift and general usage. -Users can choose between RHEL, CentOS Stream and Fedora based images. +Users can choose between RHEL, CentOS and Fedora based images. The RHEL images are available in the [Red Hat Container Catalog](https://access.redhat.com/containers/), the CentOS Stream images are available on [Quay.io](https://quay.io/organization/sclorg), and the Fedora images are available in [Fedora Registry](https://registry.fedoraproject.org/). @@ -13,22 +13,20 @@ Note: while the examples in this README are calling `podman`, you can replace an Description ----------- -Apache HTTP Server 2.4 available as a micro-sized container, is a powerful, efficient, +Apache HTTP Server 2.4 available as container, is a powerful, efficient, and extensible web server. Apache supports a variety of features, many implemented as compiled modules which extend the core functionality. These can range from server-side programming language support to authentication schemes. Virtual hosting allows one Apache installation to serve many different Web sites." -Do note that this micro-sized image is optimized for size. As a result of this there is no DNF, YUM, RPM, or any other package manager application. -If you need to install packages inside the image, please use the full sized image instead. Usage in OpenShift ------------------ -In this example, we assume that you are using the `quay.io/sclorg/httpd-24-micro-c9s` image, available through the `httpd:2.4-micro-el9` imagestream tag in Openshift. +In this example, we assume that you are using the `rhel10/httpd-24` image, available through the `openshift/httpd:2.4-el10` imagestream tag in Openshift. To build a simple [httpd-sample-app](https://github.com/sclorg/httpd-ex.git) application in Openshift: ``` -oc new-app httpd:24-micro~https://github.com/sclorg/httpd-ex.git +oc new-app openshift/httpd:2.4-el10~https://github.com/sclorg/httpd-ex.git ``` To access the application: @@ -76,7 +74,7 @@ To use the httpd image in a Dockerfile, follow these steps: #### 1. Pull a base builder image to build on ``` -podman pull quay.io/sclorg/httpd-24-micro-c9s +podman pull rhel10/httpd-24 ``` #### 2. Pull an application code @@ -99,7 +97,7 @@ For all these three parts, you can either set up all manually and use the `httpd ##### 3.1. To use your own setup, create a Dockerfile with this content: ``` -FROM quay.io/sclorg/httpd-24-micro-c9s +FROM registry.redhat.io/rhel10/httpd-24 # Add application sources ADD app-src/index.html /var/www/html/index.html @@ -110,7 +108,7 @@ CMD run-httpd ##### 3.2. To use the Source-to-Image scripts and build an image using a Dockerfile, create a Dockerfile with this content: ``` -FROM quay.io/sclorg/httpd-24-micro-c9s +FROM registry.redhat.io/rhel10/httpd-24 # Add application sources to a directory where the assemble script expects them # and set permissions so that the container runs without the root access @@ -155,7 +153,7 @@ If you want to run the image directly and mount the static pages available in th as a container volume, execute the following command: ``` -$ podman run -d --name httpd -p 8080:8080 -v /wwwdata:/var/www:Z quay.io/sclorg/httpd-24-micro-c9s +$ podman run -d --name httpd -p 8080:8080 -v /wwwdata:/var/www:Z rhel10/httpd-24 ``` This creates a container named `httpd` running the Apache HTTP Server, serving data from @@ -179,13 +177,13 @@ If you want to run the image and mount the log files into `/wwwlogs` on the host as a container volume, execute the following command: ``` -$ podman run -d -u 0 -e HTTPD_LOG_TO_VOLUME=1 --name httpd -v /wwwlogs:/var/log/httpd24:Z quay.io/sclorg/httpd-24-micro-c9s +$ podman run -d -u 0 -e HTTPD_LOG_TO_VOLUME=1 --name httpd -v /wwwlogs:/var/log/httpd24:Z rhel10/httpd-24 ``` To run an image using the `event` MPM (rather than the default `prefork`), execute the following command: ``` -$ podman run -d -e HTTPD_MPM=event --name httpd quay.io/sclorg/httpd-24-micro-c9s +$ podman run -d -e HTTPD_MPM=event --name httpd rhel10/httpd-24 ``` You can also set the following mount points by passing the `-v /host:/container` flag to podman. @@ -228,7 +226,7 @@ By default, Apache HTTP Server container runs as UID 1001. That means the volume To run the container as a different UID, use `-u` option. For example if you want to run the container as UID 1234, execute the following command: ``` -podman run -d -u 1234 quay.io/sclorg/httpd-24-micro-c9s +podman run -d -u 1234 rhel10/httpd-24 ``` To log into a volume mounted directory, the container needs to be run as UID 0 (see above). @@ -245,6 +243,9 @@ See also -------- Dockerfile and other sources for this container image are available on https://github.com/sclorg/httpd-container. -In that repository, the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, +In that repository, the Dockerfile for RHEL8 is called Dockerfile.rhel8, +the Dockerfile for RHEL9 is called Dockerfile.rhel9, +the Dockerfile for RHEL10 is called Dockerfile.rhel10, +the Dockerfile for CentOS Stream 9 is called Dockerfile.c9s, the Dockerfile for CentOS Stream 10 is called Dockerfile.c10s, and the Dockerfile for Fedora is called Dockerfile.fedora. diff --git a/2.4/root/usr/share/container-scripts/httpd/common.sh b/src/root/usr/share/container-scripts/httpd/common.sh similarity index 100% rename from 2.4/root/usr/share/container-scripts/httpd/common.sh rename to src/root/usr/share/container-scripts/httpd/common.sh diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/passwd.template b/src/root/usr/share/container-scripts/httpd/passwd.template similarity index 100% rename from 2.4-micro/root/usr/share/container-scripts/httpd/passwd.template rename to src/root/usr/share/container-scripts/httpd/passwd.template diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh b/src/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh similarity index 100% rename from 2.4-micro/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh rename to src/root/usr/share/container-scripts/httpd/post-assemble/20-copy-config.sh diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh b/src/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh similarity index 100% rename from 2.4-micro/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh rename to src/root/usr/share/container-scripts/httpd/post-assemble/40-ssl-certs.sh diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh b/src/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh similarity index 100% rename from 2.4-micro/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh rename to src/root/usr/share/container-scripts/httpd/pre-init/10-set-mpm.sh diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh b/src/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh similarity index 100% rename from 2.4-micro/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh rename to src/root/usr/share/container-scripts/httpd/pre-init/20-copy-config.sh diff --git a/2.4-micro/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh b/src/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh similarity index 100% rename from 2.4-micro/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh rename to src/root/usr/share/container-scripts/httpd/pre-init/40-ssl-certs.sh diff --git a/2.4-micro/s2i/bin/assemble b/src/s2i/bin/assemble similarity index 100% rename from 2.4-micro/s2i/bin/assemble rename to src/s2i/bin/assemble diff --git a/2.4-micro/s2i/bin/run b/src/s2i/bin/run similarity index 100% rename from 2.4-micro/s2i/bin/run rename to src/s2i/bin/run diff --git a/2.4-micro/s2i/bin/usage b/src/s2i/bin/usage similarity index 100% rename from 2.4-micro/s2i/bin/usage rename to src/s2i/bin/usage diff --git a/test/examples b/test/examples new file mode 120000 index 00000000..a6573af9 --- /dev/null +++ b/test/examples @@ -0,0 +1 @@ +../examples \ No newline at end of file diff --git a/2.4-micro/test/pre-init-test-app/httpd-pre-init/modify_index.sh b/test/pre-init-test-app/httpd-pre-init/modify_index.sh old mode 100644 new mode 100755 similarity index 100% rename from 2.4-micro/test/pre-init-test-app/httpd-pre-init/modify_index.sh rename to test/pre-init-test-app/httpd-pre-init/modify_index.sh diff --git a/2.4-micro/test/pre-init-test-app/index.html b/test/pre-init-test-app/index.html similarity index 100% rename from 2.4-micro/test/pre-init-test-app/index.html rename to test/pre-init-test-app/index.html diff --git a/test/run-openshift-remote-cluster b/test/run-openshift-remote-cluster new file mode 100755 index 00000000..1bffcba8 --- /dev/null +++ b/test/run-openshift-remote-cluster @@ -0,0 +1 @@ +../../test/run-openshift-remote-cluster \ No newline at end of file diff --git a/test/self-signed-ssl b/test/self-signed-ssl new file mode 120000 index 00000000..a6487d70 --- /dev/null +++ b/test/self-signed-ssl @@ -0,0 +1 @@ +../examples/self-signed-ssl \ No newline at end of file diff --git a/test/test-lib-httpd.sh b/test/test-lib-httpd.sh new file mode 100755 index 00000000..2b24e986 --- /dev/null +++ b/test/test-lib-httpd.sh @@ -0,0 +1 @@ +../../test/test-lib-httpd.sh \ No newline at end of file diff --git a/test/test-lib-openshift.sh b/test/test-lib-openshift.sh new file mode 100755 index 00000000..4f9f2996 --- /dev/null +++ b/test/test-lib-openshift.sh @@ -0,0 +1 @@ +../../common/test-lib-openshift.sh \ No newline at end of file diff --git a/test/test-lib-remote-openshift.sh b/test/test-lib-remote-openshift.sh new file mode 100755 index 00000000..92ad2f4d --- /dev/null +++ b/test/test-lib-remote-openshift.sh @@ -0,0 +1 @@ +../../common/test-lib-remote-openshift.sh \ No newline at end of file diff --git a/test/test-openshift.yaml b/test/test-openshift.yaml new file mode 100644 index 00000000..8613fbba --- /dev/null +++ b/test/test-openshift.yaml @@ -0,0 +1 @@ +../../common/test-openshift.yaml \ No newline at end of file diff --git a/2.4-micro/test/utils.sh b/test/utils.sh old mode 100755 new mode 100644 similarity index 100% rename from 2.4-micro/test/utils.sh rename to test/utils.sh