From 131e2839a372d4116bab09da13f781c53ab1b610 Mon Sep 17 00:00:00 2001 From: XebiaLabsCI Date: Wed, 14 Aug 2024 17:42:48 +0200 Subject: [PATCH] Update Dockerfiles to version 24.1.6 --- xl-deploy/24.1/amazonlinux/Dockerfile | 23 ++- xl-deploy/24.1/amazonlinux/Dockerfile.slim | 179 +++++++++++++++++++ xl-deploy/24.1/centos/Dockerfile | 25 +-- xl-deploy/24.1/centos/Dockerfile.slim | 182 ++++++++++++++++++++ xl-deploy/24.1/debian-slim/Dockerfile | 23 ++- xl-deploy/24.1/debian-slim/Dockerfile.slim | 185 ++++++++++++++++++++ xl-deploy/24.1/redhat/Dockerfile | 23 ++- xl-deploy/24.1/redhat/Dockerfile.slim | 191 +++++++++++++++++++++ xl-deploy/24.1/rhel/Dockerfile | 23 ++- xl-deploy/24.1/rhel/Dockerfile.slim | 183 ++++++++++++++++++++ xl-deploy/24.1/ubuntu/Dockerfile | 23 ++- xl-deploy/24.1/ubuntu/Dockerfile.slim | 181 +++++++++++++++++++ 12 files changed, 1186 insertions(+), 55 deletions(-) create mode 100644 xl-deploy/24.1/amazonlinux/Dockerfile.slim create mode 100644 xl-deploy/24.1/centos/Dockerfile.slim create mode 100644 xl-deploy/24.1/debian-slim/Dockerfile.slim create mode 100644 xl-deploy/24.1/redhat/Dockerfile.slim create mode 100644 xl-deploy/24.1/rhel/Dockerfile.slim create mode 100644 xl-deploy/24.1/ubuntu/Dockerfile.slim diff --git a/xl-deploy/24.1/amazonlinux/Dockerfile b/xl-deploy/24.1/amazonlinux/Dockerfile index 86afcda73..64af129cf 100644 --- a/xl-deploy/24.1/amazonlinux/Dockerfile +++ b/xl-deploy/24.1/amazonlinux/Dockerfile @@ -12,24 +12,29 @@ ENV APP_ROOT=/opt/xebialabs \ APP_HOME=/opt/xebialabs/xl-deploy-server # Install xl-deploy from zip file -COPY resources/xl-deploy-24.1.4-server.zip /tmp +COPY resources/xl-deploy-24.1.6-server.zip /tmp RUN mkdir -p ${APP_ROOT} && \ - unzip /tmp/xl-deploy-24.1.4-server.zip -d ${APP_ROOT} && \ - mv ${APP_ROOT}/xl-deploy-24.1.4-server ${APP_HOME} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ rm -fr ${APP_HOME}/serviceWrapper/ && \ rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ true +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq + # Add bin/run-in-container.sh -COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/run-in-container.sh # Add jmx-exporter for prometheus COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ # Add (and run) Database driver download script -COPY resources/bin/db-drivers.sh /tmp -RUN chmod ugo+x /tmp/db-drivers.sh && \ - /bin/sh /tmp/db-drivers.sh && \ +COPY resources/bin/drivers.sh /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ # Modify bin/run.sh so that java becomes a child process of dumb-init sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh @@ -78,7 +83,7 @@ FROM amazonlinux:2 LABEL name="xebialabs/xl-deploy" \ vendor="Digital.ai" \ - version="24.1.4" \ + version="24.1.6" \ release="1" \ summary="XL Deploy" \ description="Enterprise-scale Application Release Automation for any environment" \ @@ -159,7 +164,7 @@ ENV SERVER_PORT=8180 \ USER 10001 -VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] EXPOSE ${APP_PORT} diff --git a/xl-deploy/24.1/amazonlinux/Dockerfile.slim b/xl-deploy/24.1/amazonlinux/Dockerfile.slim new file mode 100644 index 000000000..647362cff --- /dev/null +++ b/xl-deploy/24.1/amazonlinux/Dockerfile.slim @@ -0,0 +1,179 @@ +FROM alpine:3.16 as installer + +# Install dependencies +RUN apk update +RUN apk add --no-cache gawk unzip curl busybox-extras + + + + +# Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + +# Install xl-deploy from zip file +COPY resources/xl-deploy-24.1.6-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ + rm -fr ${APP_HOME}/serviceWrapper/ && \ + rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ + true + +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq +# Remove bundled drivers if slim +RUN rm ${APP_HOME}/lib/derby*.jar && \ + rm -fr ${APP_HOME}/derbyns/ && \ + true + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh.slim ${APP_HOME}/bin/run-in-container.sh + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Add (and run) Database driver download script +COPY resources/bin/drivers.sh.slim /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ + # Modify bin/run.sh so that java becomes a child process of dumb-init + sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh + + + +# Move and augment conf directory of regular install to default-conf so that when no external config is loaded we can use default +RUN mv ${APP_HOME}/conf ${APP_HOME}/default-conf && \ + mkdir ${APP_HOME}/conf +COPY resources/default-conf ${APP_HOME}/default-conf +COPY resources/jmx-exporter/jmx-exporter.yaml ${APP_HOME}/default-conf/ +RUN mv ${APP_HOME}/default-conf/boot.conf.cloud.template ${APP_HOME}/default-conf/deployit.conf.template + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf + + + +# Modify conf/xld-wrapper.conf.common to add node-conf to the classpath and to add container-specific VM options +# ${APP_HOME}/node-conf will have first priority in classpath +COPY resources/modify-wrapper-linux-conf.gawk /tmp +RUN chmod +x /tmp/modify-wrapper-linux-conf.gawk && \ + /tmp/modify-wrapper-linux-conf.gawk ${APP_HOME}/default-conf/xld-wrapper.conf.common > /tmp/xld-wrapper.conf.common && \ + mv /tmp/xld-wrapper.conf.common ${APP_HOME}/default-conf/xld-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk && \ + # Create node-specific conf directory and add template for node-specific xl-deploy.conf file + # The node-specific xl-deploy.conf file provides HOSTNAME, HOSTNAME_SUFFIX & XL_NODE_NAME to the instance, which are then merged with the + # ${APP_HOME}/conf/xl-deploy.conf file by the xl-platform + mkdir ${APP_HOME}/node-conf +COPY resources/node-conf ${APP_HOME}/node-conf + +# Move plugins directory to default-plugins, so that when no external plugins are loaded we can use the default +RUN mv ${APP_HOME}/plugins ${APP_HOME}/default-plugins && \ + mkdir ${APP_HOME}/plugins && \ + # Create empty 'repository', 'work', 'export', 'archive' and 'reports' directory + mkdir ${APP_HOME}/repository ${APP_HOME}/export ${APP_HOME}/archive ${APP_HOME}/work ${APP_HOME}/reports + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh + + +FROM amazonlinux:2 + + +LABEL name="xebialabs/xl-deploy" \ + vendor="Digital.ai" \ + version="24.1.6" \ + release="1" \ + summary="XL Deploy" \ + description="Enterprise-scale Application Release Automation for any environment" \ + url="https://digital.ai/products/deploy/" + + + # Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + + +# Install dependencies +RUN yum update -y && \ + yum install -y java-17-amazon-corretto curl jq shadow-utils.x86_64 hostname unzip which telnet && \ + yum clean all -q + +# Copy installed XL Deploy +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=amazonlinux + + + # install Terraform +ENV TERRAFORM_VERSION=0.11.13 + +RUN curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \ + unzip /tmp/terraform.zip -d /usr/local/bin && \ + rm -f /tmp/terraform.zip + + + +# Set ttl for DNS cache +RUN echo $'\n#\n# Set TTL for DNS cache.\nnetworkaddress.cache.ttl=30' >> $(readlink -f `which java` | sed -e 's:/jre/bin/java::' -e 's:/bin/java::')/conf/security/java.security + +COPY resources/amd64/tini ${APP_ROOT} +RUN chmod ugo+x ${APP_ROOT}/tini + +# Add xebialabs user but do not switch to it +RUN groupadd -r -g 10001 xebialabs && \ + useradd -r -u 10001 -g 0 -G xebialabs xebialabs + +WORKDIR ${APP_HOME} + +ENV SERVER_PORT=8180 \ + XL_CLUSTER_MODE=default \ + XL_DB_URL=jdbc:derby:repository/db;create=true \ + XL_DB_USERNAME=sa \ + XL_DB_PASSWORD=123 \ + XL_DB_MAX_POOL_SIZE=10 \ + XL_REPORT_DB_URL=jdbc:derby:repository/db-report;create=true \ + XL_REPORT_DB_USERNAME=sa \ + XL_REPORT_DB_PASSWORD=123 \ + XL_REPORT_DB_MAX_POOL_SIZE=10 \ + XL_METRICS_ENABLED=false \ + XLD_IN_PROCESS=true \ + XLD_TASK_QUEUE_NAME=xld-tasks-queue \ + XLD_TASK_QUEUE_IN_PROCESS_MAX_DISK_USAGE=100 \ + XLD_TASK_QUEUE_IN_PROCESS_SHUTDOWN_TIMEOUT=60000 \ + XLD_TASK_QUEUE_DRIVER_CLASS_NAME= \ + XLD_TASK_QUEUE_URL= \ + XLD_TASK_QUEUE_USERNAME= \ + XLD_TASK_QUEUE_PASSWORD= \ + XLD_TASK_QUEUE_IS_QUORUM=false \ + HOSTNAME_SUFFIX= \ + XL_LICENSE_KIND=byol \ + GENERATE_XL_CONFIG=true \ + USE_IP_AS_HOSTNAME=false \ + ENABLE_SATELLITE=false \ + PLUGIN_SOURCE=database \ + USE_EXTERNAL_CENTRAL_CONFIG=false \ + CENTRAL_CONFIG_URL= \ + CENTRAL_CONFIG_ENCRYPT_KEY= \ + USE_CACHE=false \ + LOGBACK_GLOBAL_LOGGING_LEVEL=info \ + LOGBACK_SCAN_ENABLED=true \ + LOGBACK_SCAN_PERIOD=30seconds + + +USER 10001 + +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] + +EXPOSE ${APP_PORT} + +# Environment variables are not expanded when using the exec form of the ENTRYPOINT command. They are +# expanded when using the shell form, but that results in tini running with a PID higher than 1. + + +ENTRYPOINT ["/opt/xebialabs/tini", "--", "/opt/xebialabs/xl-deploy-server/bin/run-in-container.sh"] diff --git a/xl-deploy/24.1/centos/Dockerfile b/xl-deploy/24.1/centos/Dockerfile index fcda23bd6..93c3286ee 100644 --- a/xl-deploy/24.1/centos/Dockerfile +++ b/xl-deploy/24.1/centos/Dockerfile @@ -12,24 +12,29 @@ ENV APP_ROOT=/opt/xebialabs \ APP_HOME=/opt/xebialabs/xl-deploy-server # Install xl-deploy from zip file -COPY resources/xl-deploy-24.1.4-server.zip /tmp +COPY resources/xl-deploy-24.1.6-server.zip /tmp RUN mkdir -p ${APP_ROOT} && \ - unzip /tmp/xl-deploy-24.1.4-server.zip -d ${APP_ROOT} && \ - mv ${APP_ROOT}/xl-deploy-24.1.4-server ${APP_HOME} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ rm -fr ${APP_HOME}/serviceWrapper/ && \ rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ true +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq + # Add bin/run-in-container.sh -COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/run-in-container.sh # Add jmx-exporter for prometheus COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ # Add (and run) Database driver download script -COPY resources/bin/db-drivers.sh /tmp -RUN chmod ugo+x /tmp/db-drivers.sh && \ - /bin/sh /tmp/db-drivers.sh && \ +COPY resources/bin/drivers.sh /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ # Modify bin/run.sh so that java becomes a child process of dumb-init sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh @@ -73,12 +78,12 @@ RUN chgrp -R 0 ${APP_ROOT} && \ chmod ugo+x ${APP_HOME}/bin/*.sh -FROM centos:7 +FROM xebialabs/xl-centos:7-patch-v2.0 LABEL name="xebialabs/xl-deploy" \ vendor="Digital.ai" \ - version="24.1.4" \ + version="24.1.6" \ release="1" \ summary="XL Deploy" \ description="Enterprise-scale Application Release Automation for any environment" \ @@ -162,7 +167,7 @@ ENV SERVER_PORT=8180 \ USER 10001 -VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] EXPOSE ${APP_PORT} diff --git a/xl-deploy/24.1/centos/Dockerfile.slim b/xl-deploy/24.1/centos/Dockerfile.slim new file mode 100644 index 000000000..cf6155f0f --- /dev/null +++ b/xl-deploy/24.1/centos/Dockerfile.slim @@ -0,0 +1,182 @@ +FROM alpine:3.16 as installer + +# Install dependencies +RUN apk update +RUN apk add --no-cache gawk unzip curl busybox-extras + + + + +# Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + +# Install xl-deploy from zip file +COPY resources/xl-deploy-24.1.6-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ + rm -fr ${APP_HOME}/serviceWrapper/ && \ + rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ + true + +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq +# Remove bundled drivers if slim +RUN rm ${APP_HOME}/lib/derby*.jar && \ + rm -fr ${APP_HOME}/derbyns/ && \ + true + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh.slim ${APP_HOME}/bin/run-in-container.sh + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Add (and run) Database driver download script +COPY resources/bin/drivers.sh.slim /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ + # Modify bin/run.sh so that java becomes a child process of dumb-init + sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh + + + +# Move and augment conf directory of regular install to default-conf so that when no external config is loaded we can use default +RUN mv ${APP_HOME}/conf ${APP_HOME}/default-conf && \ + mkdir ${APP_HOME}/conf +COPY resources/default-conf ${APP_HOME}/default-conf +COPY resources/jmx-exporter/jmx-exporter.yaml ${APP_HOME}/default-conf/ +RUN mv ${APP_HOME}/default-conf/boot.conf.cloud.template ${APP_HOME}/default-conf/deployit.conf.template + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf + + + +# Modify conf/xld-wrapper.conf.common to add node-conf to the classpath and to add container-specific VM options +# ${APP_HOME}/node-conf will have first priority in classpath +COPY resources/modify-wrapper-linux-conf.gawk /tmp +RUN chmod +x /tmp/modify-wrapper-linux-conf.gawk && \ + /tmp/modify-wrapper-linux-conf.gawk ${APP_HOME}/default-conf/xld-wrapper.conf.common > /tmp/xld-wrapper.conf.common && \ + mv /tmp/xld-wrapper.conf.common ${APP_HOME}/default-conf/xld-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk && \ + # Create node-specific conf directory and add template for node-specific xl-deploy.conf file + # The node-specific xl-deploy.conf file provides HOSTNAME, HOSTNAME_SUFFIX & XL_NODE_NAME to the instance, which are then merged with the + # ${APP_HOME}/conf/xl-deploy.conf file by the xl-platform + mkdir ${APP_HOME}/node-conf +COPY resources/node-conf ${APP_HOME}/node-conf + +# Move plugins directory to default-plugins, so that when no external plugins are loaded we can use the default +RUN mv ${APP_HOME}/plugins ${APP_HOME}/default-plugins && \ + mkdir ${APP_HOME}/plugins && \ + # Create empty 'repository', 'work', 'export', 'archive' and 'reports' directory + mkdir ${APP_HOME}/repository ${APP_HOME}/export ${APP_HOME}/archive ${APP_HOME}/work ${APP_HOME}/reports + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh + + +FROM xebialabs/xl-centos:7-patch-v2.0 + + +LABEL name="xebialabs/xl-deploy" \ + vendor="Digital.ai" \ + version="24.1.6" \ + release="1" \ + summary="XL Deploy" \ + description="Enterprise-scale Application Release Automation for any environment" \ + url="https://digital.ai/products/deploy/" + + + # Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + + +# Install dependencies +#RUN yum update -y && \ +RUN yum install -y epel-release telnet && \ + yum install -y curl jq unzip which && \ + curl https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm --output jdk-17_linux-x64_bin.rpm && \ + yum -y install ./jdk-17_linux-x64_bin.rpm && \ + yum clean all -q + +# Copy installed XL Deploy +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=centos + + + # install Terraform +ENV TERRAFORM_VERSION=0.11.13 + +RUN curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \ + unzip /tmp/terraform.zip -d /usr/local/bin && \ + rm -f /tmp/terraform.zip + + + +# Set ttl for DNS cache +RUN echo $'\n#\n# Set TTL for DNS cache.\nnetworkaddress.cache.ttl=30' >> $(readlink -f `which java` | sed -e 's:/jre/bin/java::' -e 's:/bin/java::')/conf/security/java.security + +COPY resources/amd64/tini ${APP_ROOT} +RUN chmod ugo+x ${APP_ROOT}/tini + +# Add xebialabs user but do not switch to it +RUN groupadd -r -g 10001 xebialabs && \ + useradd -r -u 10001 -g 0 -G xebialabs xebialabs + +WORKDIR ${APP_HOME} + +ENV SERVER_PORT=8180 \ + XL_CLUSTER_MODE=default \ + XL_DB_URL=jdbc:derby:repository/db;create=true \ + XL_DB_USERNAME=sa \ + XL_DB_PASSWORD=123 \ + XL_DB_MAX_POOL_SIZE=10 \ + XL_REPORT_DB_URL=jdbc:derby:repository/db-report;create=true \ + XL_REPORT_DB_USERNAME=sa \ + XL_REPORT_DB_PASSWORD=123 \ + XL_REPORT_DB_MAX_POOL_SIZE=10 \ + XL_METRICS_ENABLED=false \ + XLD_IN_PROCESS=true \ + XLD_TASK_QUEUE_NAME=xld-tasks-queue \ + XLD_TASK_QUEUE_IN_PROCESS_MAX_DISK_USAGE=100 \ + XLD_TASK_QUEUE_IN_PROCESS_SHUTDOWN_TIMEOUT=60000 \ + XLD_TASK_QUEUE_DRIVER_CLASS_NAME= \ + XLD_TASK_QUEUE_URL= \ + XLD_TASK_QUEUE_USERNAME= \ + XLD_TASK_QUEUE_PASSWORD= \ + XLD_TASK_QUEUE_IS_QUORUM=false \ + HOSTNAME_SUFFIX= \ + XL_LICENSE_KIND=byol \ + GENERATE_XL_CONFIG=true \ + USE_IP_AS_HOSTNAME=false \ + ENABLE_SATELLITE=false \ + PLUGIN_SOURCE=database \ + USE_EXTERNAL_CENTRAL_CONFIG=false \ + CENTRAL_CONFIG_URL= \ + CENTRAL_CONFIG_ENCRYPT_KEY= \ + USE_CACHE=false \ + LOGBACK_GLOBAL_LOGGING_LEVEL=info \ + LOGBACK_SCAN_ENABLED=true \ + LOGBACK_SCAN_PERIOD=30seconds + + +USER 10001 + +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] + +EXPOSE ${APP_PORT} + +# Environment variables are not expanded when using the exec form of the ENTRYPOINT command. They are +# expanded when using the shell form, but that results in tini running with a PID higher than 1. + + +ENTRYPOINT ["/opt/xebialabs/tini", "--", "/opt/xebialabs/xl-deploy-server/bin/run-in-container.sh"] diff --git a/xl-deploy/24.1/debian-slim/Dockerfile b/xl-deploy/24.1/debian-slim/Dockerfile index c6381e5db..06ae9de8f 100644 --- a/xl-deploy/24.1/debian-slim/Dockerfile +++ b/xl-deploy/24.1/debian-slim/Dockerfile @@ -12,24 +12,29 @@ ENV APP_ROOT=/opt/xebialabs \ APP_HOME=/opt/xebialabs/xl-deploy-server # Install xl-deploy from zip file -COPY resources/xl-deploy-24.1.4-server.zip /tmp +COPY resources/xl-deploy-24.1.6-server.zip /tmp RUN mkdir -p ${APP_ROOT} && \ - unzip /tmp/xl-deploy-24.1.4-server.zip -d ${APP_ROOT} && \ - mv ${APP_ROOT}/xl-deploy-24.1.4-server ${APP_HOME} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ rm -fr ${APP_HOME}/serviceWrapper/ && \ rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ true +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq + # Add bin/run-in-container.sh -COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/run-in-container.sh # Add jmx-exporter for prometheus COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ # Add (and run) Database driver download script -COPY resources/bin/db-drivers.sh /tmp -RUN chmod ugo+x /tmp/db-drivers.sh && \ - /bin/sh /tmp/db-drivers.sh && \ +COPY resources/bin/drivers.sh /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ # Modify bin/run.sh so that java becomes a child process of dumb-init sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh @@ -83,7 +88,7 @@ FROM openjdk:17-jdk-slim-buster LABEL name="xebialabs/xl-deploy" \ vendor="Digital.ai" \ - version="24.1.4" \ + version="24.1.6" \ release="1" \ summary="XL Deploy" \ description="Enterprise-scale Application Release Automation for any environment" \ @@ -165,7 +170,7 @@ ENV SERVER_PORT=8180 \ USER 10001 -VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] EXPOSE ${APP_PORT} diff --git a/xl-deploy/24.1/debian-slim/Dockerfile.slim b/xl-deploy/24.1/debian-slim/Dockerfile.slim new file mode 100644 index 000000000..82bd74e73 --- /dev/null +++ b/xl-deploy/24.1/debian-slim/Dockerfile.slim @@ -0,0 +1,185 @@ +FROM alpine:3.16 as installer + +# Install dependencies +RUN apk update +RUN apk add --no-cache gawk unzip curl busybox-extras + + + + +# Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + +# Install xl-deploy from zip file +COPY resources/xl-deploy-24.1.6-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ + rm -fr ${APP_HOME}/serviceWrapper/ && \ + rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ + true + +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq +# Remove bundled drivers if slim +RUN rm ${APP_HOME}/lib/derby*.jar && \ + rm -fr ${APP_HOME}/derbyns/ && \ + true + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh.slim ${APP_HOME}/bin/run-in-container.sh + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Add (and run) Database driver download script +COPY resources/bin/drivers.sh.slim /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ + # Modify bin/run.sh so that java becomes a child process of dumb-init + sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh + + + +# Move and augment conf directory of regular install to default-conf so that when no external config is loaded we can use default +RUN mv ${APP_HOME}/conf ${APP_HOME}/default-conf && \ + mkdir ${APP_HOME}/conf +COPY resources/default-conf ${APP_HOME}/default-conf +COPY resources/jmx-exporter/jmx-exporter.yaml ${APP_HOME}/default-conf/ +RUN mv ${APP_HOME}/default-conf/boot.conf.cloud.template ${APP_HOME}/default-conf/deployit.conf.template + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf + + + +# Modify conf/xld-wrapper.conf.common to add node-conf to the classpath and to add container-specific VM options +# ${APP_HOME}/node-conf will have first priority in classpath +COPY resources/modify-wrapper-linux-conf.gawk /tmp +RUN chmod +x /tmp/modify-wrapper-linux-conf.gawk && \ + /tmp/modify-wrapper-linux-conf.gawk ${APP_HOME}/default-conf/xld-wrapper.conf.common > /tmp/xld-wrapper.conf.common && \ + mv /tmp/xld-wrapper.conf.common ${APP_HOME}/default-conf/xld-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk && \ + # Create node-specific conf directory and add template for node-specific xl-deploy.conf file + # The node-specific xl-deploy.conf file provides HOSTNAME, HOSTNAME_SUFFIX & XL_NODE_NAME to the instance, which are then merged with the + # ${APP_HOME}/conf/xl-deploy.conf file by the xl-platform + mkdir ${APP_HOME}/node-conf +COPY resources/node-conf ${APP_HOME}/node-conf + +# Move plugins directory to default-plugins, so that when no external plugins are loaded we can use the default +RUN mv ${APP_HOME}/plugins ${APP_HOME}/default-plugins && \ + mkdir ${APP_HOME}/plugins && \ + # Create empty 'repository', 'work', 'export', 'archive' and 'reports' directory + mkdir ${APP_HOME}/repository ${APP_HOME}/export ${APP_HOME}/archive ${APP_HOME}/work ${APP_HOME}/reports + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh + + +FROM openjdk:17-jdk-slim-buster +# We need to update this with jdk17 +# FROM openjdk:11-jdk-slim-buster +# FROM docker.usw2mgt.dev.digitalai.cloud/dai-java:11-jdk +# USER 0 + + + +LABEL name="xebialabs/xl-deploy" \ + vendor="Digital.ai" \ + version="24.1.6" \ + release="1" \ + summary="XL Deploy" \ + description="Enterprise-scale Application Release Automation for any environment" \ + url="https://digital.ai/products/deploy/" + + + # Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + + +# Install dependencies +RUN apt-get update -y && \ + apt-get install -y curl jq unzip apt-utils telnet && \ + apt-get install -y fontconfig libfreetype6 && \ + apt-get clean all -q + +# Copy installed XL Deploy +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=debian + + + # install Terraform +ENV TERRAFORM_VERSION=0.11.13 + +RUN curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \ + unzip /tmp/terraform.zip -d /usr/local/bin && \ + rm -f /tmp/terraform.zip + + + +# Set ttl for DNS cache +RUN echo $'\n#\n# Set TTL for DNS cache.\nnetworkaddress.cache.ttl=30' >> $(readlink -f `which java` | sed -e 's:/jre/bin/java::' -e 's:/bin/java::')/conf/security/java.security + +COPY resources/amd64/tini ${APP_ROOT} +RUN chmod ugo+x ${APP_ROOT}/tini + +# Add xebialabs user but do not switch to it +RUN groupadd -r -g 10001 xebialabs && \ + useradd -r -u 10001 -g 0 -G xebialabs xebialabs + +WORKDIR ${APP_HOME} + +ENV SERVER_PORT=8180 \ + XL_CLUSTER_MODE=default \ + XL_DB_URL=jdbc:derby:repository/db;create=true \ + XL_DB_USERNAME=sa \ + XL_DB_PASSWORD=123 \ + XL_DB_MAX_POOL_SIZE=10 \ + XL_REPORT_DB_URL=jdbc:derby:repository/db-report;create=true \ + XL_REPORT_DB_USERNAME=sa \ + XL_REPORT_DB_PASSWORD=123 \ + XL_REPORT_DB_MAX_POOL_SIZE=10 \ + XL_METRICS_ENABLED=false \ + XLD_IN_PROCESS=true \ + XLD_TASK_QUEUE_NAME=xld-tasks-queue \ + XLD_TASK_QUEUE_IN_PROCESS_MAX_DISK_USAGE=100 \ + XLD_TASK_QUEUE_IN_PROCESS_SHUTDOWN_TIMEOUT=60000 \ + XLD_TASK_QUEUE_DRIVER_CLASS_NAME= \ + XLD_TASK_QUEUE_URL= \ + XLD_TASK_QUEUE_USERNAME= \ + XLD_TASK_QUEUE_PASSWORD= \ + XLD_TASK_QUEUE_IS_QUORUM=false \ + HOSTNAME_SUFFIX= \ + XL_LICENSE_KIND=byol \ + GENERATE_XL_CONFIG=true \ + USE_IP_AS_HOSTNAME=false \ + ENABLE_SATELLITE=false \ + PLUGIN_SOURCE=database \ + USE_EXTERNAL_CENTRAL_CONFIG=false \ + CENTRAL_CONFIG_URL= \ + CENTRAL_CONFIG_ENCRYPT_KEY= \ + USE_CACHE=false \ + LOGBACK_GLOBAL_LOGGING_LEVEL=info \ + LOGBACK_SCAN_ENABLED=true \ + LOGBACK_SCAN_PERIOD=30seconds + + +USER 10001 + +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] + +EXPOSE ${APP_PORT} + +# Environment variables are not expanded when using the exec form of the ENTRYPOINT command. They are +# expanded when using the shell form, but that results in tini running with a PID higher than 1. + + +ENTRYPOINT ["/opt/xebialabs/tini", "--", "/opt/xebialabs/xl-deploy-server/bin/run-in-container.sh"] diff --git a/xl-deploy/24.1/redhat/Dockerfile b/xl-deploy/24.1/redhat/Dockerfile index c363de70a..5683d89aa 100644 --- a/xl-deploy/24.1/redhat/Dockerfile +++ b/xl-deploy/24.1/redhat/Dockerfile @@ -18,24 +18,29 @@ ENV APP_ROOT=/opt/xebialabs \ APP_HOME=/opt/xebialabs/xl-deploy-server # Install xl-deploy from zip file -COPY resources/xl-deploy-24.1.4-server.zip /tmp +COPY resources/xl-deploy-24.1.6-server.zip /tmp RUN mkdir -p ${APP_ROOT} && \ - unzip /tmp/xl-deploy-24.1.4-server.zip -d ${APP_ROOT} && \ - mv ${APP_ROOT}/xl-deploy-24.1.4-server ${APP_HOME} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ rm -fr ${APP_HOME}/serviceWrapper/ && \ rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ true +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq + # Add bin/run-in-container.sh -COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/run-in-container.sh # Add jmx-exporter for prometheus COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ # Add (and run) Database driver download script -COPY resources/bin/db-drivers.sh /tmp -RUN chmod ugo+x /tmp/db-drivers.sh && \ - /bin/sh /tmp/db-drivers.sh && \ +COPY resources/bin/drivers.sh /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ # Modify bin/run.sh so that java becomes a child process of dumb-init sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh @@ -84,7 +89,7 @@ FROM registry.access.redhat.com/ubi8/openjdk-17:latest LABEL name="xebialabs/xl-deploy" \ vendor="Digital.ai" \ - version="24.1.4" \ + version="24.1.6" \ release="1" \ summary="XL Deploy" \ description="Enterprise-scale Application Release Automation for any environment" \ @@ -171,7 +176,7 @@ ENV SERVER_PORT=8180 \ USER 10001 -VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] EXPOSE ${APP_PORT} diff --git a/xl-deploy/24.1/redhat/Dockerfile.slim b/xl-deploy/24.1/redhat/Dockerfile.slim new file mode 100644 index 000000000..9bcfe834f --- /dev/null +++ b/xl-deploy/24.1/redhat/Dockerfile.slim @@ -0,0 +1,191 @@ +FROM registry.access.redhat.com/ubi8/openjdk-17:latest as installer + +# Install dependencies +USER root +RUN microdnf update -y && rm -rf /var/cache/yum && \ + INSTALL_PKGS="curl hostname shadow-utils which unzip gawk" && \ + microdnf install --nodocs ${INSTALL_PKGS} && \ + ### Install JQ + JQ_LOCATION="/usr/bin/jq" && \ + curl https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -L > $JQ_LOCATION && chmod +x $JQ_LOCATION && \ + microdnf clean all + + + + +# Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + +# Install xl-deploy from zip file +COPY resources/xl-deploy-24.1.6-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ + rm -fr ${APP_HOME}/serviceWrapper/ && \ + rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ + true + +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq +# Remove bundled drivers if slim +RUN rm ${APP_HOME}/lib/derby*.jar && \ + rm -fr ${APP_HOME}/derbyns/ && \ + true + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh.slim ${APP_HOME}/bin/run-in-container.sh + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Add (and run) Database driver download script +COPY resources/bin/drivers.sh.slim /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ + # Modify bin/run.sh so that java becomes a child process of dumb-init + sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh + + + +# Move and augment conf directory of regular install to default-conf so that when no external config is loaded we can use default +RUN mv ${APP_HOME}/conf ${APP_HOME}/default-conf && \ + mkdir ${APP_HOME}/conf +COPY resources/default-conf ${APP_HOME}/default-conf +COPY resources/jmx-exporter/jmx-exporter.yaml ${APP_HOME}/default-conf/ +RUN mv ${APP_HOME}/default-conf/boot.conf.cloud.template ${APP_HOME}/default-conf/deployit.conf.template + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf + + + +# Modify conf/xld-wrapper.conf.common to add node-conf to the classpath and to add container-specific VM options +# ${APP_HOME}/node-conf will have first priority in classpath +COPY resources/modify-wrapper-linux-conf.gawk /tmp +RUN chmod +x /tmp/modify-wrapper-linux-conf.gawk && \ + /tmp/modify-wrapper-linux-conf.gawk ${APP_HOME}/default-conf/xld-wrapper.conf.common > /tmp/xld-wrapper.conf.common && \ + mv /tmp/xld-wrapper.conf.common ${APP_HOME}/default-conf/xld-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk && \ + # Create node-specific conf directory and add template for node-specific xl-deploy.conf file + # The node-specific xl-deploy.conf file provides HOSTNAME, HOSTNAME_SUFFIX & XL_NODE_NAME to the instance, which are then merged with the + # ${APP_HOME}/conf/xl-deploy.conf file by the xl-platform + mkdir ${APP_HOME}/node-conf +COPY resources/node-conf ${APP_HOME}/node-conf + +# Move plugins directory to default-plugins, so that when no external plugins are loaded we can use the default +RUN mv ${APP_HOME}/plugins ${APP_HOME}/default-plugins && \ + mkdir ${APP_HOME}/plugins && \ + # Create empty 'repository', 'work', 'export', 'archive' and 'reports' directory + mkdir ${APP_HOME}/repository ${APP_HOME}/export ${APP_HOME}/archive ${APP_HOME}/work ${APP_HOME}/reports + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh + + +FROM registry.access.redhat.com/ubi8/openjdk-17:latest + + +LABEL name="xebialabs/xl-deploy" \ + vendor="Digital.ai" \ + version="24.1.6" \ + release="1" \ + summary="XL Deploy" \ + description="Enterprise-scale Application Release Automation for any environment" \ + url="https://digital.ai/products/deploy/" + +### add licenses to this directory +COPY resources/licenses /licenses + + + # Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + + +# Copy installed XL Deploy +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=redhat +USER root + +RUN microdnf update -y && rm -rf /var/cache/yum && \ + INSTALL_PKGS="curl hostname shadow-utils which unzip nc" && \ + microdnf install --nodocs ${INSTALL_PKGS} && \ + JQ_LOCATION="/usr/bin/jq" && \ + curl https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -L > $JQ_LOCATION && chmod +x $JQ_LOCATION && \ + microdnf clean all + + + # install Terraform +ENV TERRAFORM_VERSION=0.11.13 + +RUN curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \ + unzip /tmp/terraform.zip -d /usr/local/bin && \ + rm -f /tmp/terraform.zip + + + +# Set ttl for DNS cache +RUN echo $'\n#\n# Set TTL for DNS cache.\nnetworkaddress.cache.ttl=30' >> $(readlink -f `which java` | sed -e 's:/jre/bin/java::' -e 's:/bin/java::')/conf/security/java.security + +COPY resources/amd64/tini ${APP_ROOT} +RUN chmod ugo+x ${APP_ROOT}/tini + +# Add xebialabs user but do not switch to it +RUN groupadd -r -g 10001 xebialabs && \ + useradd -r -u 10001 -g 0 -G xebialabs xebialabs + +WORKDIR ${APP_HOME} + +ENV SERVER_PORT=8180 \ + XL_CLUSTER_MODE=default \ + XL_DB_URL=jdbc:derby:repository/db;create=true \ + XL_DB_USERNAME=sa \ + XL_DB_PASSWORD=123 \ + XL_DB_MAX_POOL_SIZE=10 \ + XL_REPORT_DB_URL=jdbc:derby:repository/db-report;create=true \ + XL_REPORT_DB_USERNAME=sa \ + XL_REPORT_DB_PASSWORD=123 \ + XL_REPORT_DB_MAX_POOL_SIZE=10 \ + XL_METRICS_ENABLED=false \ + XLD_IN_PROCESS=true \ + XLD_TASK_QUEUE_NAME=xld-tasks-queue \ + XLD_TASK_QUEUE_IN_PROCESS_MAX_DISK_USAGE=100 \ + XLD_TASK_QUEUE_IN_PROCESS_SHUTDOWN_TIMEOUT=60000 \ + XLD_TASK_QUEUE_DRIVER_CLASS_NAME= \ + XLD_TASK_QUEUE_URL= \ + XLD_TASK_QUEUE_USERNAME= \ + XLD_TASK_QUEUE_PASSWORD= \ + XLD_TASK_QUEUE_IS_QUORUM=false \ + HOSTNAME_SUFFIX= \ + XL_LICENSE_KIND=byol \ + GENERATE_XL_CONFIG=true \ + USE_IP_AS_HOSTNAME=false \ + ENABLE_SATELLITE=false \ + PLUGIN_SOURCE=database \ + USE_EXTERNAL_CENTRAL_CONFIG=false \ + CENTRAL_CONFIG_URL= \ + CENTRAL_CONFIG_ENCRYPT_KEY= \ + USE_CACHE=false \ + LOGBACK_GLOBAL_LOGGING_LEVEL=info \ + LOGBACK_SCAN_ENABLED=true \ + LOGBACK_SCAN_PERIOD=30seconds + + +USER 10001 + +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] + +EXPOSE ${APP_PORT} + +# Environment variables are not expanded when using the exec form of the ENTRYPOINT command. They are +# expanded when using the shell form, but that results in tini running with a PID higher than 1. + + +ENTRYPOINT ["/opt/xebialabs/tini", "--", "/opt/xebialabs/xl-deploy-server/bin/run-in-container.sh"] diff --git a/xl-deploy/24.1/rhel/Dockerfile b/xl-deploy/24.1/rhel/Dockerfile index fd54b69d7..b91fbaba6 100644 --- a/xl-deploy/24.1/rhel/Dockerfile +++ b/xl-deploy/24.1/rhel/Dockerfile @@ -3,7 +3,7 @@ FROM registry.access.redhat.com/rhel7/rhel-atomic LABEL name="xebialabs/xl-deploy" \ vendor="Digital.ai" \ - version="24.1.4" \ + version="24.1.6" \ release="1" \ summary="XL Deploy" \ description="Enterprise-scale Application Release Automation for any environment" \ @@ -39,24 +39,29 @@ ENV APP_ROOT=/opt/xebialabs \ APP_HOME=/opt/xebialabs/xl-deploy-server # Install xl-deploy from zip file -COPY resources/xl-deploy-24.1.4-server.zip /tmp +COPY resources/xl-deploy-24.1.6-server.zip /tmp RUN mkdir -p ${APP_ROOT} && \ - unzip /tmp/xl-deploy-24.1.4-server.zip -d ${APP_ROOT} && \ - mv ${APP_ROOT}/xl-deploy-24.1.4-server ${APP_HOME} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ rm -fr ${APP_HOME}/serviceWrapper/ && \ rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ true +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq + # Add bin/run-in-container.sh -COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/run-in-container.sh # Add jmx-exporter for prometheus COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ # Add (and run) Database driver download script -COPY resources/bin/db-drivers.sh /tmp -RUN chmod ugo+x /tmp/db-drivers.sh && \ - /bin/sh /tmp/db-drivers.sh && \ +COPY resources/bin/drivers.sh /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ # Modify bin/run.sh so that java becomes a child process of dumb-init sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh @@ -163,7 +168,7 @@ ENV SERVER_PORT=8180 \ USER 10001 -VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] EXPOSE ${APP_PORT} diff --git a/xl-deploy/24.1/rhel/Dockerfile.slim b/xl-deploy/24.1/rhel/Dockerfile.slim new file mode 100644 index 000000000..38cca686f --- /dev/null +++ b/xl-deploy/24.1/rhel/Dockerfile.slim @@ -0,0 +1,183 @@ +FROM registry.access.redhat.com/rhel7/rhel-atomic + + +LABEL name="xebialabs/xl-deploy" \ + vendor="Digital.ai" \ + version="24.1.6" \ + release="1" \ + summary="XL Deploy" \ + description="Enterprise-scale Application Release Automation for any environment" \ + url="https://digital.ai/products/deploy/" + +COPY resources/help.md /tmp/ + +### add licenses to this directory +COPY resources/licenses /licenses + +# Install dependencies +RUN INSTALL_PKGS="golang-github-cpuguy83-go-md2man curl hostname shadow-utils which" && \ + microdnf install --enablerepo=rhel-7-server-rpms --enablerepo=rhel-7-server-optional-rpms --nodocs ${INSTALL_PKGS} && \ + microdnf update && \ +### help file markdown to man conversion + go-md2man -in /tmp/help.md -out /help.1 && \ + microdnf clean all + +RUN microdnf install --enablerepo=rhel-7-server-rpms --nodocs unzip gawk java-17-openjdk && \ +### Set the Java random source + echo "securerandom.source=file:/dev/urandom" >> /usr/lib/jvm/java/jre/lib/security/java.security && \ + microdnf clean all + +### Install JQ +RUN JQ_LOCATION="/usr/bin/jq" && \ + curl https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -L > $JQ_LOCATION && chmod +x $JQ_LOCATION + + + + +# Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + +# Install xl-deploy from zip file +COPY resources/xl-deploy-24.1.6-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ + rm -fr ${APP_HOME}/serviceWrapper/ && \ + rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ + true + +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq +# Remove bundled drivers if slim +RUN rm ${APP_HOME}/lib/derby*.jar && \ + rm -fr ${APP_HOME}/derbyns/ && \ + true + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh.slim ${APP_HOME}/bin/run-in-container.sh + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Add (and run) Database driver download script +COPY resources/bin/drivers.sh.slim /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ + # Modify bin/run.sh so that java becomes a child process of dumb-init + sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh + + + +# Move and augment conf directory of regular install to default-conf so that when no external config is loaded we can use default +RUN mv ${APP_HOME}/conf ${APP_HOME}/default-conf && \ + mkdir ${APP_HOME}/conf +COPY resources/default-conf ${APP_HOME}/default-conf +COPY resources/jmx-exporter/jmx-exporter.yaml ${APP_HOME}/default-conf/ +RUN mv ${APP_HOME}/default-conf/boot.conf.cloud.template ${APP_HOME}/default-conf/deployit.conf.template + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf + + + +# Modify conf/xld-wrapper.conf.common to add node-conf to the classpath and to add container-specific VM options +# ${APP_HOME}/node-conf will have first priority in classpath +COPY resources/modify-wrapper-linux-conf.gawk /tmp +RUN chmod +x /tmp/modify-wrapper-linux-conf.gawk && \ + /tmp/modify-wrapper-linux-conf.gawk ${APP_HOME}/default-conf/xld-wrapper.conf.common > /tmp/xld-wrapper.conf.common && \ + mv /tmp/xld-wrapper.conf.common ${APP_HOME}/default-conf/xld-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk && \ + # Create node-specific conf directory and add template for node-specific xl-deploy.conf file + # The node-specific xl-deploy.conf file provides HOSTNAME, HOSTNAME_SUFFIX & XL_NODE_NAME to the instance, which are then merged with the + # ${APP_HOME}/conf/xl-deploy.conf file by the xl-platform + mkdir ${APP_HOME}/node-conf +COPY resources/node-conf ${APP_HOME}/node-conf + +# Move plugins directory to default-plugins, so that when no external plugins are loaded we can use the default +RUN mv ${APP_HOME}/plugins ${APP_HOME}/default-plugins && \ + mkdir ${APP_HOME}/plugins && \ + # Create empty 'repository', 'work', 'export', 'archive' and 'reports' directory + mkdir ${APP_HOME}/repository ${APP_HOME}/export ${APP_HOME}/archive ${APP_HOME}/work ${APP_HOME}/reports + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh + + + + +ENV OS=rhel + + + # install Terraform +ENV TERRAFORM_VERSION=0.11.13 + +RUN curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \ + unzip /tmp/terraform.zip -d /usr/local/bin && \ + rm -f /tmp/terraform.zip + + + +# Set ttl for DNS cache +RUN echo $'\n#\n# Set TTL for DNS cache.\nnetworkaddress.cache.ttl=30' >> $(readlink -f `which java` | sed -e 's:/jre/bin/java::' -e 's:/bin/java::')/conf/security/java.security + +COPY resources/amd64/tini ${APP_ROOT} +RUN chmod ugo+x ${APP_ROOT}/tini + +# Add xebialabs user but do not switch to it +RUN groupadd -r -g 10001 xebialabs && \ + useradd -r -u 10001 -g 0 -G xebialabs xebialabs + +WORKDIR ${APP_HOME} + +ENV SERVER_PORT=8180 \ + XL_CLUSTER_MODE=default \ + XL_DB_URL=jdbc:derby:repository/db;create=true \ + XL_DB_USERNAME=sa \ + XL_DB_PASSWORD=123 \ + XL_DB_MAX_POOL_SIZE=10 \ + XL_REPORT_DB_URL=jdbc:derby:repository/db-report;create=true \ + XL_REPORT_DB_USERNAME=sa \ + XL_REPORT_DB_PASSWORD=123 \ + XL_REPORT_DB_MAX_POOL_SIZE=10 \ + XL_METRICS_ENABLED=false \ + XLD_IN_PROCESS=true \ + XLD_TASK_QUEUE_NAME=xld-tasks-queue \ + XLD_TASK_QUEUE_IN_PROCESS_MAX_DISK_USAGE=100 \ + XLD_TASK_QUEUE_IN_PROCESS_SHUTDOWN_TIMEOUT=60000 \ + XLD_TASK_QUEUE_DRIVER_CLASS_NAME= \ + XLD_TASK_QUEUE_URL= \ + XLD_TASK_QUEUE_USERNAME= \ + XLD_TASK_QUEUE_PASSWORD= \ + XLD_TASK_QUEUE_IS_QUORUM=false \ + HOSTNAME_SUFFIX= \ + XL_LICENSE_KIND=byol \ + GENERATE_XL_CONFIG=true \ + USE_IP_AS_HOSTNAME=false \ + ENABLE_SATELLITE=false \ + PLUGIN_SOURCE=database \ + USE_EXTERNAL_CENTRAL_CONFIG=false \ + CENTRAL_CONFIG_URL= \ + CENTRAL_CONFIG_ENCRYPT_KEY= \ + USE_CACHE=false \ + LOGBACK_GLOBAL_LOGGING_LEVEL=info \ + LOGBACK_SCAN_ENABLED=true \ + LOGBACK_SCAN_PERIOD=30seconds + + +USER 10001 + +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] + +EXPOSE ${APP_PORT} + +# Environment variables are not expanded when using the exec form of the ENTRYPOINT command. They are +# expanded when using the shell form, but that results in tini running with a PID higher than 1. + + +ENTRYPOINT ["/opt/xebialabs/tini", "--", "/opt/xebialabs/xl-deploy-server/bin/run-in-container.sh"] diff --git a/xl-deploy/24.1/ubuntu/Dockerfile b/xl-deploy/24.1/ubuntu/Dockerfile index ebe57e06a..d67b07c47 100644 --- a/xl-deploy/24.1/ubuntu/Dockerfile +++ b/xl-deploy/24.1/ubuntu/Dockerfile @@ -12,24 +12,29 @@ ENV APP_ROOT=/opt/xebialabs \ APP_HOME=/opt/xebialabs/xl-deploy-server # Install xl-deploy from zip file -COPY resources/xl-deploy-24.1.4-server.zip /tmp +COPY resources/xl-deploy-24.1.6-server.zip /tmp RUN mkdir -p ${APP_ROOT} && \ - unzip /tmp/xl-deploy-24.1.4-server.zip -d ${APP_ROOT} && \ - mv ${APP_ROOT}/xl-deploy-24.1.4-server ${APP_HOME} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ rm -fr ${APP_HOME}/serviceWrapper/ && \ rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ true +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq + # Add bin/run-in-container.sh -COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/run-in-container.sh # Add jmx-exporter for prometheus COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ # Add (and run) Database driver download script -COPY resources/bin/db-drivers.sh /tmp -RUN chmod ugo+x /tmp/db-drivers.sh && \ - /bin/sh /tmp/db-drivers.sh && \ +COPY resources/bin/drivers.sh /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ # Modify bin/run.sh so that java becomes a child process of dumb-init sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh @@ -79,7 +84,7 @@ USER root LABEL name="xebialabs/xl-deploy" \ vendor="Digital.ai" \ - version="24.1.4" \ + version="24.1.6" \ release="1" \ summary="XL Deploy" \ description="Enterprise-scale Application Release Automation for any environment" \ @@ -161,7 +166,7 @@ ENV SERVER_PORT=8180 \ USER 10001 -VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] EXPOSE ${APP_PORT} diff --git a/xl-deploy/24.1/ubuntu/Dockerfile.slim b/xl-deploy/24.1/ubuntu/Dockerfile.slim new file mode 100644 index 000000000..599110a26 --- /dev/null +++ b/xl-deploy/24.1/ubuntu/Dockerfile.slim @@ -0,0 +1,181 @@ +FROM alpine:3.16 as installer + +# Install dependencies +RUN apk update +RUN apk add --no-cache gawk unzip curl busybox-extras + + + + +# Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + +# Install xl-deploy from zip file +COPY resources/xl-deploy-24.1.6-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/xl-deploy-24.1.6-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/xl-deploy-24.1.6-server ${APP_HOME} && \ + rm -fr ${APP_HOME}/serviceWrapper/ && \ + rm ${APP_HOME}/bin/.wrapper-env* ${APP_HOME}/bin/install-service* ${APP_HOME}/bin/uninstall-service* && \ + true + +# Create directories for external drivers +RUN mkdir -p ${APP_HOME}/driver/jdbc && \ + mkdir -p ${APP_HOME}/driver/mq +# Remove bundled drivers if slim +RUN rm ${APP_HOME}/lib/derby*.jar && \ + rm -fr ${APP_HOME}/derbyns/ && \ + true + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh.slim ${APP_HOME}/bin/run-in-container.sh + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Add (and run) Database driver download script +COPY resources/bin/drivers.sh.slim /tmp/drivers.sh + +RUN chmod ugo+x /tmp/drivers.sh && \ + /bin/sh /tmp/drivers.sh && \ + # Modify bin/run.sh so that java becomes a child process of dumb-init + sed -i 's/^\($JAVACMD\)/exec \1/' ${APP_HOME}/bin/run.sh + + + +# Move and augment conf directory of regular install to default-conf so that when no external config is loaded we can use default +RUN mv ${APP_HOME}/conf ${APP_HOME}/default-conf && \ + mkdir ${APP_HOME}/conf +COPY resources/default-conf ${APP_HOME}/default-conf +COPY resources/jmx-exporter/jmx-exporter.yaml ${APP_HOME}/default-conf/ +RUN mv ${APP_HOME}/default-conf/boot.conf.cloud.template ${APP_HOME}/default-conf/deployit.conf.template + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf + + + +# Modify conf/xld-wrapper.conf.common to add node-conf to the classpath and to add container-specific VM options +# ${APP_HOME}/node-conf will have first priority in classpath +COPY resources/modify-wrapper-linux-conf.gawk /tmp +RUN chmod +x /tmp/modify-wrapper-linux-conf.gawk && \ + /tmp/modify-wrapper-linux-conf.gawk ${APP_HOME}/default-conf/xld-wrapper.conf.common > /tmp/xld-wrapper.conf.common && \ + mv /tmp/xld-wrapper.conf.common ${APP_HOME}/default-conf/xld-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk && \ + # Create node-specific conf directory and add template for node-specific xl-deploy.conf file + # The node-specific xl-deploy.conf file provides HOSTNAME, HOSTNAME_SUFFIX & XL_NODE_NAME to the instance, which are then merged with the + # ${APP_HOME}/conf/xl-deploy.conf file by the xl-platform + mkdir ${APP_HOME}/node-conf +COPY resources/node-conf ${APP_HOME}/node-conf + +# Move plugins directory to default-plugins, so that when no external plugins are loaded we can use the default +RUN mv ${APP_HOME}/plugins ${APP_HOME}/default-plugins && \ + mkdir ${APP_HOME}/plugins && \ + # Create empty 'repository', 'work', 'export', 'archive' and 'reports' directory + mkdir ${APP_HOME}/repository ${APP_HOME}/export ${APP_HOME}/archive ${APP_HOME}/work ${APP_HOME}/reports + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh + + +FROM docker.usw2mgt.dev.digitalai.cloud/dai-java:17-jdk +USER root + + +LABEL name="xebialabs/xl-deploy" \ + vendor="Digital.ai" \ + version="24.1.6" \ + release="1" \ + summary="XL Deploy" \ + description="Enterprise-scale Application Release Automation for any environment" \ + url="https://digital.ai/products/deploy/" + + + # Set root folders +ENV APP_ROOT=/opt/xebialabs \ + APP_HOME=/opt/xebialabs/xl-deploy-server + + +# Install dependencies +RUN apt-get update -y && \ + apt-get install -y curl jq unzip apt-utils telnet && \ + apt-get install -y fontconfig libfreetype6 && \ + apt-get clean all -q + +# Copy installed XL Deploy +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=ubuntu + + + # install Terraform +ENV TERRAFORM_VERSION=0.11.13 + +RUN curl -o /tmp/terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \ + unzip /tmp/terraform.zip -d /usr/local/bin && \ + rm -f /tmp/terraform.zip + + + +# Set ttl for DNS cache +RUN echo $'\n#\n# Set TTL for DNS cache.\nnetworkaddress.cache.ttl=30' >> $(readlink -f `which java` | sed -e 's:/jre/bin/java::' -e 's:/bin/java::')/conf/security/java.security + +COPY resources/amd64/tini ${APP_ROOT} +RUN chmod ugo+x ${APP_ROOT}/tini + +# Add xebialabs user but do not switch to it +RUN groupadd -r -g 10001 xebialabs && \ + useradd -r -u 10001 -g 0 -G xebialabs xebialabs + +WORKDIR ${APP_HOME} + +ENV SERVER_PORT=8180 \ + XL_CLUSTER_MODE=default \ + XL_DB_URL=jdbc:derby:repository/db;create=true \ + XL_DB_USERNAME=sa \ + XL_DB_PASSWORD=123 \ + XL_DB_MAX_POOL_SIZE=10 \ + XL_REPORT_DB_URL=jdbc:derby:repository/db-report;create=true \ + XL_REPORT_DB_USERNAME=sa \ + XL_REPORT_DB_PASSWORD=123 \ + XL_REPORT_DB_MAX_POOL_SIZE=10 \ + XL_METRICS_ENABLED=false \ + XLD_IN_PROCESS=true \ + XLD_TASK_QUEUE_NAME=xld-tasks-queue \ + XLD_TASK_QUEUE_IN_PROCESS_MAX_DISK_USAGE=100 \ + XLD_TASK_QUEUE_IN_PROCESS_SHUTDOWN_TIMEOUT=60000 \ + XLD_TASK_QUEUE_DRIVER_CLASS_NAME= \ + XLD_TASK_QUEUE_URL= \ + XLD_TASK_QUEUE_USERNAME= \ + XLD_TASK_QUEUE_PASSWORD= \ + XLD_TASK_QUEUE_IS_QUORUM=false \ + HOSTNAME_SUFFIX= \ + XL_LICENSE_KIND=byol \ + GENERATE_XL_CONFIG=true \ + USE_IP_AS_HOSTNAME=false \ + ENABLE_SATELLITE=false \ + PLUGIN_SOURCE=database \ + USE_EXTERNAL_CENTRAL_CONFIG=false \ + CENTRAL_CONFIG_URL= \ + CENTRAL_CONFIG_ENCRYPT_KEY= \ + USE_CACHE=false \ + LOGBACK_GLOBAL_LOGGING_LEVEL=info \ + LOGBACK_SCAN_ENABLED=true \ + LOGBACK_SCAN_PERIOD=30seconds + + +USER 10001 + +VOLUME ["${APP_HOME}/centralConfiguration", "${APP_HOME}/conf", "${APP_HOME}/driver/jdbc", "${APP_HOME}/driver/mq", "${APP_HOME}/export", "${APP_HOME}/ext", "${APP_HOME}/hotfix/lib", "${APP_HOME}/hotfix/plugins", "${APP_HOME}/importablePackages", "${APP_HOME}/plugins", "${APP_HOME}/repository", "${APP_HOME}/work"] + +EXPOSE ${APP_PORT} + +# Environment variables are not expanded when using the exec form of the ENTRYPOINT command. They are +# expanded when using the shell form, but that results in tini running with a PID higher than 1. + + +ENTRYPOINT ["/opt/xebialabs/tini", "--", "/opt/xebialabs/xl-deploy-server/bin/run-in-container.sh"]