scofield 5 rokov pred
rodič
commit
effcab1626
4 zmenil súbory, kde vykonal 42 pridanie a 7 odobranie
  1. 5 5
      .drone.yml
  2. 7 0
      Dcokerfile.v2
  3. 29 1
      Dockerfile
  4. 1 1
      deploy-tmp.yaml

+ 5 - 5
.drone.yml

@@ -10,7 +10,7 @@ steps:
    environment:
      JNLP_ENV: qa
      JNLP_REPO: hub.evbj.easou.com
-     JNLP_TAG: v1.0.5
+     JNLP_TAG: v1.0.0
      JNLP_CONTAINER_PORT: 8080
     #  JNLP_WAR: ums.war
      JNLP_INGRESS: nginx
@@ -21,10 +21,10 @@ steps:
      JNLP_REPLICAS: 2
      JNLP_STORAGE_CAPACITY: 200Gi
      JNLP_MOUNT_PATH: /data
-     JNLP_LIVENESS_INIT: 60
-     JNLP_LIVENESS_PER: 10
-     JNLP_READINESS_INIT: 60
-     JNLP_READINESS_PER: 10
+     JNLP_LIVENESS_INIT: 120
+     JNLP_LIVENESS_PER: 30
+     JNLP_READINESS_INIT: 120
+     JNLP_READINESS_PER: 30
    commands:
      - wrapper.sh  /bin/sh
      - docker --config /etc/docker build -t "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG" . -f Dockerfile

+ 7 - 0
Dcokerfile.v2

@@ -0,0 +1,7 @@
+#centos68-resin:3.1.6-jdk6
+FROM hub.evbj.easou.com/qa/book-touchrs:v1.0.1
+LABEL author="scofield[scofield_shi@staff.easou.com]"
+
+#start resin
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["gosu", "book", "/app/soft/resin-pro-3.1.6/bin/httpd.sh"]

+ 29 - 1
Dockerfile

@@ -1,7 +1,35 @@
 #centos68-resin:3.1.6-jdk6
-FROM hub.evbj.easou.com/qa/book-touchrs:v1.0.1
+FROM hub.evbj.easou.com/dev/centos:6.8
+
 LABEL author="scofield[scofield_shi@staff.easou.com]"
 
+ENV LANG C.UTF-8
+ENV TZ=Asia/Shanghai
+ENV JAVA_HOME /usr/java/jdk1.6.0_21
+ENV RESIN_HOME /app/soft/resin-pro-3.1.6
+ENV WAR="http://10.26.22.185:9000/psop/conf/dockerConfig/book-touchrs/ROOT.war"
+
+ADD http://10.26.22.185:9000/psop/conf/dockerConfig/resin-api/gosu /usr/local/bin/gosu
+ADD http://10.26.22.185:9000/psop/soft/resin-pro-3.1.6.tar.gz /app/soft/resin-pro-3.1.6.tar.gz
+
+#install jdk
+RUN rpm -Uvh http://10.26.22.185:9000/psop/soft/jdk-6u21-linux-amd64.rpm \
+    && useradd book \
+    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
+    && chmod +x /usr/local/bin/gosu \
+    && gosu nobody true
+
+#install resin-3.1.6
+RUN tar -zxf /app/soft/resin-pro-3.1.6.tar.gz -C /app/soft  \
+    && rm -f /app/soft/resin-pro-3.1.6.tar.gz \
+    && rm -rf /app/soft/resin-pro-3.1.6/webapps/* \
+    && rm -f /app/soft/resin-pro-3.1.6/conf/resin.conf
+
+ADD $WAR  /app/soft/resin-pro-3.1.6/webapps/
+ADD entrypoint.sh /usr/bin/entrypoint.sh
+ADD resin.conf /app/soft/resin-pro-3.1.6/conf/resin.conf
+RUN chown book:book -R /app/soft  && chmod +x /usr/bin/entrypoint.sh
+
 #start resin
 ENTRYPOINT ["entrypoint.sh"]
 CMD ["gosu", "book", "/app/soft/resin-pro-3.1.6/bin/httpd.sh"]

+ 1 - 1
deploy-tmp.yaml

@@ -42,7 +42,7 @@ spec:
           initialDelaySeconds: $JNLP_LIVENESS_INIT
           periodSeconds: $JNLP_LIVENESS_PER
         readinessProbe:
-          tcpSocket: 
+          tcpSocket:
             port: $JNLP_CONTAINER_PORT
           initialDelaySeconds: $JNLP_READINESS_INIT
           periodSeconds: $JNLP_READINESS_PER