Skip to content

Commit ba4bbe6

Browse files
yangmvyangmv
authored andcommitted
edit deploy
1 parent 2212898 commit ba4bbe6

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
node('haimaxy-jnlp') {
22
stage('Clone') {
33
echo "1.Clone 代码"
4-
git url: "https://github.com/yangmv/SuperCMDB.git"
4+
git url: "$(git_url)"
55
script {
66
build_tag = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
77
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ pip3 install -r requirements.txt
2323
#### 二 配置
2424
- 配置文件 cmdb.conf
2525
- 配置数据库信息
26+
```
27+
cp /var/www/CMDB/cmdb-example.conf /var/www/CMDB/cmdb.conf
28+
```
2629

2730
#### 三 同步数据库
2831
```

deploy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: codo-cmdb
55
spec:
6-
replicas: 2
6+
replicas: 1
77
selector:
88
matchLabels:
99
app: codo-cmdb
@@ -22,15 +22,15 @@ spec:
2222
# command: ['/bin/sh', '-c', 'sed -i "s/s_hostname/$(hostname)/" /data1/www/templates/app.html']
2323
ports:
2424
- name: http
25-
containerPort: <PORT>
25+
containerPort: 80
2626
volumeMounts:
2727
- name: cmdbconf
2828
mountPath: /var/www/CMDB/
2929
readOnly: true
3030
volumes:
3131
- name: cmdbconf
3232
configMap:
33-
name: cmdb-conf
33+
name: cmdb-conf #configmap要提前创建好
3434

3535
---
3636
apiVersion: v1

0 commit comments

Comments
 (0)