Ver Fonte

删除历史版本记录,初始化仓库

yangxg há 1 ano atrás
commit
822520ffac
20 ficheiros alterados com 868 adições e 0 exclusões
  1. BIN
      .DS_Store
  2. 90 0
      .drone.yml
  3. 10 0
      .idea/.gitignore
  4. 9 0
      .idea/book-duiba.iml
  5. 6 0
      .idea/misc.xml
  6. 8 0
      .idea/modules.xml
  7. 6 0
      .idea/vcs.xml
  8. 12 0
      Dockerfile
  9. 35 0
      Dockerfile-v1
  10. 13 0
      README.md
  11. BIN
      cmcc.war
  12. BIN
      cmcc.war.bak
  13. 9 0
      configmap.json
  14. 91 0
      deploy-tmp-v2.yaml
  15. 109 0
      deploy-tmp.yaml
  16. 12 0
      entrypoint.sh
  17. 29 0
      ingress.yaml
  18. 68 0
      jconsole_pwd/jmxremote.password
  19. 333 0
      resin.conf
  20. 28 0
      supervisord.conf

BIN
.DS_Store


+ 90 - 0
.drone.yml

@@ -0,0 +1,90 @@
+kind: pipeline
+type: kubernetes
+name: book-duiba
+
+clone:
+  disable: true
+
+metadata:
+  namespace: ci
+
+steps:
+ - name: clone
+   image: hub.evbj.easou.com/dev/alpine-git:20200622
+   commands:
+   - git clone --depth=1 $DRONE_GIT_HTTP_URL .
+
+ - name: build
+   image: plugins/docker
+   settings:
+     username: admin
+     password: Easou2)1*
+     insecure: true
+     mirror: https://ci7pm4nx.mirror.aliyuncs.com
+     registry: hub.evbj.easou.com
+     repo: hub.evbj.easou.com/pro/${DRONE_REPO_NAME}
+     tag: v1.1.55
+     
+ - name: deployment
+   image: hub.evbj.easou.com/dev/drone-agent:v3.0.1
+   pull: always
+   # privileged: true
+   environment:
+     JNLP_ENV: pro
+     JNLP_REPLICAS: 2
+     JNLP_TAG: v1.1.55
+     JNLP_VERSION: v1  # default v1, v2 for canary
+     DEPLOY_ENV: k8s-1 # 可以选择把应用部署到集群:k8s-1 or k8s-2
+     JNLP_REPO: hub.evbj.easou.com
+     JNLP_CONTAINER_PORT: 8080
+     JNLP_INGRESS: nginx
+     JNLP_SVC_MODE: http
+     JNLP_STORAGE_CLASS: rbd
+     JNLP_DOMAIN: .ieasou.cn
+     JNLP_CONTROL: StatefulSet
+     JNLP_STORAGE_CAPACITY: 100Gi
+     JNLP_MOUNT_PATH: /data
+     JNLP_LIVENESS_INIT: 60
+     JNLP_LIVENESS_PER: 15
+     JNLP_READINESS_INIT: 60
+     JNLP_READINESS_PER: 15
+     JNLP_INGRESS_PUB: yes
+   commands:
+     # 切换目标集群
+     - kubecm s $DEPLOY_ENV
+     # 生成配置YAML文件
+     - python3 /root/tools.py -b
+     # 部署服务到kubernetes上
+     - python3 /root/tools.py -a
+     # 检查服务部署状态
+     - python3 /root/tools.py -c
+     # 添加dns解析记录,生成访问域名
+     - python3 /root/tools.py -d
+
+ - name: success
+   image: hub.evbj.easou.com/dev/drone-wechat:20200622
+   settings:
+     corpid: ww419ee4063735e1c0
+     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
+     agent_id: 1000004
+     title: "Pipeline ${DRONE_REPO_NAME} Success"
+     description: "${DRONE_BUILD_LINK} 部署完成"
+     msg_url: ${DRONE_BUILD_LINK}
+     btn_txt: "否"
+   when:
+     status:
+     - success
+
+ - name: failure
+   image: hub.evbj.easou.com/dev/drone-wechat:20200622
+   settings:
+     corpid: ww419ee4063735e1c0
+     corp_secret: zpiRBLETH9eLwIMQ4eJ_r_dcm3BPSGeLHvTcft8Ot-M
+     agent_id: 1000004
+     title: "Pipeline ${DRONE_REPO_NAME} Failure"
+     description: "${DRONE_BUILD_LINK} 部署失败,请检查配置!"
+     msg_url: ${DRONE_BUILD_LINK}
+     btn_txt: "否"
+   when:
+     status:
+     - failure

