changeset 264:3754be907d9b production vv2.1.0

flow: Merged <release> 'v2.1.0' to <master> ('production').
author aldrich@nwoca.org
date Thu, 26 Jul 2018 14:27:43 +0100
parents b8ee60469db7 (current diff) 3e7df21b7561 (diff)
children 17894e17b6fd
files
diffstat 9 files changed, 129 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamboo-agent/Dockerfile	Thu Jul 26 14:27:43 2018 +0100
@@ -0,0 +1,83 @@
+FROM  ubuntu:16.04
+
+RUN apt-get update
+RUN apt-get install -y ca-certificates
+
+# set up nsswitch.conf for Go's "netgo" implementation (which Docker explicitly uses)
+# - https://github.com/docker/docker-ce/blob/v17.09.0-ce/components/engine/hack/make.sh#L149
+# - https://github.com/golang/go/blob/go1.9.1/src/net/conf.go#L194-L275
+# - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf
+RUN  echo 'hosts: files dns' > /etc/nsswitch.conf
+
+ENV DOCKER_CHANNEL stable
+ENV DOCKER_VERSION 17.03.2-ce
+ENV PATH "$PATH:/usr/local/bin"
+ENV DOCKER_HOST unix:///var/run/docker.sock
+#RUN set -ex
+# why we use "curl" instead of "wget":
+# + wget -O docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-17.03.1-ce.tgz
+# Connecting to download.docker.com (54.230.87.253:443)
+# wget: error getting response: Connection reset by peer
+
+RUN apt-get update -y
+
+
+RUN apt-get install -y mercurial \
+
+#    && apt-get install -y vim \
+
+#    && apt-get install -y nano \
+
+    && apt-get install -y tar \
+
+    && apt-get install -y curl \
+	
+	&& apt-get install -y unzip \
+
+    && apt-get install -y openjdk-8-jdk \
+
+    && apt-get install -y zip
+    
+ENV ANT_VERSION 1.10.3
+RUN cd && \
+    curl -fL -o apache-ant-bin.tar.gz http://www.us.apache.org/dist//ant/binaries/apache-ant-${ANT_VERSION}-bin.tar.gz && \
+    tar -xzf apache-ant-bin.tar.gz && \
+    mv apache-ant-${ANT_VERSION} /opt/ant && \
+    rm apache-ant-bin.tar.gz
+ENV ANT_HOME /opt/ant
+ENV PATH ${PATH}:/opt/ant/bin
+
+RUN curl -fL -o docker.tgz "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz"; 
+RUN	tar --extract \
+		--file docker.tgz \
+		--strip-components 1 \
+		--directory /usr/local/bin/ \
+	; \
+	rm docker.tgz; \
+	\
+	apt-get autoremove  \
+	\
+	dockerd -v; \
+	docker -v
+
+#COPY modprobe.sh /usr/local/bin/modprobe
+COPY docker-entrypoint.sh /usr/local/bin/
+
+run chmod +x /usr/local/bin/docker-entrypoint.sh
+
+#EXPOSE 2375/tcp
+
+COPY atlassian-bamboo-agent-installer-6.5.0.jar /root
+
+RUN mkdir -p /root/bamboo-agent-home/bin
+COPY bamboo-capabilities.properties /root/bamboo-agent-home/bin/bamboo-capabilities.properties
+
+RUN curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
+
+RUN chmod +x /usr/local/bin/docker-compose
+
+ENTRYPOINT ["docker-entrypoint.sh"]
+
+CMD java -jar /root/atlassian-bamboo-agent-installer-6.5.0.jar $BAMBOO_SERVER/agentServer/
+#CMD []
+
Binary file bamboo-agent/atlassian-bamboo-agent-installer-6.5.0.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamboo-agent/bamboo-capabilities.properties	Thu Jul 26 14:27:43 2018 +0100
@@ -0,0 +1,2 @@
+docker.compose=true
+agent.containerized=true
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamboo-agent/docker-entrypoint.sh	Thu Jul 26 14:27:43 2018 +0100
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -e
+
+# first arg is `-f` or `--some-option`
+if [ "${1#-}" != "$1" ]; then
+	set -- docker "$@"
+fi
+
+# if our command is a valid Docker subcommand, let's invoke it through Docker instead
+# (this allows for "docker run docker ps", etc)
+if docker help "$1" > /dev/null 2>&1; then
+	set -- docker "$@"
+fi
+
+# if we have "--link some-docker:docker" and not DOCKER_HOST, let's set DOCKER_HOST automatically
+if [ -z "$DOCKER_HOST" -a "$DOCKER_PORT_2375_TCP" ]; then
+	export DOCKER_HOST='tcp://docker:2375'
+fi
+
+if [ "$1" = 'dockerd' ]; then
+	cat >&2 <<-'EOW'
+		📎 Hey there!  It looks like you're trying to run a Docker daemon.
+		   You probably should use the "dind" image variant instead, something like:
+		     docker run --privileged --name some-overlay-docker -d docker:stable-dind --storage-driver=overlay
+		   See https://hub.docker.com/_/docker/ for more documentation and usage examples.
+	EOW
+	sleep 3
+fi
+
+exec "$@"
--- a/prod/usas-services.yml	Thu Jan 11 18:32:51 2018 +0000
+++ b/prod/usas-services.yml	Thu Jul 26 14:27:43 2018 +0100
@@ -24,6 +24,7 @@
       - DB_USER=usas
       - DB_PASS=${USAS_DB_PASSWORD:-usasdefault}
       - DB_POOL_LEAKDETECTIONTHRESHOLD=300000
