diff --git a/central-configuration/24.3/amazonlinux/Dockerfile b/central-configuration/24.3/amazonlinux/Dockerfile new file mode 100644 index 000000000..759055029 --- /dev/null +++ b/central-configuration/24.3/amazonlinux/Dockerfile @@ -0,0 +1,141 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM amazonlinux:2 + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=amazonlinux + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/amazonlinux/Dockerfile.slim b/central-configuration/24.3/amazonlinux/Dockerfile.slim new file mode 100644 index 000000000..759055029 --- /dev/null +++ b/central-configuration/24.3/amazonlinux/Dockerfile.slim @@ -0,0 +1,141 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM amazonlinux:2 + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=amazonlinux + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/centos/Dockerfile b/central-configuration/24.3/centos/Dockerfile new file mode 100644 index 000000000..3adcf249d --- /dev/null +++ b/central-configuration/24.3/centos/Dockerfile @@ -0,0 +1,144 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM xebialabs/xl-centos:7-patch-v2.0 + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=centos + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/centos/Dockerfile.slim b/central-configuration/24.3/centos/Dockerfile.slim new file mode 100644 index 000000000..3adcf249d --- /dev/null +++ b/central-configuration/24.3/centos/Dockerfile.slim @@ -0,0 +1,144 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM xebialabs/xl-centos:7-patch-v2.0 + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=centos + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/debian-slim/Dockerfile b/central-configuration/24.3/debian-slim/Dockerfile new file mode 100644 index 000000000..5624ba88f --- /dev/null +++ b/central-configuration/24.3/debian-slim/Dockerfile @@ -0,0 +1,147 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +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/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=debian + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/debian-slim/Dockerfile.slim b/central-configuration/24.3/debian-slim/Dockerfile.slim new file mode 100644 index 000000000..5624ba88f --- /dev/null +++ b/central-configuration/24.3/debian-slim/Dockerfile.slim @@ -0,0 +1,147 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +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/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=debian + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/redhat/Dockerfile b/central-configuration/24.3/redhat/Dockerfile new file mode 100644 index 000000000..77ba5047e --- /dev/null +++ b/central-configuration/24.3/redhat/Dockerfile @@ -0,0 +1,153 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM registry.access.redhat.com/ubi8/openjdk-17:latest + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-server + + +# Copy installed Central configuration +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 + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/redhat/Dockerfile.slim b/central-configuration/24.3/redhat/Dockerfile.slim new file mode 100644 index 000000000..77ba5047e --- /dev/null +++ b/central-configuration/24.3/redhat/Dockerfile.slim @@ -0,0 +1,153 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM registry.access.redhat.com/ubi8/openjdk-17:latest + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-server + + +# Copy installed Central configuration +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 + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/rhel/Dockerfile b/central-configuration/24.3/rhel/Dockerfile new file mode 100644 index 000000000..f2f4dcc87 --- /dev/null +++ b/central-configuration/24.3/rhel/Dockerfile @@ -0,0 +1,145 @@ +FROM registry.access.redhat.com/rhel7/rhel-atomic + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + + + +ENV OS=rhel + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/rhel/Dockerfile.slim b/central-configuration/24.3/rhel/Dockerfile.slim new file mode 100644 index 000000000..f2f4dcc87 --- /dev/null +++ b/central-configuration/24.3/rhel/Dockerfile.slim @@ -0,0 +1,145 @@ +FROM registry.access.redhat.com/rhel7/rhel-atomic + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + + + +ENV OS=rhel + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/ubuntu/Dockerfile b/central-configuration/24.3/ubuntu/Dockerfile new file mode 100644 index 000000000..9fe819586 --- /dev/null +++ b/central-configuration/24.3/ubuntu/Dockerfile @@ -0,0 +1,143 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM docker.usw2mgt.dev.digitalai.cloud/dai-java:17-jdk +USER root + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=ubuntu + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"] diff --git a/central-configuration/24.3/ubuntu/Dockerfile.slim b/central-configuration/24.3/ubuntu/Dockerfile.slim new file mode 100644 index 000000000..9fe819586 --- /dev/null +++ b/central-configuration/24.3/ubuntu/Dockerfile.slim @@ -0,0 +1,143 @@ +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/central-configuration-server + +# Install central-configuration from zip file +COPY resources/central-configuration-24.3.0-server.zip /tmp +RUN mkdir -p ${APP_ROOT} && \ + unzip /tmp/central-configuration-24.3.0-server.zip -d ${APP_ROOT} && \ + mv ${APP_ROOT}/central-configuration-24.3.0-server ${APP_HOME} + +# Add bin/run-in-container.sh +COPY resources/bin/run-in-container.sh ${APP_HOME}/bin/ + +# script to copy cc from embedded master to standalone cc +COPY resources/bin/migrate-from-embedded-cc-to-standalone.sh ${APP_HOME}/bin/ + +# Add jmx-exporter for prometheus +COPY resources/jmx-exporter/jmx_prometheus_javaagent.jar ${APP_HOME}/lib/ + +# Modify bin/run.sh so that java becomes a child process of dumb-init +RUN 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/ + +# Copy central configuration files +RUN mkdir -p ${APP_HOME}/centralConfiguration +COPY resources/central-conf ${APP_HOME}/central-conf +RUN mv ${APP_HOME}/central-conf/boot.conf.template ${APP_HOME}/default-conf/deployit.conf.template + +# Modify conf/xlc-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/xlc-wrapper.conf.common > /tmp/xlc-wrapper.conf.common && \ + mv /tmp/xlc-wrapper.conf.common ${APP_HOME}/default-conf/xlc-wrapper.conf.common && \ + rm /tmp/modify-wrapper-linux-conf.gawk + +# Set permissions +RUN chgrp -R 0 ${APP_ROOT} && \ + chmod -R g=u ${APP_ROOT} && \ + chmod ugo+x ${APP_HOME}/bin/*.sh && \ + chmod a+rwx ${APP_HOME}/centralConfiguration + + +FROM docker.usw2mgt.dev.digitalai.cloud/dai-java:17-jdk +USER root + + +LABEL name="xebialabs/central-configuration" \ + vendor="Digital.ai" \ + version="24.3.0" \ + release="1" \ + summary="Central configuration" \ + 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/central-configuration-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 Central configuration +COPY --from=installer ${APP_ROOT} ${APP_ROOT} + +ENV OS=ubuntu + + + + +# 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 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 \ + 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}/conf", "${APP_HOME}/centralConfiguration"] + +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/central-configuration-server/bin/run-in-container.sh"]