디렉토리 구조 및 각 서비스 추가
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: CronWorkflow
|
||||
metadata:
|
||||
name: ui-monitoring-cron
|
||||
spec:
|
||||
schedule: "0 * * * *"
|
||||
timezone: "Asia/Seoul"
|
||||
workflowSpec:
|
||||
entrypoint: python-example
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: ui-monitoring
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: shared-data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
templates:
|
||||
- name: python-example
|
||||
dag:
|
||||
tasks:
|
||||
- name: ui-monitoring
|
||||
template: ui-monitoring
|
||||
|
||||
- name: ui-monitoring
|
||||
container:
|
||||
image: nexus2.exem-oss.org/ui_monitoring:v0.6
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
echo "======================================"
|
||||
python /tmp/dsk_playwright.py
|
||||
echo "======================================"
|
||||
echo -n "$SSH_KEY" > /tmp/id_rsa
|
||||
chmod 600 /tmp/id_rsa
|
||||
scp -i /tmp/id_rsa -o StrictHostKeyChecking=no -rp /shared-data/*_screenshot* root@10.10.43.98:/tmp/
|
||||
env:
|
||||
- name: SSH_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bastion-ssh-key
|
||||
key: ssh-key
|
||||
volumeMounts:
|
||||
- name: shared-data
|
||||
mountPath: /shared-data
|
||||
@@ -0,0 +1,37 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: CronWorkflow
|
||||
metadata:
|
||||
name: ui-monitoring-cron
|
||||
spec:
|
||||
schedule: "0 * * * *"
|
||||
timezone: "Asia/Seoul"
|
||||
workflowSpec:
|
||||
entrypoint: python-example
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: ui-monitoring
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: shared-data
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
templates:
|
||||
- name: python-example
|
||||
dag:
|
||||
tasks:
|
||||
- name: ui-monitoring
|
||||
template: ui-monitoring
|
||||
|
||||
- name: ui-monitoring
|
||||
script:
|
||||
image: nexus2.exem-oss.org/ui_monitoring:v0.2
|
||||
volumeMounts:
|
||||
- name: shared-data
|
||||
mountPath: /shared-data
|
||||
- name: config-volume
|
||||
mountPath: /tmp/config.json
|
||||
subPath: config.json
|
||||
@@ -0,0 +1,62 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: CronWorkflow
|
||||
metadata:
|
||||
name: ui-monitoring-cron-test
|
||||
spec:
|
||||
schedule: "0 * * * *"
|
||||
timezone: "Asia/Seoul"
|
||||
workflowSpec:
|
||||
entrypoint: python-example
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: ui-monitoring
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: shared-data-{{workflow.name}}
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
templates:
|
||||
- name: python-example
|
||||
dag:
|
||||
tasks:
|
||||
- name: ui-monitoring
|
||||
template: ui-monitoring
|
||||
- name: move-capture
|
||||
template: scp
|
||||
dependencies:
|
||||
- ui-monitoring
|
||||
|
||||
- name: ui-monitoring
|
||||
script:
|
||||
image: nexus2.exem-oss.org/ui_monitoring:v0.3
|
||||
volumeMounts:
|
||||
- name: shared-data-{{workflow.name}}
|
||||
mountPath: /shared-data
|
||||
- name: config-volume
|
||||
mountPath: /tmp/config.json
|
||||
subPath: config.json
|
||||
|
||||
- name: scp
|
||||
container:
|
||||
image: nexus2.exem-oss.org/dsk-openssh-client:v1.0
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
echo -n "$SSH_KEY" > /tmp/id_rsa
|
||||
chmod 600 /tmp/id_rsa
|
||||
while true; do sleep 1; done
|
||||
scp -i /tmp/id_rsa -o StrictHostKeyChecking=no -rp /shared-data/*_screenshot* root@10.10.43.98:/tmp/
|
||||
scp -i /tmp/id_rsa -o StrictHostKeyChecking=no -rp /shared-data/*_error* root@10.10.43.98:/tmp/
|
||||
env:
|
||||
- name: SSH_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bastion-ssh-key
|
||||
key: ssh-key
|
||||
volumeMounts:
|
||||
- name: shared-data-{{workflow.name}}
|
||||
mountPath: /shared-data
|
||||
@@ -0,0 +1,16 @@
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
annotations:
|
||||
name: ui-monitoring
|
||||
namespace: argo-workflows
|
||||
apiVersion: v1
|
||||
data:
|
||||
config.json: |
|
||||
{
|
||||
"dsk_url": "https://app.kr.datasaker.io",
|
||||
"dsk_username": "support@ex-em.com",
|
||||
"dsk_password": "saasadmin12#$",
|
||||
"slack_webhook_url" : "https://hooks.slack.com/services/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",
|
||||
"timeout": 10000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user