Commit f6d32ff9 authored by zxl's avatar zxl
Browse files

管理模块样例

parent a8f310b1
FROM csst-l1ppl:latest
COPY run.sh /app/bin/
RUN chmod +x /app/bin/run.sh
RUN mkdir /work/
WORKDIR /work/
ENTRYPOINT ["goagent"]
\ No newline at end of file
IMAGE_NAME:=csst/adm-template
build:
docker build --network=host -t $(IMAGE_NAME) .
dist:
docker save $(IMAGE_NAME) | zstdmt | pv | ssh c0 'zstd -d | docker load'
push:
docker push $(IMAGE_NAME)
run:
docker run -it --entrypoint bash $(IMAGE_NAME)
down:
docker stop $(IMAGE_NAME)
\ No newline at end of file
#!/usr/bin/env python
#ecoding=utf-8
f=open(r"./message.txt","+a")
#newline=input('input a string: ')
newline=100000100
for newline in range(100000100,100000155):
f.writelines(str(newline)+"\n")
newline+=1
f.close()
\ No newline at end of file
100000100
100000101
100000102
100000103
100000104
100000105
100000106
100000107
100000108
100000109
100000110
100000111
100000112
100000113
100000114
100000115
100000116
100000117
100000118
100000119
100000120
100000121
100000122
100000123
100000124
100000125
100000126
100000127
100000128
100000129
100000130
100000131
100000132
100000133
100000134
100000135
100000136
100000137
100000138
100000139
100000140
100000141
100000142
100000143
100000144
100000145
100000146
100000147
100000148
100000149
100000150
100000151
100000152
100000153
100000154
#!/bin/bash
python adm.py
echo "read message..."
#readline message.txt and send-message
for line in `cat message.txt`
do
echo $line
send-message $line
code=$?
done
exit $code
\ No newline at end of file
name: adm-template.app.process
label: csst-adm-template
cluster: csst
parameters:
initial_status: RUNNING
jobs:
adm-template:
base_image: csst/adm-template
schedule_mode: HEAD
variables:
repeated: yes
parameters:
start_message: any
paths:
- /:/local:ro
environments:
- DFS_SERVER=${DFS_SERVER}
# command: docker run -d --network=host %ENVS% %VOLUMES% %IMAGE%
sink_jobs:
- sink-module
sink-module:
base_image: hub.cstcloud.cn/scalebox/agent
schedule_mode: HEAD
parameters:
key_group_regex: ${KEY_GROUP_REGEX}
key_group_seq: ${KEY_GROUP_SEQ}
# DFS info
DFS_SERVER=
# 业务模块相关参数
# 流水线运行相关参数
KEY_GROUP_REGEX=
KEY_GROUP_SEQ=
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment