디렉토리 구조 및 각 서비스 추가

This commit is contained in:
dsk-minchulahn
2024-01-03 17:29:11 +09:00
parent 98de2a7627
commit d601d0f259
1632 changed files with 207616 additions and 1 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
}