scofield 2 yıl önce
ebeveyn
işleme
d686bc256c
7 değiştirilmiş dosya ile 126 ekleme ve 0 silme
  1. 7 0
      Dockerfile
  2. 30 0
      Dockerfile.v1
  3. 61 0
      deploy-tmp.yaml
  4. 15 0
      ds.ini
  5. BIN
      ds.tgz
  6. 13 0
      entrypoint.sh
  7. BIN
      fsync.tgz

+ 7 - 0
Dockerfile

@@ -0,0 +1,7 @@
+#FROM hub.evbj.easou.com/oldad/ds:v1.0.1
+FROM hub.evbj.easou.com/oldad/ds:v1.0.2
+
+COPY ds.ini /etc/supervisord.d/ds.ini
+
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["supervisord"]

+ 30 - 0
Dockerfile.v1

@@ -0,0 +1,30 @@
+FROM hub.evbj.easou.com/dev/centos:7.9.2009
+
+ENV TZ=Asia/Shanghai
+ENV JAVA_HOME /usr/java/jdk1.8.0_271
+
+COPY ds.tgz /tmp/ds.tgz
+COPY fsync.tgz /tmp/fsync.tgz
+
+RUN yum install -y epel-release \
+    && yum install -y  supervisor libcrypto.so.6 \
+    && ln -s /usr/lib64/libcrypto.so.1.0.2k /usr/lib64/libcrypto.so.6 \
+    && sed -i "s/nodaemon=false/nodaemon=true/" /etc/supervisord.conf \
+    && useradd ecom \
+    && mkdir -p /usr/java /app/ecom /data/ecom/ds/logs /data/ecom/ad  /data/ecom/ad/inc_new /data/ecom/ad/inc /data/ecom/fsync /data1/ecom \
+    && curl -s http://10.26.22.185:9000/psop/soft/ecom/20210817.tgz -o /tmp/20210817.tgz \
+    && tar -zxf /tmp/20210817.tgz -C /data/ecom/ad/ \
+    && curl -s http://10.26.22.185:9000/psop/soft/ecom/adfea_bin.tgz -o /tmp/adfea_bin.tgz \
+    && tar -zxf /tmp/adfea_bin.tgz -C /data1/ecom/ \
+    && curl -s http://10.26.22.185:9000/psop/soft/jdk1.8.0_271.tar.gz -o /tmp/jdk1.8.0_271.tar.gz \
+    && tar -zxf /tmp/jdk1.8.0_271.tar.gz -C /usr/java/ \
+    && tar -zxf /tmp/ds.tgz -C /app/ecom/ \
+    && tar -zxf /tmp/fsync.tgz -C /app/ecom/ \
+    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
+    && chown -R ecom:ecom /app /data /data1 
+
+COPY ds.ini /etc/supervisord.d/ds.ini
+COPY entrypoint.sh /usr/bin/entrypoint.sh
+
+ENTRYPOINT ["entrypoint.sh"]
+CMD ["supervisord"]

+ 61 - 0
deploy-tmp.yaml

@@ -0,0 +1,61 @@
+---
+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"]
+          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
+  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

+ 15 - 0
ds.ini

@@ -0,0 +1,15 @@
+[program:fsync]
+command=/app/ecom/fsync/startup.sh
+process_name=%(program_name)s
+startsecs=10
+startretries=3
+autostart=true
+autorestart=true
+
+[program:ds]
+command=/app/ecom/ds/dsctl.sh start
+process_name=%(program_name)s
+startsecs=30
+startretries=3
+autostart=true
+autorestart=true


+ 13 - 0
entrypoint.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -e 
+set -o pipefail
+
+mkdir -p  /data/ecom/ds/logs /data/ecom/ad/inc_new /data/ecom/ad/inc /data/ecom/fsync
+tar -zxf /tmp/20210817.tgz -C /data/ecom/ad/ 
+ln -s /data/ecom/ad/20210817 /data/ecom/ad/all
+rm -f /tmp/*
+touch  /data/ecom/ad/inc_new//bid.event.0
+chown -R ecom:ecom /app /data /data1
+
+exec "$@"

BIN
fsync.tgz