diff --git a/26-开发高可用集群/DEV批量命令.sh b/26-开发高可用集群/DEV批量命令.sh index 98574bc..2aa2d90 100644 --- a/26-开发高可用集群/DEV批量命令.sh +++ b/26-开发高可用集群/DEV批量命令.sh @@ -32,10 +32,12 @@ for server in "${all_server_list[@]}";do # sshpass -p "scyd@lab1234" -echo root:Len3#io7%2k | chpasswd - echo root:V2ryStr@ngPss| chpasswd +echo root:Len3#io7%2k | chpasswd +echo root:Io7.*GaaBxA | chpasswd + +mkdir -p /root/.ssh/ echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDPFSLFi0rzZSXf6laZ/s4AFCsgZBu8tyCx4bCmB3/k6x7xH1rjk/EZ8N2ZWV2CyTyjHCghu94ZmV0e6/FeC/KdBH96A69fGrq0HjsvAHTTvyEmmtrWmB7OAjhWloaovj1V8B1bTC9IZsZ4lN7agZ8u/uHzri2esXduTzXc186Q6h8lm1t5Gh7RGYGPdaXIjaFLxVSmdci+4eoS+EOEo/mspJB34TFuN8xEBzA3N06tmjAPtVpi0RFa6n/L9CUp2OQBJ8EQVgOYY6t5i3prLl29K9zSRX46ue+9jWbzfyKfKHk7jCfjnH6BG47/sbWoAyYPdkfSwvCZBroOjQh4gf3Ga4Gt4e7+rQ4sT3mrHUtXRd+g+0u9XOsYpHCTwwbtSiDJ+6DfdZYuJOeqgL82zeaJeFu0IXLhgn/q96aVbF15MLD1gGkXj/FFFGGWJfr5zrZJVWrm0NRCaxJftUHNpnK0MrMCqsHSxmkdypUzN6n020NkNGUE1UMUU4O48O4PsE= root@ops-01.ecs.io ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBO6IjOcco9eAvA/T7LDsylCgjKJlLrVXY1zxO1/mX/MTzVZGuAhbikFJT2ZN2Up8iED+pJwpcps3LlA1wOjQC3Q= root@ops-04.ecs.io" >> /root/.ssh/authorized_keys @@ -50,16 +52,17 @@ ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBO6IjOcc # ssh root@"${server}" "echo yes" +export server=192.168.40.73 scp /usr/local/bin/octopus-agent root@${server}:/usr/local/bin/octopus-agent -ssh root@${server} "mkdir /root/wdd && chmod +x /usr/local/bin/octopus-agent" +ssh root@${server} "mkdir /root/wdd" +ssh root@${server} "chmod +x /usr/local/bin/octopus-agent" ssh root@${server} "printf 'ssh\n' | octopus-agent --mode=bastion" - scp /root/wdd/disk.sh root@${server}:/root/wdd/disk.sh ssh root@${server} "bash /root/wdd/disk.sh" -nmcli connection modify "eth0" ipv4.dns "192.168.34.40,119.29.29.29" -nmcli connection up "eth0" +nmcli connection modify "ens192" ipv4.dns "192.168.34.40,119.29.29.29" +nmcli connection up "ens192" nmcli dev show | grep DNS scp /etc/ssh/sshd_config root@"${server}":/etc/ssh/sshd_config diff --git a/36-20240830-云南移动二级平台/k8s-emqx-5.5.1.yaml b/36-20240830-云南移动二级平台/k8s-emqx-5.5.1.yaml new file mode 100644 index 0000000..00f3ee3 --- /dev/null +++ b/36-20240830-云南移动二级平台/k8s-emqx-5.5.1.yaml @@ -0,0 +1,285 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: helm-emqxs-551 + namespace: ynejpt +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: helm-emqxs-551-env + namespace: ynejpt + labels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + helm.sh/chart: emqx-1.1.0 + app.kubernetes.io/managed-by: octopus-control + app.kubernetes.io/version: 5.6.0 +data: + EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc.cluster.local:443" + EMQX_NAME: "helm-emqxs-551" + EMQX_CLUSTER__DISCOVERY: "k8s" + EMQX_CLUSTER__K8S__APP_NAME: "helm-emqxs-551" + EMQX_CLUSTER__K8S__SERVICE_NAME: "helm-emqxs-551-headless" + EMQX_CLUSTER__K8S__ADDRESS_TYPE: "dns" + EMQX_CLUSTER__K8S__namespace: "ynejpt" + EMQX_CLUSTER__K8S__SUFFIX: "svc.cluster.local" + EMQX_ALLOW_ANONYMOUS: "false" + EMQX_ACL_NOMATCH: "deny" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: helm-emqxs-551-cm + namespace: ynejpt + labels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + helm.sh/chart: emqx-1.1.0 + app.kubernetes.io/managed-by: octopus-control + app.kubernetes.io/version: 5.6.0 +data: + emqx_auth_username.conf: |- + auth.user.1.username = cmlc + auth.user.1.password = odD8#Ve7.B + auth.user.password_hash = sha256 + + acl.conf: |- + {allow, {user, "admin"}, pubsub, ["admin/#"]}. + {allow, {user, "dashboard"}, subscribe, ["$SYS/#"]}. + {allow, {ipaddr, "127.0.0.1"}, pubsub, ["$SYS/#", "#"]}. + {deny, all, subscribe, ["$SYS/#", {eq, "#"}]}. + {allow, all}. + + loaded_plugins: |- + {emqx_auth_username,true}. + {emqx_management, true}. + {emqx_recon, true}. + {emqx_retainer, false}. + {emqx_dashboard, true}. + {emqx_telemetry, true}. + {emqx_rule_engine, true}. + {emqx_bridge_mqtt, false}. +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: helm-emqxs-551 + namespace: ynejpt + labels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + helm.sh/chart: emqx-1.1.0 + app.kubernetes.io/managed-by: octopus-control + app.kubernetes.io/version: 5.6.0 +spec: + replicas: 1 + serviceName: helm-emqxs-551-headless + updateStrategy: + type: RollingUpdate + selector: + matchLabels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + template: + metadata: + labels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + helm.sh/chart: emqx-1.1.0 + app.kubernetes.io/managed-by: octopus-control + app.kubernetes.io/version: 5.6.0 + spec: + affinity: { } + imagePullSecrets: + - name: harborsecret + serviceAccountName: helm-emqxs-551 + containers: + - name: helm-emqxs-551 + image: 192.168.118.14:8033/cmii/emqx:5.5.1 + imagePullPolicy: Always + ports: + - name: mqtt + containerPort: 1883 + - name: mqttssl + containerPort: 8883 + - name: mgmt + containerPort: 8081 + - name: ws + containerPort: 8083 + - name: wss + containerPort: 8084 + - name: dashboard + containerPort: 18083 + - name: ekka + containerPort: 4370 + envFrom: + - configMapRef: + name: helm-emqxs-551-env + resources: { } + volumeMounts: + - name: emqx-data + mountPath: "/opt/emqx/data/mnesia" + readOnly: false + - name: helm-emqxs-551-cm + mountPath: "/opt/emqx/etc/plugins/emqx_auth_username.conf" + subPath: emqx_auth_username.conf + readOnly: false + # - name: helm-emqxs-551-cm + # mountPath: "/opt/emqx/etc/acl.conf" + # subPath: "acl.conf" + # readOnly: false + - name: helm-emqxs-551-cm + mountPath: "/opt/emqx/data/loaded_plugins" + subPath: loaded_plugins + readOnly: false + volumes: + - name: emqx-data + persistentVolumeClaim: + claimName: helm-emqxs-551 + - name: helm-emqxs-551-cm + configMap: + name: helm-emqxs-551-cm + items: + - key: emqx_auth_username.conf + path: emqx_auth_username.conf + - key: acl.conf + path: acl.conf + - key: loaded_plugins + path: loaded_plugins +--- +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: helm-emqxs-551 + namespace: ynejpt +rules: + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get + - watch + - list +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: helm-emqxs-551 + namespace: ynejpt +subjects: + - kind: ServiceAccount + name: helm-emqxs-551 + namespace: ynejpt +roleRef: + kind: Role + name: helm-emqxs-551 + apiGroup: rbac.authorization.k8s.io +--- +apiVersion: v1 +kind: Service +metadata: + name: helm-emqxs-551 + namespace: ynejpt + labels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + helm.sh/chart: emqx-1.1.0 + app.kubernetes.io/managed-by: octopus-control + app.kubernetes.io/version: 5.6.0 +spec: + type: NodePort + selector: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + ports: + - port: 1883 + name: mqtt + targetPort: 1883 + nodePort: 32883 + - port: 18083 + name: dashboard + targetPort: 18083 + nodePort: 38185 + - port: 8083 + name: mqtt-websocket + targetPort: 8083 + nodePort: 38183 +--- +apiVersion: v1 +kind: Service +metadata: + name: helm-emqxs-551-headless + namespace: ynejpt + labels: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + helm.sh/chart: emqx-1.1.0 + app.kubernetes.io/managed-by: octopus-control + app.kubernetes.io/version: 5.6.0 +spec: + type: ClusterIP + clusterIP: None + selector: + cmii.type: middleware + cmii.app: helm-emqxs-551 + cmii.emqx.architecture: cluster + ports: + - name: mqtt + port: 1883 + protocol: TCP + targetPort: 1883 + - name: mqttssl + port: 8883 + protocol: TCP + targetPort: 8883 + - name: mgmt + port: 8081 + protocol: TCP + targetPort: 8081 + - name: websocket + port: 8083 + protocol: TCP + targetPort: 8083 + - name: wss + port: 8084 + protocol: TCP + targetPort: 8084 + - name: dashboard + port: 18083 + protocol: TCP + targetPort: 18083 + - name: ekka + port: 4370 + protocol: TCP + targetPort: 4370 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: helm-emqxs-551 + namespace: ynejpt + labels: + cmii.type: middleware-base + cmii.app: helm-emqxs-551 + helm.sh/chart: all-persistence-volume-claims-1.1.0 + app.kubernetes.io/version: 5.7.0 +spec: + storageClassName: nfs-prod-distribute + accessModes: + - ReadWriteMany + volumeMode: Filesystem + resources: + requests: + storage: 20Gi +--- \ No newline at end of file diff --git a/46-CMII三方业务/一珂前端/build.sh b/46-CMII三方业务/一珂前端/build.sh new file mode 100644 index 0000000..e7bef8e --- /dev/null +++ b/46-CMII三方业务/一珂前端/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +docker build -f Dockerfile -t harbor.cdcyy.com.cn/cmii/cmii-uav-platform-renyike:6.0.0-20241202 . + +docker run -d -p 9528:9528 harbor.cdcyy.com.cn/cmii/cmii-uav-renyike:6.0.0-20241202 + +docker push harbor.cdcyy.com.cn/cmii/cmii-uav-platform-renyike:6.0.0-20241202 diff --git a/46-CMII三方业务/一珂前端/dockerfile b/46-CMII三方业务/一珂前端/dockerfile new file mode 100644 index 0000000..d9902ad --- /dev/null +++ b/46-CMII三方业务/一珂前端/dockerfile @@ -0,0 +1,7 @@ +FROM harbor.cdcyy.com.cn/cmii/nginx:1.27.0 + +ENV TZ "Asia/Shanghai" +ENV WORKPATH /home/cmii-platform +WORKDIR /home/cmii-platform +COPY ./build ./dist +EXPOSE 9528 diff --git a/46-CMII三方业务/一珂前端/一珂前端.yaml b/46-CMII三方业务/一珂前端/一珂前端.yaml new file mode 100644 index 0000000..931379b --- /dev/null +++ b/46-CMII三方业务/一珂前端/一珂前端.yaml @@ -0,0 +1,91 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-platform-renyike + namespace: uavcloud-devoperation + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-renyike + octopus.control: frontend-app-wdd + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: frontend + cmii.app: cmii-uav-platform-renyike + template: + metadata: + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-renyike + spec: + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-platform-renyike + image: harbor.cdcyy.com.cn/cmii/cmii-uav-platform-renyike:6.0.0-20241202 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devoperation + - name: APPLICATION_NAME + value: cmii-uav-platform-renyike + ports: + - name: platform-9528 + containerPort: 9528 + protocol: TCP + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/conf.d/nginx.conf + subPath: nginx.conf + - name: tenant-prefix + subPath: ingress-config.js + mountPath: /home/cmii-platform/dist/ingress-config.js + volumes: + - name: nginx-conf + configMap: + name: nginx-cm + items: + - key: nginx.conf + path: nginx.conf + - name: tenant-prefix + configMap: + name: tenant-prefix-splice + items: + - key: ingress-config.js + path: ingress-config.js +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-platform-renyike + namespace: uavcloud-devoperation + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-renyike + octopus.control: frontend-app-wdd + app.kubernetes.io/version: 5.7.0 +spec: + type: NodePort + selector: + cmii.type: frontend + cmii.app: cmii-uav-platform-renyike + ports: + - name: web-svc-port + port: 9528 + protocol: TCP + targetPort: 9528 + nodePort: 33333 +--- \ No newline at end of file diff --git a/46-CMII三方业务/军哥区块链-前端.yaml b/46-CMII三方业务/军哥区块链-前端.yaml new file mode 100644 index 0000000..b001578 --- /dev/null +++ b/46-CMII三方业务/军哥区块链-前端.yaml @@ -0,0 +1,271 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-platform-classification + namespace: uavcloud-devflight + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-classification + octopus.control: frontend-app-wdd + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: frontend + cmii.app: cmii-uav-platform-classification + template: + metadata: + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-classification + spec: + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-platform-classification + image: harbor.cdcyy.com.cn/cmii/cmii-uav-platform-classification:5.6.0 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-platform-classification + ports: + - name: platform-9528 + containerPort: 9528 + protocol: TCP + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/conf.d/nginx.conf + subPath: nginx.conf + - name: tenant-prefix + subPath: ingress-config.js + mountPath: /home/cmii-platform/dist/ingress-config.js + volumes: + - name: nginx-conf + configMap: + name: nginx-cm + items: + - key: nginx.conf + path: nginx.conf + - name: tenant-prefix + configMap: + name: tenant-prefix-splice + items: + - key: ingress-config.js + path: ingress-config.js +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-platform-classification + namespace: uavcloud-devflight + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-classification + octopus.control: frontend-app-wdd + app.kubernetes.io/version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: frontend + cmii.app: cmii-uav-platform-classification + ports: + - name: web-svc-port + port: 9528 + protocol: TCP + targetPort: 9528 +--- +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-platform-scanner + namespace: uavcloud-devflight + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-scanner + octopus.control: frontend-app-wdd + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: frontend + cmii.app: cmii-uav-platform-scanner + template: + metadata: + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-scanner + spec: + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-platform-scanner + image: harbor.cdcyy.com.cn/cmii/cmii-uav-platform-scanner:5.6.0 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-platform-scanner + ports: + - name: platform-9528 + containerPort: 9528 + protocol: TCP + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/conf.d/nginx.conf + subPath: nginx.conf + - name: tenant-prefix + subPath: ingress-config.js + mountPath: /home/cmii-platform/dist/ingress-config.js + volumes: + - name: nginx-conf + configMap: + name: nginx-cm + items: + - key: nginx.conf + path: nginx.conf + - name: tenant-prefix + configMap: + name: tenant-prefix-splice + items: + - key: ingress-config.js + path: ingress-config.js +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-platform-scanner + namespace: uavcloud-devflight + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-scanner + octopus.control: frontend-app-wdd + app.kubernetes.io/version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: frontend + cmii.app: cmii-uav-platform-scanner + ports: + - name: web-svc-port + port: 9528 + protocol: TCP + targetPort: 9528 +--- + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-platform-blockchain + namespace: uavcloud-devflight + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-blockchain + octopus.control: frontend-app-wdd + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 1 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: frontend + cmii.app: cmii-uav-platform-blockchain + template: + metadata: + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-blockchain + spec: + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-platform-blockchain + image: harbor.cdcyy.com.cn/cmii/cmii-uav-platform-blockchain:5.6.0 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-platform-blockchain + ports: + - name: platform-9528 + containerPort: 9528 + protocol: TCP + resources: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: 50m + memory: 50Mi + volumeMounts: + - name: nginx-conf + mountPath: /etc/nginx/conf.d/nginx.conf + subPath: nginx.conf + - name: tenant-prefix + subPath: ingress-config.js + mountPath: /home/cmii-platform/dist/ingress-config.js + volumes: + - name: nginx-conf + configMap: + name: nginx-cm + items: + - key: nginx.conf + path: nginx.conf + - name: tenant-prefix + configMap: + name: tenant-prefix-splice + items: + - key: ingress-config.js + path: ingress-config.js +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-platform-blockchain + namespace: uavcloud-devflight + labels: + cmii.type: frontend + cmii.app: cmii-uav-platform-blockchain + octopus.control: frontend-app-wdd + app.kubernetes.io/version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: frontend + cmii.app: cmii-uav-platform-blockchain + ports: + - name: web-svc-port + port: 9528 + protocol: TCP + targetPort: 9528 +--- \ No newline at end of file diff --git a/46-CMII三方业务/军哥区块链-后端.yaml b/46-CMII三方业务/军哥区块链-后端.yaml new file mode 100644 index 0000000..15b17b0 --- /dev/null +++ b/46-CMII三方业务/军哥区块链-后端.yaml @@ -0,0 +1,561 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-blockchain + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-blockchain + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 0 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: backend + cmii.app: cmii-uav-blockchain + template: + metadata: + labels: + cmii.type: backend + cmii.app: cmii-uav-blockchain + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: uavcloud.env + operator: In + values: + - devflight + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-blockchain + image: harbor.cdcyy.com.cn/cmii/cmii-uav-blockchain:3.2.2-snapshot + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-blockchain + - name: CUST_JAVA_OPTS + value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true" + - name: NACOS_REGISTRY + value: "helm-nacos:8848" + - name: NACOS_DISCOVERY_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: NACOS_DISCOVERY_PORT + value: "8080" + - name: BIZ_CONFIG_GROUP + value: 5.7.0 + - name: SYS_CONFIG_GROUP + value: 5.7.0 + - name: IMAGE_VERSION + value: 5.7.0 + - name: NACOS_USERNAME + value: "developer" + - name: NACOS_PASSWORD + value: "Deve@9128201" + ports: + - name: pod-port + containerPort: 8080 + protocol: TCP + resources: + limits: + memory: 2Gi + cpu: "2" + requests: + memory: 200Mi + cpu: 200m + livenessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 3 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 5 + volumeMounts: + - name: nfs-backend-log-volume + mountPath: /cmii/logs + readOnly: false + subPath: uavcloud-devflight/cmii-uav-blockchain + volumes: + - name: nfs-backend-log-volume + persistentVolumeClaim: + claimName: nfs-backend-log-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-blockchain + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-blockchain + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: backend + cmii.app: cmii-uav-blockchain + ports: + - name: backend-tcp + port: 8080 + protocol: TCP + targetPort: 8080 +--- + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-container-scanner + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 0 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner + template: + metadata: + labels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: uavcloud.env + operator: In + values: + - devflight + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-container-scanner + image: harbor.cdcyy.com.cn/cmii/cmii-uav-container-scanner:5.6.0 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-container-scanner + - name: CUST_JAVA_OPTS + value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true" + - name: NACOS_REGISTRY + value: "helm-nacos:8848" + - name: NACOS_DISCOVERY_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: NACOS_DISCOVERY_PORT + value: "8080" + - name: BIZ_CONFIG_GROUP + value: 5.7.0 + - name: SYS_CONFIG_GROUP + value: 5.7.0 + - name: IMAGE_VERSION + value: 5.7.0 + - name: NACOS_USERNAME + value: "developer" + - name: NACOS_PASSWORD + value: "Deve@9128201" + ports: + - name: pod-port + containerPort: 8080 + protocol: TCP + resources: + limits: + memory: 2Gi + cpu: "2" + requests: + memory: 200Mi + cpu: 200m + livenessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 3 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 5 + volumeMounts: + - name: nfs-backend-log-volume + mountPath: /cmii/logs + readOnly: false + subPath: uavcloud-devflight/cmii-uav-container-scanner + volumes: + - name: nfs-backend-log-volume + persistentVolumeClaim: + claimName: nfs-backend-log-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-container-scanner + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: backend + cmii.app: cmii-uav-container-scanner + ports: + - name: backend-tcp + port: 8080 + protocol: TCP + targetPort: 8080 +--- +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-container-scanner-go + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner-go + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 0 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner-go + template: + metadata: + labels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner-go + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: uavcloud.env + operator: In + values: + - devflight + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-container-scanner-go + image: harbor.cdcyy.com.cn/cmii/cmii-uav-container-scanner-go:5.6.0 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-container-scanner-go + - name: CUST_JAVA_OPTS + value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true" + - name: NACOS_REGISTRY + value: "helm-nacos:8848" + - name: NACOS_DISCOVERY_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: NACOS_DISCOVERY_PORT + value: "8080" + - name: BIZ_CONFIG_GROUP + value: 5.7.0 + - name: SYS_CONFIG_GROUP + value: 5.7.0 + - name: IMAGE_VERSION + value: 5.7.0 + - name: NACOS_USERNAME + value: "developer" + - name: NACOS_PASSWORD + value: "Deve@9128201" + ports: + - name: pod-port + containerPort: 8080 + protocol: TCP + resources: + limits: + memory: 2Gi + cpu: "2" + requests: + memory: 200Mi + cpu: 200m + livenessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 3 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 5 + volumeMounts: + - name: nfs-backend-log-volume + mountPath: /cmii/logs + readOnly: false + subPath: uavcloud-devflight/cmii-uav-container-scanner-go + volumes: + - name: nfs-backend-log-volume + persistentVolumeClaim: + claimName: nfs-backend-log-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-container-scanner-go + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-container-scanner-go + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: backend + cmii.app: cmii-uav-container-scanner-go + ports: + - name: backend-tcp + port: 8080 + protocol: TCP + targetPort: 8080 +--- +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cmii-uav-data-classification + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-data-classification + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + replicas: 0 + strategy: + rollingUpdate: + maxUnavailable: 1 + selector: + matchLabels: + cmii.type: backend + cmii.app: cmii-uav-data-classification + template: + metadata: + labels: + cmii.type: backend + cmii.app: cmii-uav-data-classification + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: uavcloud.env + operator: In + values: + - devflight + imagePullSecrets: + - name: harborsecret + containers: + - name: cmii-uav-data-classification + image: harbor.cdcyy.com.cn/cmii/cmii-uav-data-classification:5.6.0 + imagePullPolicy: Always + env: + - name: K8S_NAMESPACE + value: uavcloud-devflight + - name: APPLICATION_NAME + value: cmii-uav-data-classification + - name: CUST_JAVA_OPTS + value: "-Xms200m -Xmx1500m -Dlog4j2.formatMsgNoLookups=true" + - name: NACOS_REGISTRY + value: "helm-nacos:8848" + - name: NACOS_DISCOVERY_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: NACOS_DISCOVERY_PORT + value: "8080" + - name: BIZ_CONFIG_GROUP + value: 5.7.0 + - name: SYS_CONFIG_GROUP + value: 5.7.0 + - name: IMAGE_VERSION + value: 5.7.0 + - name: NACOS_USERNAME + value: "developer" + - name: NACOS_PASSWORD + value: "Deve@9128201" + ports: + - name: pod-port + containerPort: 8080 + protocol: TCP + resources: + limits: + memory: 2Gi + cpu: "2" + requests: + memory: 200Mi + cpu: 200m + livenessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 5 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 3 + startupProbe: + httpGet: + path: /cmii/health + port: pod-port + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 3 + periodSeconds: 20 + successThreshold: 1 + failureThreshold: 5 + volumeMounts: + - name: nfs-backend-log-volume + mountPath: /cmii/logs + readOnly: false + subPath: uavcloud-devflight/cmii-uav-data-classification + volumes: + - name: nfs-backend-log-volume + persistentVolumeClaim: + claimName: nfs-backend-log-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: cmii-uav-data-classification + namespace: uavcloud-devflight + labels: + cmii.type: backend + cmii.app: cmii-uav-data-classification + octopus/control: backend-app-1.0.0 + app.kubernetes.io/managed-by: octopus + app.kubernetes.io/app-version: 5.7.0 +spec: + type: ClusterIP + selector: + cmii.type: backend + cmii.app: cmii-uav-data-classification + ports: + - name: backend-tcp + port: 8080 + protocol: TCP + targetPort: 8080 +--- \ No newline at end of file diff --git a/9-江西移动-4.1.6/删除minio的历史数据.sh b/9-江西移动-4.1.6/删除minio的历史数据.sh new file mode 100644 index 0000000..28c7eb9 --- /dev/null +++ b/9-江西移动-4.1.6/删除minio的历史数据.sh @@ -0,0 +1,17 @@ + +ls | while read parent_dir; do + echo "parent_dir is ${parent_dir}" + cd ${parent_dir} + find . -maxdepth 1 -type d -name '[0-9]*' | while read dir; do + if [[ "$(basename "$dir")" < "20240901" ]]; then + echo "start to delete ${parent_dir}/${dir}" + rm -rf "$dir" + echo "" + fi + done + cd .. + echo "" + echo "" + +done + diff --git a/998-常用脚本/更新脚本/一键更新Tag脚本.sh b/998-常用脚本/更新脚本/一键更新Tag脚本.sh index 9a930cf..ba2a493 100644 --- a/998-常用脚本/更新脚本/一键更新Tag脚本.sh +++ b/998-常用脚本/更新脚本/一键更新Tag脚本.sh @@ -1,7 +1,7 @@ #!/bin/bash -harbor_host=192.168.118.14:8033 -namespace=jsntejpt +harbor_host=192.168.0.202:8033 +namespace=jsyd app_name="" new_tag="" diff --git a/998-常用脚本/研发环境相关/服务器基础环境.txt b/998-常用脚本/研发环境相关DEMO/服务器基础环境.txt similarity index 100% rename from 998-常用脚本/研发环境相关/服务器基础环境.txt rename to 998-常用脚本/研发环境相关DEMO/服务器基础环境.txt diff --git a/998-常用脚本/研发环境相关/节点相关信息获取.sh b/998-常用脚本/研发环境相关DEMO/节点相关信息获取.sh similarity index 82% rename from 998-常用脚本/研发环境相关/节点相关信息获取.sh rename to 998-常用脚本/研发环境相关DEMO/节点相关信息获取.sh index 2d04a56..0d5d061 100644 --- a/998-常用脚本/研发环境相关/节点相关信息获取.sh +++ b/998-常用脚本/研发环境相关DEMO/节点相关信息获取.sh @@ -13,7 +13,9 @@ done # 获取节点列表并存储到数组中 kubectl get nodes -l uavcloud.env=demo -o custom-columns=:metadata.name | while read -r node; do echo "node is $node" - kubectl get node ${node} -o json | jq '.status.capacity | {cpu: .cpu, memory: .memory}' + # kubectl get node ${node} -o json | jq '.status.capacity | {cpu: .cpu, memory: .memory}' + ssh ${node} "df -TH" + echo "" done @@ -23,6 +25,8 @@ all_demo_nodelist=(demo-02.ecs.io demo-03.ecs.io demo-05.ecs.io demo-07.ecs.io d for node in ${all_demo_nodelist[@]};do echo "node is $node" - scp /root/wdd/ctop root@${node}:/usr/local/bin/ctop + ssh ${node} "df -TH" + echo "" + echo "" done chmod +x /root/wdd/ctop diff --git a/998-常用脚本/研发环境相关/获取DEMO环境的JVM参数信息.sh b/998-常用脚本/研发环境相关DEMO/获取DEMO环境的JVM参数信息.sh similarity index 100% rename from 998-常用脚本/研发环境相关/获取DEMO环境的JVM参数信息.sh rename to 998-常用脚本/研发环境相关DEMO/获取DEMO环境的JVM参数信息.sh