Loading src/monitoring/.gitlab-ci.yml +14 −12 Original line number Diff line number Diff line Loading @@ -26,19 +26,21 @@ build influx: stage: build script: - kubectl version - kubectl get all # - kubectl delete -f "manifests/monitoring.yaml" # - sleep 15 # - kubectl get all - kubectl apply -f "manifests/monitoring.yaml" - sleep 60 # - kubectl get all # - kubectl apply -f "manifests/influx.yaml" # - sleep 15 # - kubectl version # - kubectl get all - curl -XGET "10.97.74.29:8086/health" # - kubectl delete -f "manifests/influx.yaml" # # - kubectl delete -f "manifests/monitoring.yaml" # # - sleep 15 # # - kubectl get all # - kubectl apply -f "manifests/monitoring.yaml" # - sleep 60 # # - kubectl get all # # - kubectl apply -f "manifests/influx.yaml" # # - sleep 15 # # - kubectl get all # - curl -XGET "10.97.74.29:8086/health" # # - kubectl delete -f "manifests/influx.yaml" - cd ./src/monitoring/service - python3 test_influx.py # test if the Docker image can be pulled from the gitlab registry # test monitoring pull: Loading src/monitoring/service/test_influx.py 0 → 100644 +7 −0 Original line number Diff line number Diff line from influx_tools import * from datetime import datetime influx = Influx('10.97.74.29', 8086, 'teraflow', 'teraflow', 'monitoring') influx.write_KPI(datetime.now(),1,1,101,1000) results = influx.client.query('select * from samples;') print(results.raw) No newline at end of file Loading
src/monitoring/.gitlab-ci.yml +14 −12 Original line number Diff line number Diff line Loading @@ -26,19 +26,21 @@ build influx: stage: build script: - kubectl version - kubectl get all # - kubectl delete -f "manifests/monitoring.yaml" # - sleep 15 # - kubectl get all - kubectl apply -f "manifests/monitoring.yaml" - sleep 60 # - kubectl get all # - kubectl apply -f "manifests/influx.yaml" # - sleep 15 # - kubectl version # - kubectl get all - curl -XGET "10.97.74.29:8086/health" # - kubectl delete -f "manifests/influx.yaml" # # - kubectl delete -f "manifests/monitoring.yaml" # # - sleep 15 # # - kubectl get all # - kubectl apply -f "manifests/monitoring.yaml" # - sleep 60 # # - kubectl get all # # - kubectl apply -f "manifests/influx.yaml" # # - sleep 15 # # - kubectl get all # - curl -XGET "10.97.74.29:8086/health" # # - kubectl delete -f "manifests/influx.yaml" - cd ./src/monitoring/service - python3 test_influx.py # test if the Docker image can be pulled from the gitlab registry # test monitoring pull: Loading
src/monitoring/service/test_influx.py 0 → 100644 +7 −0 Original line number Diff line number Diff line from influx_tools import * from datetime import datetime influx = Influx('10.97.74.29', 8086, 'teraflow', 'teraflow', 'monitoring') influx.write_KPI(datetime.now(),1,1,101,1000) results = influx.client.query('select * from samples;') print(results.raw) No newline at end of file