+      - SSL_POLICY=${SSL_POLICY:-Mozilla-Modern}
       - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTHOST=${USPS_APP_HOST:-uspsapp-svr}
       - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_CLIENTDNSLOOKUP=true
       - USAS_MODULE_USPSINTEGRATION_CONFIGURATION_USPSCONFIGURATION_SERVERHOST=0.0.0.0
--- a/prod/usps-services.yml	Thu Jan 11 18:32:51 2018 +0000
+++ b/prod/usps-services.yml	Thu Jul 26 14:27:43 2018 +0100
@@ -24,6 +24,7 @@
       - DB_USER=usps
       - DB_PASS=${USPS_DB_PASSWORD:-uspsdefault}
       - DB_POOL_LEAKDETECTIONTHRESHOLD=300000
+      - SSL_POLICY=${SSL_POLICY:-Mozilla-Modern}
       - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTHOST=${USAS_APP_HOST:-usasapp-svr}
       - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_CLIENTDNSLOOKUP=true
       - USPS_MODULE_USASINTEGRATION_CONFIGURATION_USASCONFIGURATION_SERVERHOST=0.0.0.0
--- a/scripts/updates-apply.sh	Thu Jan 11 18:32:51 2018 +0000
+++ b/scripts/updates-apply.sh	Thu Jul 26 14:27:43 2018 +0100
@@ -12,7 +12,7 @@
 #
 # examples:
 #   /ssdt/apply-updates.sh /data/preview
-#   /ssdt/apply-updates.sh /data/preview usps
+#   /ssdt/apply-updates.sh /data/preview uspsapp
 #
 
 source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh"
@@ -34,12 +34,15 @@
       read  container eol <<< $line
       if [[ $container == *_1 ]]
       then
-        t=(${container//_/ })
-        service=${t[1]}
-        if [[ $service == $SERVICE ]]
+        if [[ $eol =~ "Up" ]]
         then
-           echo -e "\n$project: Updating $service"
-           docker-compose up -d $service
+           t=(${container//_/ })
+           service=${t[1]}
+           if [[ $service == $SERVICE ]]
+           then
+             echo -e "\n$project: Updating $service"
+             docker-compose up -d $service
+           fi
         fi
       fi
    done < <(docker-compose ps)
--- a/tomcat/Dockerfile	Thu Jan 11 18:32:51 2018 +0000
+++ b/tomcat/Dockerfile	Thu Jul 26 14:27:43 2018 +0100
@@ -1,4 +1,4 @@
-FROM tomcat:8.5.14-jre8
+FROM tomcat:8.5.31-jre8
 
 MAINTAINER Dave Smith <smith@nwoca.org>
 
--- a/tomcat/server.xml	Thu Jan 11 18:32:51 2018 +0000
+++ b/tomcat/server.xml	Thu Jul 26 14:27:43 2018 +0100
@@ -67,7 +67,8 @@
         <Valve className="org.apache.catalina.valves.AccessLogValve" 
 				directory="logs"
                 prefix="localhost_access_log" suffix=".txt"
-                pattern="%h %l %u %t &quot;%r&quot; %s %b" />
+                pattern="%h %l %u %t &quot;%r&quot; %s %b" 
+                maxDays="5"/>
 
       </Host>
     </Engine>