@winner-fed/winner-deploy 3.0.0 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/genDockerPackage.js
CHANGED
|
@@ -39,6 +39,9 @@ exports.genDockerPackage = function genDockerPackage (seePackageName, options, h
|
|
|
39
39
|
fs.ensureDirSync('docker')
|
|
40
40
|
fs.outputFileSync(path.resolve(process.cwd(), `docker/Dockerfile`), genDockerfile({ name }));
|
|
41
41
|
|
|
42
|
+
// 缺少 scripts 目录会导致 SEE 平台上传发布物报错
|
|
43
|
+
fs.ensureDirSync(`${tmp}/scripts`);
|
|
44
|
+
|
|
42
45
|
// 缺少 template 目录会导致 SEE 平台上传发布物报错
|
|
43
46
|
fs.ensureDirSync(`${tmp}/template`)
|
|
44
47
|
|
|
@@ -71,9 +74,10 @@ exports.genDockerPackage = function genDockerPackage (seePackageName, options, h
|
|
|
71
74
|
}))
|
|
72
75
|
|
|
73
76
|
if (handler) {
|
|
74
|
-
handler(() => {
|
|
77
|
+
handler((cb) => {
|
|
75
78
|
genZipPackage(seePackageName, tmp, () => {
|
|
76
79
|
rm.sync(tmp)
|
|
80
|
+
typeof cb === 'function' && cb()
|
|
77
81
|
})
|
|
78
82
|
})
|
|
79
83
|
} else {
|
package/src/genZipPackage.js
CHANGED
|
@@ -68,9 +68,10 @@ exports.genSeePackage = function genSeePackage (seePackageName, options, handler
|
|
|
68
68
|
}))
|
|
69
69
|
|
|
70
70
|
if (handler) {
|
|
71
|
-
handler(() => {
|
|
71
|
+
handler((cb) => {
|
|
72
72
|
genZipPackage(seePackageName, tmp, () => {
|
|
73
73
|
rm.sync(tmp)
|
|
74
|
+
typeof cb === 'function' && cb()
|
|
74
75
|
})
|
|
75
76
|
})
|
|
76
77
|
} else {
|
package/src/winner-deploy.js
CHANGED
|
@@ -130,14 +130,12 @@ exports.generateSeePackageZip = function generateSeePackageZip ({
|
|
|
130
130
|
},
|
|
131
131
|
done => {
|
|
132
132
|
|
|
133
|
-
// 自定义执行的操作
|
|
134
|
-
typeof cb === 'function' && cb()
|
|
135
|
-
|
|
136
|
-
done()
|
|
137
133
|
console.log()
|
|
138
134
|
ora(
|
|
139
135
|
`docker 容器化部署的 SEE 发布物制作完成,您可以在 SEE 平台上传并部署应用。`
|
|
140
136
|
).succeed()
|
|
137
|
+
|
|
138
|
+
done(cb)
|
|
141
139
|
}
|
|
142
140
|
)
|
|
143
141
|
return;
|
|
@@ -183,16 +181,14 @@ exports.generateSeePackageZip = function generateSeePackageZip ({
|
|
|
183
181
|
});
|
|
184
182
|
}
|
|
185
183
|
|
|
186
|
-
// 自定义执行的操作
|
|
187
|
-
typeof cb === 'function' && cb()
|
|
188
|
-
|
|
189
|
-
done()
|
|
190
184
|
console.log()
|
|
191
185
|
ora(
|
|
192
186
|
`发布物制作完成,您可以在 SEE 平台上传并部署应用。注意:${chalk.yellow(
|
|
193
187
|
'子系统发布物的安装目录需要指定到具体的应用目录'
|
|
194
188
|
)}。比如/home/hsiar/hsiar-green/html/。\n`
|
|
195
189
|
).succeed()
|
|
190
|
+
|
|
191
|
+
done(cb)
|
|
196
192
|
}
|
|
197
193
|
)
|
|
198
194
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Dockerfile用于生成应用镜像,非特殊情况请勿修改
|
|
2
2
|
FROM package.hundsun.com/public-docker-local/freestyle/hswealth/nginx:1.18.0-alpine-see
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
COPY dist /usr/share/nginx/html/hui-pro
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
RUN chmod +x /etc/nginx/* && \
|
|
7
|
+
chmod +x /usr/share/nginx/html/* &&\
|
|
8
|
+
chmod +x /usr/local/bin/*
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
WORKDIR /usr/share/nginx/html
|
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
<globalConfig describe="系统全局配置" />
|
|
14
14
|
<subSystems describe="子系统集合">
|
|
15
15
|
<system id="${ name }" type="" name="${ name }" mode="cluster" front="">
|
|
16
|
-
<scale describe="集群规模" />
|
|
17
16
|
<variables describe="集群基本参数">
|
|
18
17
|
<field name="user" label="安装用户" type="input">root</field>
|
|
19
|
-
<field name="workspace" label="前端安装目录" type="
|
|
18
|
+
<field name="workspace" label="前端安装目录" type="input" tooltip="IAR上存放前端目录">/home/hsiar/hsiar-green/html</field>
|
|
20
19
|
|
|
21
20
|
<!-- K8S部署配置 -->
|
|
22
21
|
<field name="division_k8s" label="K8S部署配置" type="division" fold="false">
|
|
@@ -7,9 +7,9 @@ metadata:
|
|
|
7
7
|
name: ${svc_id}-service
|
|
8
8
|
spec:
|
|
9
9
|
ports:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
- name: "http"
|
|
11
|
+
port: 80
|
|
12
|
+
targetPort: 80
|
|
13
13
|
selector:
|
|
14
14
|
name: ${svc_id}
|
|
15
15
|
---
|
|
@@ -29,10 +29,10 @@ spec:
|
|
|
29
29
|
name: ${svc_id}
|
|
30
30
|
spec:
|
|
31
31
|
imagePullPolicy: ${image_pull_policy}
|
|
32
|
-
|
|
32
|
+
#if(${image_pull_secrets_enable} == "true")
|
|
33
33
|
imagePullSecrets:
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
- name: ${image_pull_secrets}
|
|
35
|
+
#end
|
|
36
36
|
restartPolicy: ${restart_policy}
|
|
37
37
|
hostname: ${web_app_web_service_name}
|
|
38
38
|
containers:
|
|
@@ -43,7 +43,7 @@ spec:
|
|
|
43
43
|
value: Asia/Shanghai
|
|
44
44
|
ports:
|
|
45
45
|
- containerPort: 80
|
|
46
|
-
|
|
46
|
+
#if(${resources_enable} == "true")
|
|
47
47
|
resources:
|
|
48
48
|
requests:
|
|
49
49
|
cpu: ${cpu_req}
|
|
@@ -51,13 +51,13 @@ spec:
|
|
|
51
51
|
limits:
|
|
52
52
|
cpu: ${cpu_limit}
|
|
53
53
|
memory: ${memory_limit}
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
#end
|
|
55
|
+
#if(${liveness_probe_enable} == "true")
|
|
56
56
|
livenessProbe:
|
|
57
57
|
httpGet:
|
|
58
58
|
scheme: HTTP
|
|
59
59
|
port: 80
|
|
60
|
-
path: /
|
|
60
|
+
path: /sysconfig.js
|
|
61
61
|
initialDelaySeconds: 5
|
|
62
62
|
periodSeconds: 3
|
|
63
63
|
timeoutSeconds: 3
|
|
@@ -67,7 +67,7 @@ spec:
|
|
|
67
67
|
httpGet:
|
|
68
68
|
scheme: HTTP
|
|
69
69
|
port: 80
|
|
70
|
-
path: /
|
|
70
|
+
path: /sysconfig.js
|
|
71
71
|
initialDelaySeconds: 5
|
|
72
72
|
periodSeconds: 3
|
|
73
73
|
timeoutSeconds: 3
|