2637309949@qq.com 6 år sedan
incheckning
d60edea336

+ 78 - 0
e-school/backend/config.yaml

@@ -0,0 +1,78 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: e-school-backend
+  name: e-school-backend
+  namespace: i2
+data:
+  app.conf: |-
+    app_name = e-school-backend
+    http_port = 8080
+    run_mode = debug
+    log_mode = debug
+    data_source = "i2_eschool:Eschool@#201910@tcp(i2-db-001.mysql.polardb.rds.aliyuncs.com:3306)/e-school-backend?charset=utf8&loc=Local"
+    storage = http://file.qianqiusoft.com/v1/fs_file/
+    sync_db = true
+    auto_refresh = false
+    #wfendpoint = "http://localhost:8090"
+    #light_connector = "http://localhost:7076"
+
+    # 默认域名设置
+    plat_domain = "eschool.i2edu.com"
+    i2_domain = "eschool.i2edu.com"
+    
+    # 认证模式: local本地模式,third第三方
+    auth_mode = "local"
+    
+    enable_ldap_server = false
+    ldap_port = 389
+    
+    # 盐
+    password_salt = cr@bc.cn
+    
+    # 启用数据库加盐
+    enable_db_salt = false
+    
+    # 密码启用Base64编码
+    password_enable_base64 = true
+    
+    aliyun_accessKeyId = "LTAIqrwSEnuD3mem"
+    aliyun_accessKeySecret = "PLjaW9COl4Lm3rm3nzdd2ua6S3eseZ"
+    
+    # 微信登陆
+    wechat_appid = "wx756d2f0339adf67c"
+    wechat_secret = "9cc4b7928467151acea7ab1bfa0a70a7"
+    
+    #微信小程序
+    applet_appid = "wxc4493aeb8bfc7032"
+    applet_secret = "d080f7bd28900e0bad2a0a991bf8a72a"
+    
+    # redis
+    redis_addr = "47.103.219.158:7001"
+    redis_pwd = "i2#333"
+    
+    # aliyun Oss
+    aliyun_ossEndPoint="https://oss-cn-shanghai.aliyuncs.com"
+    aliyun_ossKeyId="LTAI4FqkcBnu6wMGvtumC38g"
+    aliyun_ossKeySecret="YIUaYICkTmEQVjxvHYnhxTKlImPasQ"
+    aliyun_ossBucketName="i2-files"
+    
+    # 内网地址:i2-files.oss-cn-shanghai-internal.aliyuncs.com
+    # 资源路径
+    path_staticResource="static"
+    eschool_cdnResource="https://vod-cdn.i2edu.net"
+    dubit_ossDirPath="eschool/dubit"
+    eschool_ossDirPath="eschool/app"
+    erp_ossDirPath="eschool/erp"
+    
+    # 资源路径
+    erp_cdnResource="http://gjss-edus.oss-cn-shanghai.aliyuncs.com"
+    
+    # erp内网url
+    erp_url=http://localhost:10086
+    
+    integral_data_source = "root:i2#114@tcp(47.103.219.158:31306)/e-school?charset=utf8mb4&loc=Local&parseTime=true"
+    #讯飞小程序
+    xfyun_appid = "5df9ed38"
+    xfyun_apikey = "50827e596ee5008ede43a8a243144889"

+ 9 - 0
e-school/backend/registrykey.yaml

@@ -0,0 +1,9 @@
+apiVersion: v1
+data:
+  .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXIuaTJlcnAuY24iOnsidXNlcm5hbWUiOiJodWFuZ3JmIiwicGFzc3dvcmQiOiJoaHVhbmdyZkAjMTk4NiIsImVtYWlsIjoiaHVhbmdyZkBxaWFucWl1c29mdC5jb20iLCJhdXRoIjoiYUhWaGJtZHlaanBvYUhWaGJtZHlaa0FqTVRrNE5nPT0ifX19
+kind: Secret
+metadata:
+  name: registrykey-i2erp
+  namespace: i2
+  selfLink: /api/v1/namespaces/i2/secrets/registrykey-i2erp
+type: kubernetes.io/dockerconfigjson

