[Agent][Deploy] - cmii update
This commit is contained in:
@@ -164,3 +164,30 @@ func configMapDeploy(common *z_dep.CommonEnvironmentConfig) {
|
||||
c_app.DefaultCmiiFrontendConfig.ConfigMapDeploy(common)
|
||||
}
|
||||
}
|
||||
|
||||
// CmiiEnvironmentDeploy 部署完整的CMII环境的所有组件
|
||||
func CmiiEnvironmentDeploy() {
|
||||
|
||||
// common environment
|
||||
common := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "lab.uavcmlc.com",
|
||||
WebPort: "",
|
||||
HarborIP: image2.CmiiHarborPrefix,
|
||||
HarborPort: "",
|
||||
Namespace: "devflight",
|
||||
TagVersion: "5.5.0",
|
||||
TenantEnv: "devflight",
|
||||
}
|
||||
|
||||
folderPrefix := "/home/wdd/IdeaProjects/ProjectOctopus/agent-deploy/"
|
||||
|
||||
// clear old apply file
|
||||
|
||||
// clear all middleware data
|
||||
// ignore redis rabbitmq mongo nacos emqx
|
||||
// sync mysql-data
|
||||
|
||||
// generate new apply file for specific environment
|
||||
|
||||
// apply for them
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/dashboard:v2.0.1
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/dashboard:v2.0.1
|
||||
image: {{ .HarborIP }}dashboard:v2.0.1
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8443
|
||||
@@ -267,7 +267,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/metrics-scraper:v1.0.4
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/metrics-scraper:v1.0.4
|
||||
image: {{ .HarborIP }}metrics-scraper:v1.0.4
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
|
||||
@@ -99,7 +99,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/nfs-subdir-external-provisioner:v4.0.2
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/nfs-subdir-external-provisioner:v4.0.2
|
||||
image: {{ .HarborIP }}nfs-subdir-external-provisioner:v4.0.2
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: nfs-client-root
|
||||
|
||||
@@ -25,7 +25,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/busybox:latest
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/busybox:latest
|
||||
image: {{ .HarborIP }}busybox:latest
|
||||
{{- end }}
|
||||
command:
|
||||
- "/bin/sh"
|
||||
|
||||
@@ -105,7 +105,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/emqx:5.5.1
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/emqx:5.5.1
|
||||
image: {{ .HarborIP }}emqx:5.5.1
|
||||
{{- end }}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
|
||||
@@ -57,7 +57,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/mongo:5.0
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/mongo:5.0
|
||||
image: {{ .HarborIP }}mongo:5.0
|
||||
{{- end }}
|
||||
resources: {}
|
||||
ports:
|
||||
|
||||
@@ -311,7 +311,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:11-debian-11-r136
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/bitnami-shell:11-debian-11-r136
|
||||
image: {{ .HarborIP }}bitnami-shell:11-debian-11-r136
|
||||
{{- end }}
|
||||
imagePullPolicy: "Always"
|
||||
command:
|
||||
@@ -329,7 +329,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/mysql:8.1.0-debian-11-r42
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/mysql:8.1.0-debian-11-r42
|
||||
image: {{ .HarborIP }}mysql:8.1.0-debian-11-r42
|
||||
{{- end }}
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
securityContext:
|
||||
|
||||
@@ -84,7 +84,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/nacos-server:v2.1.2
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/nacos-server:v2.1.2
|
||||
image: {{ .HarborIP }}nacos-server:v2.1.2
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 8848
|
||||
|
||||
@@ -195,7 +195,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:11-debian-11-r136
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/bitnami-shell:11-debian-11-r136
|
||||
image: {{ .HarborIP }}bitnami-shell:11-debian-11-r136
|
||||
{{- end }}
|
||||
imagePullPolicy: "Always"
|
||||
command:
|
||||
@@ -218,7 +218,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||
image: {{ .HarborIP }}rabbitmq:3.9.12-debian-10-r3
|
||||
{{- end }}
|
||||
imagePullPolicy: "Always"
|
||||
env:
|
||||
|
||||
@@ -356,7 +356,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/redis:6.2.6-debian-10-r0
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/redis:6.2.6-debian-10-r0
|
||||
image: {{ .HarborIP }}redis:6.2.6-debian-10-r0
|
||||
{{- end }}
|
||||
imagePullPolicy: "Always"
|
||||
securityContext:
|
||||
@@ -494,7 +494,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:6.2.6-debian-10-r0
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/bitnami-shell:6.2.6-debian-10-r0
|
||||
image: {{ .HarborIP }}bitnami-shell:6.2.6-debian-10-r0
|
||||
{{- end }}
|
||||
imagePullPolicy: "Always"
|
||||
securityContext:
|
||||
|
||||
@@ -43,7 +43,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
||||
image: {{ .HarborIP }}{{ .AppName }}:{{ .ImageTag }}
|
||||
{{- end }}
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
{{- if .HarborPort }}
|
||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
||||
{{- else }}
|
||||
image: {{ .HarborIP }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
||||
image: {{ .HarborIP }}{{ .AppName }}:{{ .ImageTag }}
|
||||
{{- end }}
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
|
||||
@@ -10,7 +10,11 @@ data:
|
||||
ingress-config.js: |-
|
||||
var __GlobalIngressConfig = {
|
||||
TenantEnvironment: "{{ .TenantEnv }}",
|
||||
{{- if .WebPort }}
|
||||
CloudHOST: "{{ .WebIP }}:{{ .WebPort }}",
|
||||
{{- else }}
|
||||
CloudHOST: "{{ .WebIP }}",
|
||||
{{- end }}
|
||||
{{- if eq .ShortName "pangu" }}
|
||||
ApplicationShortName: "",
|
||||
{{- else }}
|
||||
|
||||
@@ -253,7 +253,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
||||
// 计算20:00的时间
|
||||
now := time.Now()
|
||||
|
||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 13, 52, 00, 0, now.Location())
|
||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 13, 40, 00, 0, now.Location())
|
||||
|
||||
duration := time.Duration(0)
|
||||
|
||||
@@ -277,7 +277,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
||||
appNameTagMap := map[string]string{
|
||||
//"cmii-uav-multilink": "5.5.0",
|
||||
//"cmii-uav-process": "5.6.0-060601",
|
||||
"cmii-uav-industrial-portfolio": "5.6.0-060601",
|
||||
"cmii-uav-industrial-portfolio": "5.6.0-061201",
|
||||
}
|
||||
|
||||
for appName, newTag := range appNameTagMap {
|
||||
|
||||
@@ -52,3 +52,6 @@
|
||||
2024-06-05-17-48-21 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-060301 5.6.0-060501
|
||||
2024-06-06-13-53-12 uavcloud-demo cmii-uav-process 5.6.0 5.6.0-060601
|
||||
2024-06-06-13-59-14 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-060501 5.6.0-060601
|
||||
2024-06-12-13-40-00 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061101 5.6.0-061201
|
||||
2024-06-12-13-45-01 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061201 5.6.0-061101
|
||||
2024-06-12-13-47-35 uavcloud-demo cmii-uav-industrial-portfolio 5.6.0-061101 5.6.0-061201
|
||||
|
||||
Reference in New Issue
Block a user