root 2 éve
szülő
commit
abf66ae174
5 módosított fájl, 93 hozzáadás és 4 törlés
  1. 1 1
      .drone.yml
  2. 1 1
      Dockerfile
  3. 89 0
      deploy-tmp.yaml
  4. 1 1
      entrypoint.sh
  5. 1 1
      resin.properties

+ 1 - 1
.drone.yml

@@ -23,4 +23,4 @@ steps:
      mirror: https://ci7pm4nx.mirror.aliyuncs.com
      registry: hub.evbj.easou.com
      repo: hub.evbj.easou.com/pro/${DRONE_REPO_NAME}
-     tag: v3.0.0-apm
+     tag: v3.0.0-apm

+ 1 - 1
Dockerfile

@@ -1,7 +1,7 @@
 FROM hub.evbj.easou.com/dev/book-api:v3base
 
 
-COPY supervisord.conf /etc/supervisord.conf
+COPY resin.properties /app/soft/resin-4.0.65/conf/resin.properties
 COPY entrypoint.sh /usr/bin/entrypoint.sh
 
 

+ 89 - 0
deploy-tmp.yaml

@@ -0,0 +1,89 @@
+---
+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:
+      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
+        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-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
+---
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+  name: $DRONE_REPO_NAME-ingress
+  namespace: $JNLP_ENV
+  annotations:
+    kubernetes.io/ingress.class: $JNLP_INGRESS
+spec:
+  rules:
+  - host: $JNLP_ENV-$DRONE_REPO_NAME$JNLP_DOMAIN
+    http:
+      paths:
+      - path: /
+        backend:
+          serviceName: $DRONE_REPO_NAME-svc
+          servicePort: $JNLP_CONTAINER_PORT

+ 1 - 1
entrypoint.sh

@@ -4,7 +4,7 @@ set -e
 set -o pipefail
 
 rm -f /app/soft/resin-4.0.65/log/jvm-app-0.log
-
+mkdir -p /data/project /data/log  /log
 
 
 exec "$@"

+ 1 - 1
resin.properties

@@ -77,7 +77,7 @@ setuid_group  :
 
 # Arg passed directly to the JVM
 jvm_args  : -Xmx8192m -Xms8192m -Xmn3072m  -XX:MaxPermSize=512m
-jvm_args  : -javaagent:/app/soft/skywalking-agent/skywalking-agent.jar
+#jvm_args  : -javaagent:/app/soft/skywalking-agent/skywalking-agent.jar
 #jvm_args  : -Xmx4096m -Xms4096m -Xmn1024m -XX:PermSize=128m -XX:MaxPermSize=256m
 # jvm_mode    : -server
 # watchdog_jvm_args  :