+ 20 - 0
e-school/backend/service.yaml

@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: e-school-backend
+  namespace: i2
+spec:
+  type: NodePort
+  selector:
+    app: e-school-backend
+  ports:
+  - port: 8080
+    name: api
+    nodePort: 31100
+    protocol: TCP
+    targetPort: 8080
+  - port: 389
+    name: ldap
+    nodePort: 31102
+    protocol: TCP
+    targetPort: 389

+ 2 - 0
e-school/backend/setup.sh

@@ -0,0 +1,2 @@
+kubectl delete statefulset e-school-backend -n i2;
+kubectl apply -f ./

+ 60 - 0
e-school/backend/statefulset.yaml

@@ -0,0 +1,60 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  name: e-school-backend
+  namespace: i2
+spec:
+  replicas: 1
+  # volumeClaimTemplates:
+  # - metadata:
+  #     name: i2-upload
+  #   spec:
+  #     storageClassName: managed-nfs-storage
+  #     accessModes: [ "ReadWriteMany" ]
+  #     resources:
+  #       requests:
+  #         storage: 1Gi
+  selector:
+    matchLabels:
+      app: e-school-backend
+  template:
+    metadata:
+      labels:
+        app: e-school-backend
+    spec:
+      hostAliases:
+        - ip: "192.168.0.1"
+          hostnames:
+          - "www.ccbeetech.com"
+          - "ccbeetech.com"
+      containers:
+      - name: e-school-backend
+        image: docker.i2erp.cn/e-school-backend:10127
+        volumeMounts:
+          # - name: i2-upload
+          #   mountPath: /app/files
+          #   readOnly: false
+          #   subPath: files
+          - name: config
+            mountPath: /app/conf/
+          - name: date-config
+            mountPath: /etc/localtime
+        resources:
+          limits:
+            memory: "2Gi"
+            cpu: "1000m"
+          requests:
+            memory: "10Mi"
+            cpu: "10m"
+        ports:
+        - containerPort: 8080
+        - containerPort: 389
+      imagePullSecrets:
+        - name: registrykey-i2erp
+      volumes:
+        - name: config
+          configMap:
+            name: e-school-backend
+        - name: date-config
+          hostPath:
+            path: /etc/localtime

+ 84 - 0
e-school/frontend/config.yaml

