[Agent][Deploy] - cmii update
This commit is contained in:
@@ -164,3 +164,30 @@ func configMapDeploy(common *z_dep.CommonEnvironmentConfig) {
|
|||||||
c_app.DefaultCmiiFrontendConfig.ConfigMapDeploy(common)
|
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 }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/dashboard:v2.0.1
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/dashboard:v2.0.1
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/dashboard:v2.0.1
|
image: {{ .HarborIP }}dashboard:v2.0.1
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8443
|
- containerPort: 8443
|
||||||
@@ -267,7 +267,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/metrics-scraper:v1.0.4
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/metrics-scraper:v1.0.4
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/metrics-scraper:v1.0.4
|
image: {{ .HarborIP }}metrics-scraper:v1.0.4
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/nfs-subdir-external-provisioner:v4.0.2
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/nfs-subdir-external-provisioner:v4.0.2
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/nfs-subdir-external-provisioner:v4.0.2
|
image: {{ .HarborIP }}nfs-subdir-external-provisioner:v4.0.2
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: nfs-client-root
|
- name: nfs-client-root
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/busybox:latest
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/busybox:latest
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/busybox:latest
|
image: {{ .HarborIP }}busybox:latest
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/emqx:5.5.1
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/emqx:5.5.1
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/emqx:5.5.1
|
image: {{ .HarborIP }}emqx:5.5.1
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/mongo:5.0
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/mongo:5.0
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/mongo:5.0
|
image: {{ .HarborIP }}mongo:5.0
|
||||||
{{- end }}
|
{{- end }}
|
||||||
resources: {}
|
resources: {}
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:11-debian-11-r136
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:11-debian-11-r136
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/bitnami-shell:11-debian-11-r136
|
image: {{ .HarborIP }}bitnami-shell:11-debian-11-r136
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: "Always"
|
imagePullPolicy: "Always"
|
||||||
command:
|
command:
|
||||||
@@ -329,7 +329,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/mysql:8.1.0-debian-11-r42
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/mysql:8.1.0-debian-11-r42
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/mysql:8.1.0-debian-11-r42
|
image: {{ .HarborIP }}mysql:8.1.0-debian-11-r42
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/nacos-server:v2.1.2
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/nacos-server:v2.1.2
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/nacos-server:v2.1.2
|
image: {{ .HarborIP }}nacos-server:v2.1.2
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8848
|
- containerPort: 8848
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:11-debian-11-r136
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:11-debian-11-r136
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/bitnami-shell:11-debian-11-r136
|
image: {{ .HarborIP }}bitnami-shell:11-debian-11-r136
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: "Always"
|
imagePullPolicy: "Always"
|
||||||
command:
|
command:
|
||||||
@@ -218,7 +218,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/rabbitmq:3.9.12-debian-10-r3
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/rabbitmq:3.9.12-debian-10-r3
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/rabbitmq:3.9.12-debian-10-r3
|
image: {{ .HarborIP }}rabbitmq:3.9.12-debian-10-r3
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: "Always"
|
imagePullPolicy: "Always"
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -356,7 +356,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/redis:6.2.6-debian-10-r0
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/redis:6.2.6-debian-10-r0
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/redis:6.2.6-debian-10-r0
|
image: {{ .HarborIP }}redis:6.2.6-debian-10-r0
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: "Always"
|
imagePullPolicy: "Always"
|
||||||
securityContext:
|
securityContext:
|
||||||
@@ -494,7 +494,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:6.2.6-debian-10-r0
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/bitnami-shell:6.2.6-debian-10-r0
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/bitnami-shell:6.2.6-debian-10-r0
|
image: {{ .HarborIP }}bitnami-shell:6.2.6-debian-10-r0
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: "Always"
|
imagePullPolicy: "Always"
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
image: {{ .HarborIP }}{{ .AppName }}:{{ .ImageTag }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ spec:
|
|||||||
{{- if .HarborPort }}
|
{{- if .HarborPort }}
|
||||||
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
image: {{ .HarborIP }}:{{ .HarborPort }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
image: {{ .HarborIP }}/cmii/{{ .AppName }}:{{ .ImageTag }}
|
image: {{ .HarborIP }}{{ .AppName }}:{{ .ImageTag }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ data:
|
|||||||
ingress-config.js: |-
|
ingress-config.js: |-
|
||||||
var __GlobalIngressConfig = {
|
var __GlobalIngressConfig = {
|
||||||
TenantEnvironment: "{{ .TenantEnv }}",
|
TenantEnvironment: "{{ .TenantEnv }}",
|
||||||
|
{{- if .WebPort }}
|
||||||
CloudHOST: "{{ .WebIP }}:{{ .WebPort }}",
|
CloudHOST: "{{ .WebIP }}:{{ .WebPort }}",
|
||||||
|
{{- else }}
|
||||||
|
CloudHOST: "{{ .WebIP }}",
|
||||||
|
{{- end }}
|
||||||
{{- if eq .ShortName "pangu" }}
|
{{- if eq .ShortName "pangu" }}
|
||||||
ApplicationShortName: "",
|
ApplicationShortName: "",
|
||||||
{{- else }}
|
{{- else }}
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
|||||||
// 计算20:00的时间
|
// 计算20:00的时间
|
||||||
now := time.Now()
|
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)
|
duration := time.Duration(0)
|
||||||
|
|
||||||
@@ -277,7 +277,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
|||||||
appNameTagMap := map[string]string{
|
appNameTagMap := map[string]string{
|
||||||
//"cmii-uav-multilink": "5.5.0",
|
//"cmii-uav-multilink": "5.5.0",
|
||||||
//"cmii-uav-process": "5.6.0-060601",
|
//"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 {
|
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-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-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-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