+ 10 - 0
.idea/.gitignore

@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Zeppelin ignored files
+/ZeppelinRemoteNotebooks/

+ 9 - 0
.idea/book-duiba.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/book-duiba.iml" filepath="$PROJECT_DIR$/.idea/book-duiba.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 12 - 0
Dockerfile

@@ -0,0 +1,12 @@
+#FROM hub.evbj.easou.com/dev/book-duiba:v1.0.0
+FROM hub.evbj.easou.com/pro/book-duiba:v1.1.36
+
+COPY ./cmcc.war /opt/cmcc.war
+COPY ./entrypoint.sh /usr/bin/entrypoint.sh
+COPY ./resin.conf /app/soft/resin-pro-3.1.6/conf/resin.conf
+
+RUN chmod +x /usr/bin/entrypoint.sh
+
+
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["supervisord"]

+ 35 - 0
Dockerfile-v1

@@ -0,0 +1,35 @@
+FROM centos:7
+
+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
+
+COPY ./duiba.war /opt/duiba.war
+COPY ./cmcc.war /opt/cmcc.war
+COPY ./entrypoint.sh /usr/bin/entrypoint.sh
+COPY ./jconsole_pwd /opt/jconsole_pwd
+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
+ADD http://mirrors.163.com/.help/CentOS7-Base-163.repo /opt/Centos-7.repo
+ADD http://mirrors.aliyun.com/repo/epel-7.repo /opt/epel-7.repo
+
+RUN rm -rf /etc/yum.repos.d/* \
+    && mv /opt/*.repo /etc/yum.repos.d/ \
+    && yum clean all \
+    && yum install supervisor -y \
+    && rpm -Uvh http://10.26.22.185:9000/psop/soft/jdk-6u21-linux-amd64.rpm \
+    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
+    && 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 \
+    && chmod +x /usr/bin/entrypoint.sh
+
+COPY supervisord.conf /etc/supervisord.conf
+COPY ./resin.conf /app/soft/resin-pro-3.1.6/conf/resin.conf
+
+
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["supervisord"]

+ 13 - 0
README.md

@@ -0,0 +1,13 @@
+# book-duiba
+
+```
+小说兑吧&cmcc接口
+qd01-vm030-book-duiba001
+qd01-vm040-book-duiba002
+原VIP: 140.249.4.208
+duiba.easou.com
+duiba.appeasou.com   在线使用
+20210413 init
+del duiba.war
+
+```

BIN
cmcc.war


BIN
cmcc.war.bak


+ 9 - 0
configmap.json

@@ -0,0 +1,9 @@
+{
+    "apiVersion": "v1",
+    "data": CMDATA,
+    "kind": "ConfigMap",
+    "metadata": {
+    "name": "tcp-services",
+    "namespace": "ingress-nginx"
+    }
+}

+ 91 - 0
deploy-tmp-v2.yaml

@@ -0,0 +1,91 @@
+---
+apiVersion: apps/v1
+kind: $JNLP_CONTROL
+metadata:
+  name: $DRONE_REPO_NAME-v2
+  namespace: $JNLP_ENV
+  labels:
+    app: $DRONE_REPO_NAME
+spec:
+  serviceName: $DRONE_REPO_NAME-v2
+  replicas: $JNLP_REPLICAS
+  selector:
+    matchLabels:
+      app: $DRONE_REPO_NAME-v2
+  template:
+    metadata:
+      labels:
+        app: $DRONE_REPO_NAME-v2
+    spec:
+      terminationGracePeriodSeconds: 180
+      initContainers:
+        - name: init
+          image: $JNLP_REPO/dev/busybox
+          command: ["chmod","777","-R","$JNLP_MOUNT_PATH"]
+          imagePullPolicy: Always
+          volumeMounts:
+          - name: volume
+            mountPath: $JNLP_MOUNT_PATH
+      containers:
+      - name: $DRONE_REPO_NAME-v2
+        image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
+        imagePullPolicy: Always
+        ports:
+        - containerPort: $JNLP_CONTAINER_PORT
+          name: port
+        volumeMounts:
+        - name: volume
+          mountPath: $JNLP_MOUNT_PATH
+        livenessProbe:
+          tcpSocket:
+            port: $JNLP_CONTAINER_PORT
+          initialDelaySeconds: $JNLP_LIVENESS_INIT
+          periodSeconds: $JNLP_LIVENESS_PER
+        readinessProbe:
+          tcpSocket:
+            port: $JNLP_CONTAINER_PORT
+          initialDelaySeconds: $JNLP_READINESS_INIT
+          periodSeconds: $JNLP_READINESS_PER
+  volumeClaimTemplates:
+  - metadata:
+      name: volume
+    spec:
+      accessModes: ["ReadWriteOnce"]
+      storageClassName: rbd
+      resources:
+        requests:
+          storage: $JNLP_STORAGE_CAPACITY
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: $DRONE_REPO_NAME-v2-svc
+  namespace: $JNLP_ENV
+  labels:
+    app: $DRONE_REPO_NAME-v2-svc
+spec:
+  type: NodePort
+  ports:
+  - port: $JNLP_CONTAINER_PORT
+    targetPort: $JNLP_CONTAINER_PORT
+  selector:
+    app: $DRONE_REPO_NAME-v2
+---
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+  name: $DRONE_REPO_NAME-v2-ingress
+  namespace: $JNLP_ENV
+  annotations:
+    kubernetes.io/ingress.class: $JNLP_INGRESS
+    nginx.ingress.kubernetes.io/canary: "true"
+    nginx.ingress.kubernetes.io/canary-weight: "10"
+spec:
+  rules:
+  - host: $JNLP_ENV-$DRONE_REPO_NAME$JNLP_DOMAIN
+    http:
+      paths:
+      - path: /
+        backend:
+          serviceName: $DRONE_REPO_NAME-v2-svc
+          servicePort: $JNLP_CONTAINER_PORT

+ 109 - 0
deploy-tmp.yaml

@@ -0,0 +1,109 @@
+---
+apiVersion: apps/v1
+kind: $JNLP_CONTROL
+metadata:
+  name: $DRONE_REPO_NAME
+  namespace: $JNLP_ENV
+  labels:
+    app: $DRONE_REPO_NAME
+spec:
+  serviceName: $DRONE_REPO_NAME
+  replicas: $JNLP_REPLICAS
+  selector:
+    matchLabels:
+      app: $DRONE_REPO_NAME
+  template:
+    metadata:
+      labels:
+        app: $DRONE_REPO_NAME
+    spec:
+      affinity:
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - labelSelector:
+                matchExpressions:
+                  - key: app
+                    operator: In
+                    values:
+                      - book-duiba
+              topologyKey: kubernetes.io/hostname
+      terminationGracePeriodSeconds: 180
+      dnsPolicy: None
+      dnsConfig:
+        nameservers:
+          - 223.5.5.5
+          - 10.26.22.50
+      initContainers:
+        - name: init
+          image: $JNLP_REPO/dev/busybox
+          command: ["chmod","777","-R","$JNLP_MOUNT_PATH"]
+          imagePullPolicy: Always
+          volumeMounts:
+          - name: volume
+            mountPath: $JNLP_MOUNT_PATH
+      #nodeSelector:
+      #  app.touchrs: touchrs
+      containers:
+      - name: $DRONE_REPO_NAME
+        image: $JNLP_REPO/$JNLP_ENV/$DRONE_REPO_NAME:$JNLP_TAG
+        imagePullPolicy: Always
+        ports:
+        - containerPort: $JNLP_CONTAINER_PORT
+          name: port
+        volumeMounts:
+        - name: volume
+          mountPath: $JNLP_MOUNT_PATH
+        livenessProbe:
+          tcpSocket:
+            port: $JNLP_CONTAINER_PORT
+          initialDelaySeconds: $JNLP_LIVENESS_INIT
+          periodSeconds: $JNLP_LIVENESS_PER
+        readinessProbe:
+          tcpSocket:
+            port: $JNLP_CONTAINER_PORT
+          initialDelaySeconds: $JNLP_READINESS_INIT
+          periodSeconds: $JNLP_READINESS_PER
+  volumeClaimTemplates:
+  - metadata:
+      name: volume
+    spec:
+      accessModes: ["ReadWriteOnce"]
+      storageClassName: rbd
+#      storageClassName: ceph-block
+      resources:
+        requests:
+          storage: $JNLP_STORAGE_CAPACITY
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: $DRONE_REPO_NAME-svc
+  namespace: $JNLP_ENV
+  labels:
+    app: $DRONE_REPO_NAME-svc
+spec:
+  type: NodePort
+  ports:
+  - port: $JNLP_CONTAINER_PORT
+    targetPort: $JNLP_CONTAINER_PORT
+  selector:
+    app: $DRONE_REPO_NAME
+---
+kind: Ingress
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: $DRONE_REPO_NAME-ingress
+  namespace: $JNLP_ENV
+spec:
+  rules:
+  - host: $JNLP_ENV-$DRONE_REPO_NAME$JNLP_DOMAIN
+    http:
+      paths:
+      - path: /
+        pathType: Prefix
+        backend:
+          service:
+            name: $DRONE_REPO_NAME-svc
+            port:
+              number: $JNLP_CONTAINER_PORT
+  ingressClassName: nginx

+ 12 - 0
entrypoint.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e 
+set -o pipefail
+
+mkdir -p /data/duiba/webapps /data/log/resin-books /data/log/devlog
+rm -rf /data/duiba/webapps/*
+cp /opt/cmcc.war  /data/duiba/webapps/
+cp -a /opt/jconsole_pwd /app/soft/resin-pro-3.1.6/
+chmod 600 /app/soft/resin-pro-3.1.6/jconsole_pwd/jmxremote.password
+
+exec "$@"

+ 29 - 0
ingress.yaml

@@ -0,0 +1,29 @@
+kind: Ingress
+apiVersion: networking.k8s.io/v1
+metadata:
+  name: book-duiba
+  namespace: pro
+  annotations:
+    kubernetes.io/ingress.class: nginx
+spec:
+  rules:
+    - host: duiba.easou.com
+      http:
+        paths:
+          - path: /
+            pathType: ImplementationSpecific
+            backend:
+              service:
+                name: book-duiba-svc
+                port:
+                  number: 8080
+    - host: duiba.appeasou.com
+      http:
+        paths:
+          - path: /
+            pathType: ImplementationSpecific
+            backend:
+              service:
+                name: book-duiba-svc
+                port:
+                  number: 8080

+ 68 - 0
jconsole_pwd/jmxremote.password

@@ -0,0 +1,68 @@
+# ----------------------------------------------------------------------
+#           Template for jmxremote.password
+#
+# o Copy this template to jmxremote.password
+# o Set the user/password entries in jmxremote.password
+# o Change the permission of jmxremote.password to read-only
+#   by the owner.
+#
+# See below for the location of jmxremote.password file.
+# ----------------------------------------------------------------------
+
+##############################################################
+#        Password File for Remote JMX Monitoring
+##############################################################
+#
+# Password file for Remote JMX API access to monitoring.  This
+# file defines the different roles and their passwords.  The access
+# control file (jmxremote.access by default) defines the allowed
+# access for each role.  To be functional, a role must have an entry
+# in both the password and the access files.
+#
+# Default location of this file is $JRE/lib/management/jmxremote.password
+# You can specify an alternate location by specifying a property in 
+# the management config file $JRE/lib/management/management.properties
+# or by specifying a system property (See that file for details).
+
+
+##############################################################
+#    File permissions of the jmxremote.password file
+##############################################################
+#      Since there are cleartext passwords stored in this file,
+#      this file must be readable by ONLY the owner,
+#      otherwise the program will exit with an error. 
+#
+# The file format for password and access files is syntactically the same
+# as the Properties file format.  The syntax is described in the Javadoc
+# for java.util.Properties.load.
+# Typical password file has multiple  lines, where each line is blank,
+# a comment (like this one), or a password entry.
+#
+#
+# A password entry consists of a role name and an associated
+# password.  The role name is any string that does not itself contain
+# spaces or tabs.  The password is again any string that does not
+# contain spaces or tabs.  Note that passwords appear in the clear in
+# this file, so it is a good idea not to use valuable passwords.
+#
+# A given role should have at most one entry in this file.  If a role
+# has no entry, it has no access.
+# If multiple entries are found for the same role name, then the last one
+# is used.
+#
+# In a typical installation, this file can be read by anybody on the
+# local machine, and possibly by people on other machines.
+# For # security, you should either restrict the access to this file,
+# or specify another, less accessible file in the management config file
+# as described above.
+#
+# Following are two commented-out entries.  The "measureRole" role has
+# password "QED".  The "controlRole" role has password "R&D".
+#
+# monitorRole  QED
+# controlRole   R&D
+
+yalanqin yalanqin
+jking jking
+laoxie laoxie
+udoo udoo

+ 333 - 0
resin.conf

@@ -0,0 +1,333 @@
+<!--
+   - Resin 3.1 configuration file.
+  -->
+<resin xmlns="http://caucho.com/ns/resin"
+       xmlns:resin="http://caucho.com/ns/resin/core">
+
+  <!-- adds all .jar files under the resin/lib directory -->
+  <class-loader>
+    <tree-loader path="${resin.home}/ext-lib"/>
+    <tree-loader path="${resin.root}/ext-lib"/>
+
+    <tree-loader path="${resin.home}/lib"/>
+    <tree-loader path="${resin.root}/lib"/>
+  </class-loader>
+
+  <!--
+     - Management configuration
+     -
+     - Remote management requires at least one enabled admin user.
+    -->
+  <management path="${resin.root}/admin">
+    <user name="admin" password="password" disable="true"/>
+
+    <resin:if test="${resin.professional}">
+      <deploy-service/>
+      <jmx-service/>
+      <log-service/>
+      <xa-log-service/>
+    </resin:if>
+  </management>
+
+  <!--
+     - Logging configuration for the JDK logging API.
+    -->
+  <log name="" level="info" path="stdout:"
+       timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
+ <log name='' level='fine' path='stderr:' timestamp="[%Y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
+  <!--
+     - 'info' for production
+     - 'fine' or 'finer' for development and troubleshooting
+    -->
+  <logger name="com.caucho" level="info"/>
+
+  <logger name="com.caucho.java" level="config"/>
+  <logger name="com.caucho.loader" level="config"/>
+
+  <!--
+     - For production sites, change dependency-check-interval to something
+     - like 600s, so it only checks for updates every 10 minutes.
+    -->
+  <dependency-check-interval>2s</dependency-check-interval>
+
+  <!--
+     - SMTP server for sending mail notifications
+    -->
+  <!--
+  <system-property mail.smtp.host="127.0.0.1"/>
+  <system-property mail.smtp.port="25"/>
+  -->
+
+  <!--
+     - Sets the default character encoding to utf-8
+     -
+     - <character-encoding>utf-8</character-encoding>
+    -->
+
+  <!--
+     - You can change the compiler to "javac", "eclipse" or "internal".
+    -->
+  <javac compiler="internal" args="-source 1.5"/>
+
+  <!-- Security providers.
+     - <security-provider>
+     -    com.sun.net.ssl.internal.ssl.Provider
+     - </security-provider>
+    -->
+
+  <!-- Uncomment to use Resin's XML implementations
+     -
+     - <system-property javax.xml.parsers.DocumentBuilderFactory
+     -                 ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
+     - <system-property javax.xml.parsers.SAXParserFactory
+     -                 ="com.caucho.xml.parsers.XmlSAXParserFactory"/>
+    -->
+
+  <cluster id="app-tier">
+    <!-- sets the content root for the cluster, relative to server.root -->
+    <root-directory>.</root-directory>
+
+    <server-default>
+      <!-- The http port -->
+      <http address="*" port="8080"/>
+
+      <!--
+         - SSL port configuration:
+         -
+         - <http address="*" port="8443">
+         -   <openssl>
+         -     <certificate-file>keys/gryffindor.crt</certificate-file>
+         -     <certificate-key-file>keys/gryffindor.key</certificate-key-file>
+         -     <password>test123</password>
+         -   </openssl>
+         - </http>
+        -->
+
+      <!--
+         - The JVM arguments
+        -->
+      <jvm-arg>-server</jvm-arg>
+      <jvm-arg>-Xmx1536m</jvm-arg>
+      <jvm-arg>-Xms1536m</jvm-arg>
+      <jvm-arg>-Xmn256m</jvm-arg>
+      <jvm-arg>-Xss1m</jvm-arg>
+      <jvm-arg>-XX:PermSize=128m</jvm-arg>
+      <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
+
+      <jvm-arg>-XX:+PrintGCDetails</jvm-arg>
+      <jvm-arg>-Xloggc:jvm.log</jvm-arg>
+      <jvm-arg>-XX:ParallelGCThreads=8</jvm-arg>
+      <jvm-arg>-XX:+UseConcMarkSweepGC</jvm-arg>
+      <!--<jvm-arg>-XX:CMSFullGCsBeforeCompaction=5</jvm-arg>
+      <jvm-arg>-XX:+UseCMSCompactAtFullCollection</jvm-arg>
+      <jvm-arg>-XX:+UseCMSInitiatingOccupancyOnly</jvm-arg>
+      <jvm-arg>-XX:CMSInitiatingOccupancyFraction=70</jvm-arg>
+      -->
+<!--
+      <jvm-arg>-Xincgc</jvm-arg>
+-->
+      <jvm-arg>-Xdebug</jvm-arg>
+      <jvm-arg>-Dnetworkaddress.cache.ttl=-1</jvm-arg>
+
+      <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
+      <jvm-arg>-Dcom.sun.management.jmxremote.port=9889</jvm-arg>
+      <jvm-arg>-Dcom.sun.management.jmxremote.authenticate=true</jvm-arg>
+      <jvm-arg>-Dcom.sun.management.jmxremote.password.file=/app/soft/resin-pro-3.1.6/jconsole_pwd/jmxremote.password</jvm-arg>
+      <jvm-arg>-Dcom.sun.management.jmxremote.ssl=false</jvm-arg>
+
+      <!--
+         - Uncomment to enable admin heap dumps
+         - <jvm-arg>-agentlib:resin</jvm-arg>
+        -->
+
+      <!--
+         - arguments for the watchdog process
+        -->
+      <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
+      <watchdog-port>9600</watchdog-port>
+
+      <!--
+         - Configures the minimum free memory allowed before Resin
+         - will force a restart.
+        -->
+      <memory-free-min>1M</memory-free-min>
+
+      <!-- Maximum number of threads. -->
+      <thread-max>350</thread-max>
+
+      <!-- Configures the socket timeout -->
+      <socket-timeout>15s</socket-timeout>
+
+      <!-- Configures the keepalive -->
+      <keepalive-max>300</keepalive-max>
+      <keepalive-timeout>15s</keepalive-timeout>
+
+      <!--
+         - If starting bin/resin as root on Unix, specify the user name
+         - and group name for the web server user.
+         -
+         - <user-name>resin</user-name>
+         - <group-name>resin</group-name>
+        -->
+    </server-default>
+
+    <!-- define the servers in the cluster -->
+    <server id="" address="127.0.0.1" port="6800" load-balance-socket-timeout="600s"/>
+
+    <!--
+       - Configures the persistent store for single-server or clustered
+       - in Resin professional.
+      -->
+    <resin:if test="${resin.professional}">
+      <persistent-store type="cluster">
+        <init path="session"/>
+      </persistent-store>
+    </resin:if>
+
+    <!--
+       - For security, use a different cookie for SSL sessions.
+       - <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
+      -->
+
+    <!--
+       - Enables the cache (available in Resin Professional)
+      -->
+    <resin:if test="${resin.professional}">
+      <cache path="cache" memory-size="64M">
+        <!-- Vary header rewriting for IE -->
+        <rewrite-vary-as-private/>
+      </cache>
+    </resin:if>
+
+    <!--
+       - Enables periodic checking of the server status and
+       - check for deadlocks..
+       -
+       - All servers can add <url>s to be checked.
+      -->
+    <resin:if test="${resin.professional}">
+      <ping>
+        <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
+      </ping>
+    </resin:if>
+
+    <!--
+       - Defaults applied to each web-app.
+      -->
+    <web-app-default>
+      <prologue>
+        <!--
+           - Extension library for common jar files.  The ext is safe
+           - even for non-classloader aware jars.  The loaded classes
+           - will be loaded separately for each web-app, i.e. the class
+           - itself will be distinct.
+          -->
+        <class-loader>
+          <tree-loader path="${resin.root}/ext-webapp-lib"/>
+        </class-loader>
+
+        <!--
+           - Enable EL expressions in Servlet and Filter init-param
+          -->
+        <allow-servlet-el/>
+
+        <servlet-mapping servlet-class='com.caucho.servlets.ResinStatusServlet'>
+          <url-pattern>/resin-status</url-pattern>
+          <init enable="read"/>
+        </servlet-mapping>
+
+      </prologue>
+
+      <!--
+         - Sets timeout values for cacheable pages, e.g. static pages.
+        -->
+      <cache-mapping url-pattern="/" expires="60m"/>
+      <cache-mapping url-pattern="/*.m" expires="60m"/>
+      <cache-mapping url-pattern="/i/*/*.gif" expires="7D"/>
+      <cache-mapping url-pattern="/i/*/*.jpg" expires="7D"/>
+
+      <!--
+         - for security, disable session URLs by default.
+        -->
+      <session-config>
+        <enable-url-rewriting>false</enable-url-rewriting>
+        <session-timeout>1</session-timeout>
+        <session-max>8192</session-max>
+      </session-config>
+
+      <!--
+         - For security, set the HttpOnly flag in cookies.
+         - <cookie-http-only/>
+        -->
+
+      <!--
+         - Some JSP packages have incorrect .tld files.  It's possible to
+         - set validate-taglib-schema to false to work around these packages.
+        -->
+        <jsp>
+          <validate-taglib-schema>true</validate-taglib-schema>
+          <fast-jstl>true</fast-jstl>
+          <fast-jsf>false</fast-jsf>
+        </jsp>
+    </web-app-default>
+
+    <!-- includes the app-default for default web-app behavior -->
+    <resin:import path="${resin.home}/conf/app-default.xml"/>
+
+    <!--
+       - Sample database pool configuration
+       -
+       - The JDBC name is java:comp/env/jdbc/test
+      -->
+
+    <!--
+       - Default host configuration applied to all virtual hosts.
+      -->
+    <host-default>
+      <!--
+         - With another web server, like Apache, this can be commented out
+         - because the web server will log this information.
+        -->
+      <!-- <access-log path="logs/access.log"
+            format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
+            rollover-period="1W"/>
+      -->
+      <!-- creates the webapps directory for .war expansion -->
+      <web-app-deploy path="webapps"/>
+
+      <!-- creates the deploy directory for .ear expansion -->
+      <ear-deploy path="deploy">
+        <ear-default>
+          <ejb-server>
+            <config-directory>WEB-INF</config-directory>
+          </ejb-server>
+        </ear-default>
+      </ear-deploy>
+
+      <!-- creates the deploy directory for .rar expansion -->
+      <resource-deploy path="deploy"/>
+    </host-default>
+
+    <!-- configures a deployment directory for virtual hosts -->
+    <host-deploy path="hosts">
+      <host-default>
+        <resin:import path="host.xml" optional="true"/>
+      </host-default>
+    </host-deploy>
+
+    <!-- configures the default host, matching any host name -->
+    <host id="" root-directory=".">
+          <web-app id="/" character-encoding='UTF-8' document-directory="/data/duiba/webapps">
+          <stdout-log path="/data/log/resin-books/stdout.log" rollover-period="1W"/>
+          <stderr-log path="/data/log/resin-books/stderr.log" rollover-period='1W'/>
+          <access-log path='/data/log/resin-books/access.log'
+                format='%h{]%l{]%u{]%t{]"%r"{]%s{]%D{]%b{]"%{Referer}i"{]"%{User-Agent}i"{]"%{X-Forwarded-For}i"' rollover-size="1024mb" rollover-period='1D'/>
+        </web-app>
+       <web-app-deploy path="/data/duiba/webapps"/>
+    </host>
+  </cluster>
+
+  <!--
+     - Configuration for the web-tier/load-balancer
+    -->
+</resin>

