Browse Source

add version 1.0.0

scofield 5 years ago
parent
commit
19eacf06d8
3 changed files with 10 additions and 35 deletions
  1. 6 6
      .drone.yml
  2. 3 28
      Dockerfile
  3. 1 1
      ppctl.py

+ 6 - 6
.drone.yml

@@ -8,7 +8,7 @@ steps:
   #  pull: always
    privileged: true
    environment:
-     JNLP_ENV: qa
+     JNLP_ENV: pro
      JNLP_REPO: hub.evbj.easou.com
      JNLP_TAG: v1.0.0
      JNLP_CONTAINER_PORT: 8080
@@ -21,18 +21,18 @@ steps:
      JNLP_REPLICAS: 2
      JNLP_STORAGE_CAPACITY: 200Gi
      JNLP_MOUNT_PATH: /data
-     JNLP_LIVENESS_INIT: 120
-     JNLP_LIVENESS_PER: 30
-     JNLP_READINESS_INIT: 120
-     JNLP_READINESS_PER: 30
+     JNLP_LIVENESS_INIT: 60
+     JNLP_LIVENESS_PER: 10
+     JNLP_READINESS_INIT: 60
+     JNLP_READINESS_PER: 10
    commands:
      - wrapper.sh  /bin/sh
      - docker --config /etc/docker build -t "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG" . -f Dockerfile
      - docker --config /etc/docker push "$JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG"
      - python ppctl.py -b
      - python ppctl.py -a
-     - python ppctl.py -c
      - python ppctl.py -d
+     - python ppctl.py -c
 
  - name: success
    image: clem109/drone-wechat

+ 3 - 28
Dockerfile

@@ -1,34 +1,9 @@
 #centos68-resin:3.1.6-jdk6
-FROM hub.evbj.easou.com/dev/centos:6.8
-
+FROM hub.evbj.easou.com/qa/book-touchrs:v1.0.0
 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
+RUN rm -rf /app/soft/resin-pro-3.1.6/webapps/*  /data/project/*
+ADD http://10.26.22.185:9000/psop/conf/dockerConfig/book-touchrs/ROOT.war /app/soft/resin-pro-3.1.6/webapps/
 
 #start resin
 ENTRYPOINT ["entrypoint.sh"]

+ 1 - 1
ppctl.py

@@ -139,7 +139,7 @@ def deployStatus():
                 chk_status = 1
                 break
             else:
-                if x < 20:
+                if x < 40:
                     time.sleep(15)
                 else:
                     chk_status = 0