@@ -0,0 +1,84 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: e-school-frontend
+  name: e-school-frontend
+  namespace: i2
+data:
+  config.js: |-
+    window.CONFIG = {
+      AuthMode: 'local',
+      URL: 'https://backend-eschool-slb.i2edu.net',
+      staticURL: 'https://backend-eschool-slb.i2edu.net/'
+    };
+  app.conf: |-
+    app_name = e-school-backend
+    http_port = 80
+    run_mode = debug
+    log_mode = debug
+    data_source = "i2_eschool:Eschool@#201910@tcp(i2-db-001.mysql.polardb.rds.aliyuncs.com:3306)/e-school-backend?charset=utf8&loc=Local"
+    storage = http://file.qianqiusoft.com/v1/fs_file/
+    sync_db = true
+    auto_refresh = false
+    #wfendpoint = "http://localhost:8090"
+    #light_connector = "http://localhost:7076"
+    
+    # 默认域名设置
+    plat_domain = "eschool.i2edu.com"
+    i2_domain = "eschool.i2edu.com"
+    
+    # 认证模式: local本地模式,third第三方
+    auth_mode = "local"
+    
+    enable_ldap_server = false
+    ldap_port = 389
+    
+    # 盐
+    password_salt = cr@bc.cn
+    
+    # 启用数据库加盐
+    enable_db_salt = false
+    
+    # 密码启用Base64编码
+    password_enable_base64 = true
+    
+    aliyun_accessKeyId = "LTAIqrwSEnuD3mem"
+    aliyun_accessKeySecret = "PLjaW9COl4Lm3rm3nzdd2ua6S3eseZ"
+    
+    # 微信登陆
+    wechat_appid = "wx756d2f0339adf67c"
+    wechat_secret = "9cc4b7928467151acea7ab1bfa0a70a7"
+    
+    #微信小程序
+    applet_appid = "wxc4493aeb8bfc7032"
+    applet_secret = "d080f7bd28900e0bad2a0a991bf8a72a"
+    
+    # redis
+    redis_addr = "47.103.219.158:7001"
+    redis_pwd = "i2#333"
+    
+    # aliyun Oss
+    aliyun_ossEndPoint="https://oss-cn-shanghai.aliyuncs.com"
+    aliyun_ossKeyId="LTAI4FqkcBnu6wMGvtumC38g"
+    aliyun_ossKeySecret="YIUaYICkTmEQVjxvHYnhxTKlImPasQ"
+    aliyun_ossBucketName="i2-files"
+    
+    # 内网地址:i2-files.oss-cn-shanghai-internal.aliyuncs.com
+    # 资源路径
+    path_staticResource="static"
+    eschool_cdnResource="http://vod-cdn.i2edu.net"
+    dubit_ossDirPath="eschool/dubit"
+    eschool_ossDirPath="eschool/app"
+    erp_ossDirPath="eschool/erp"
+    
+    # 资源路径
+    erp_cdnResource="http://gjss-edus.oss-cn-shanghai.aliyuncs.com"
+    
+    # erp内网url
+    erp_url=http://localhost:10086
+    
+    integral_data_source = "root:i2#114@tcp(47.103.219.158:31306)/e-school?charset=utf8mb4&loc=Local&parseTime=true"
+    #讯飞小程序
+    xfyun_appid = "5df9ed38"
+    xfyun_apikey = "50827e596ee5008ede43a8a243144889"

+ 44 - 0
e-school/frontend/deployment.yaml

@@ -0,0 +1,44 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: e-school-frontend
+  namespace: i2
+spec:
+  selector:
+    matchLabels:
+      app: e-school-frontend
+  template:
+    metadata:
+      labels:
+        app: e-school-frontend
+    spec:
+      hostAliases:
+        - ip: "192.168.0.1"
+          hostnames:
+          - "www.ccbeetech.com"
+          - "ccbeetech.com"
+      containers:
+      - name: e-school-frontend
+        image: docker.i2erp.cn/e-school-frontend:10049
+        volumeMounts:
+          - name: config
+            mountPath: /app/web/config.js
+            subPath: config.js
+          - name: config
+            mountPath: /app/conf/app.conf
+            subPath: app.conf
+        resources:
+          limits:
+            memory: "2Gi"
+            cpu: "1000m"
+          requests:
+            memory: "10Mi"
+            cpu: "11m"
+        ports:
+        - containerPort: 80
+      imagePullSecrets:
+        - name: registrykey-i2erp
+      volumes:
+        - name: config
+          configMap:
+            name: e-school-frontend

+ 9 - 0
e-school/frontend/registrykey.yaml

@@ -0,0 +1,9 @@
+apiVersion: v1
+data:
+  .dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXIuaTJlcnAuY24iOnsidXNlcm5hbWUiOiJodWFuZ3JmIiwicGFzc3dvcmQiOiJoaHVhbmdyZkAjMTk4NiIsImVtYWlsIjoiaHVhbmdyZkBxaWFucWl1c29mdC5jb20iLCJhdXRoIjoiYUhWaGJtZHlaanBvYUhWaGJtZHlaa0FqTVRrNE5nPT0ifX19
+kind: Secret
+metadata:
+  name: registrykey-i2erp
+  namespace: i2
+  selfLink: /api/v1/namespaces/i2/secrets/registrykey-i2erp
+type: kubernetes.io/dockerconfigjson

+ 14 - 0
e-school/frontend/service.yaml

@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: e-school-frontend
+  namespace: i2
+spec:
+  type: NodePort
+  selector:
+    app: e-school-frontend
+  ports:
+  - port: 8081
+    nodePort: 31101
+    protocol: TCP
+    targetPort: 80

+ 1 - 0
e-school/frontend/setup.sh