+ 28 - 0
supervisord.conf

@@ -0,0 +1,28 @@
+[unix_http_server]
+file=/var/run/supervisor/supervisor.sock   ; (the path to the socket file)
+
+
+[supervisord]
+logfile=/var/log/supervisor/supervisord.log  ; (main log file;default $CWD/supervisord.log)
+logfile_maxbytes=50MB       ; (max main logfile bytes b4 rotation;default 50MB)
+logfile_backups=10          ; (num of main logfile rotation backups;default 10)
+loglevel=info               ; (log level;default info; others: debug,warn,trace)
+pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
+nodaemon=true              ; (start in foreground if true;default false)
+minfds=10240                 ; (min. avail startup file descriptors;default 1024)
+minprocs=2000                ; (min. avail process descriptors;default 200)
+
+[rpcinterface:supervisor]
+supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
+
+[supervisorctl]
+serverurl=unix:///var/run/supervisor/supervisor.sock ; use a unix:// URL  for a unix socket
+
+
+[program:book-duiba]
+command=/app/soft/resin-pro-3.1.6/bin/httpd.sh         ; the program (relative uses PATH, can take args)
+process_name=%(program_name)s ; process_name expr (default %(program_name)s)
+autostart=true                ; start at supervisord start (default: true)
+autorestart=true              ; retstart at unexpected quit (default: true)
+stdout_logfile=/data/log/devlog/stdout.log
+stderr_logfile=/data/log/devlog/stderr.log