@@ -0,0 +1 @@
+kubectl apply -f ./

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 8 - 0
i2-pusher/backend/config.yaml


+ 20 - 0
i2-pusher/backend/service.yaml

@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: i2-pusher-backend
+  namespace: i2
+spec:
+  type: NodePort
+  selector:
+    app: i2-pusher-backend
+  ports:
+  - port: 8080
+    name: api
+    nodePort: 31100
+    protocol: TCP
+    targetPort: 8080
+  - port: 389
+    name: ldap
+    nodePort: 31102
+    protocol: TCP
+    targetPort: 389

+ 2 - 0
i2-pusher/backend/setup.sh

@@ -0,0 +1,2 @@
+kubectl delete statefulset i2-pusher-backend -n i2;
+kubectl apply -f ./

+ 60 - 0
i2-pusher/backend/statefulset.yaml

@@ -0,0 +1,60 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  name: i2-pusher-backend
+  namespace: i2
+spec:
+  replicas: 1
+  volumeClaimTemplates:
+  - metadata:
+      name: i2-upload
+    spec:
+      storageClassName: managed-nfs-storage
+      accessModes: [ "ReadWriteMany" ]
+      resources:
+        requests:
+          storage: 1Gi
+  selector:
+    matchLabels:
+      app: i2-pusher-backend
+  template:
+    metadata:
+      labels:
+        app: i2-pusher-backend
+    spec:
+      hostAliases:
+        - ip: "192.168.0.1"
+          hostnames:
+          - "www.ccbeetech.com"
+          - "ccbeetech.com"
+      containers:
+      - name: i2-pusher-backend
+        image: docker.i2erp.cn/i2-pusher-backend:10948
+        volumeMounts:
+          - name: i2-upload
+            mountPath: /app/files
+            readOnly: false
+            subPath: files
+          - name: config
+            mountPath: /app/conf/
+          - name: date-config
+            mountPath: /etc/localtime
+        resources:
+          limits:
+            memory: "2Gi"
+            cpu: "1000m"
+          requests:
+            memory: "10Mi"
+            cpu: "10m"
+        ports:
+        - containerPort: 8080
+        - containerPort: 389
+      imagePullSecrets:
+        - name: registrykey-i2erp
+      volumes:
+        - name: config
+          configMap:
+            name: i2-pusher-backend
+        - name: date-config
+          hostPath:
+            path: /etc/localtime

+ 24 - 0
i2-pusher/frontend/config.yaml

@@ -0,0 +1,24 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: i2-pusher-frontend
+  name: i2-pusher-frontend
+  namespace: i2
+data:
+  config.js: |-
+    window.CONFIG = {
+      AuthMode: 'local',
+      URL: 'https://api.pusher.i2erp.cn'
+    };
+  app.conf: |-
+    app_name = i2-pusher-frontend
+    http_port = 80
+    run_mode = debug
+    log_mode = debug
+    data_source = "i2pusher:i2pusher@#2019@tcp(pc-uf66645lwf7331605.mysql.polardb.rds.aliyuncs.com:3306)/i2-pusher-backend?charset=utf8&loc=Local&parseTime=true"
+    storage = http://file.qianqiusoft.com/v1/fs_file/
+    sync_db = false
+    auto_refresh = false
+    enable_ldap_server = false
+    ldap_port = 389

+ 44 - 0
i2-pusher/frontend/deployment.yaml

@@ -0,0 +1,44 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: i2-pusher-frontend
+  namespace: i2
+spec:
+  selector:
+    matchLabels:
+      app: i2-pusher-frontend
+  template:
+    metadata:
+      labels:
+        app: i2-pusher-frontend
+    spec:
+      hostAliases:
+        - ip: "192.168.0.1"
+          hostnames:
+          - "www.ccbeetech.com"
+          - "ccbeetech.com"
+      containers:
+      - name: i2-pusher-frontend
+        image: docker.i2erp.cn/i2-pusher-frontend:10078
+        volumeMounts:
+          - name: config
+            mountPath: /app/web/config.js
+            subPath: config.js
+          - name: config
+            mountPath: /app/conf/app.conf
+            subPath: app.conf
+        resources:
+          limits:
+            memory: "2Gi"
+            cpu: "1000m"
+          requests:
+            memory: "10Mi"
+            cpu: "11m"
+        ports:
+        - containerPort: 80
+      imagePullSecrets:
+        - name: registrykey-i2erp
+      volumes:
+        - name: config
+          configMap:
+            name: i2-pusher-frontend

+ 14 - 0
i2-pusher/frontend/service.yaml

@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: i2-pusher-frontend
+  namespace: i2
+spec:
+  type: NodePort
+  selector:
+    app: i2-pusher-frontend
+  ports:
+  - port: 8081
+    nodePort: 31101
+    protocol: TCP
+    targetPort: 80

+ 33 - 0
nfs-client/deployment.yaml

@@ -0,0 +1,33 @@
+kind: Deployment
+apiVersion: extensions/v1beta1
+metadata:
+  name: nfs-client-provisioner
+  namespace: i2
+spec:
+  replicas: 1
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        app: nfs-client-provisioner
+    spec:
+      serviceAccountName: nfs-client-provisioner
+      containers:
+        - name: nfs-client-provisioner
+          image: quay.io/external_storage/nfs-client-provisioner:latest
+          volumeMounts:
+            - name: nfs-client-root
+              mountPath: /persistentvolumes
+          env:
+            - name: PROVISIONER_NAME
+              value: i2/nfs
+            - name: NFS_SERVER
+              value: 192.168.14.198
+            - name: NFS_PATH
+              value: /data/nfs-data
+      volumes:
+        - name: nfs-client-root
+          nfs:
+            server: 192.168.14.198
+            path: /data/nfs-data

+ 63 - 0
nfs-client/rbac.yaml

@@ -0,0 +1,63 @@
+kind: ServiceAccount
+apiVersion: v1
+metadata:
+  name: nfs-client-provisioner
+  namespace: i2
+---
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: nfs-client-provisioner-runner
+  namespace: i2
+rules:
+  - apiGroups: [""]
+    resources: ["persistentvolumes"]
+    verbs: ["get", "list", "watch", "create", "delete"]
+  - apiGroups: [""]
+    resources: ["persistentvolumeclaims"]
+    verbs: ["get", "list", "watch", "update"]
+  - apiGroups: ["storage.k8s.io"]
+    resources: ["storageclasses"]
+    verbs: ["get", "list", "watch"]
+  - apiGroups: [""]
+    resources: ["events"]
+    verbs: ["create", "update", "patch"]
+---
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: run-nfs-client-provisioner
+  namespace: i2
+subjects:
+  - kind: ServiceAccount
+    name: nfs-client-provisioner
+    namespace: i2
+roleRef:
+  kind: ClusterRole
+  name: nfs-client-provisioner-runner
+  apiGroup: rbac.authorization.k8s.io
+---
+kind: Role
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: leader-locking-nfs-client-provisioner
+  namespace: i2
+rules:
+  - apiGroups: [""]
+    resources: ["endpoints"]
+    verbs: ["get", "list", "watch", "create", "update", "patch"]
+---
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: leader-locking-nfs-client-provisioner
+  namespace: i2
+subjects:
+  - kind: ServiceAccount
+    name: nfs-client-provisioner
+    # replace with namespace where provisioner is deployed
+    namespace: i2
+roleRef:
+  kind: Role
+  name: leader-locking-nfs-client-provisioner
+  apiGroup: rbac.authorization.k8s.io

+ 8 - 0
nfs-client/storageclass.yaml

@@ -0,0 +1,8 @@
+apiVersion: storage.k8s.io/v1
+kind: StorageClass
+metadata:
+  name: managed-nfs-storage
+  namespace: i2
+provisioner: i2/nfs # or choose another name, must match deployment's env PROVISIONER_NAME'
+parameters:
+  archiveOnDelete: "false"

Vissa filer visades inte eftersom för många filer har ändrats