This commit is contained in:
Martin Blazik
2020-11-24 12:50:51 +01:00
parent 6964679d8c
commit 545c8809ab

25
bin/dcm
View File

@@ -1,5 +1,9 @@
#!/usr/bin/env python3
"""
dcm down -v --remove-orphans
"""
import subprocess
import yaml
import pprint
@@ -41,7 +45,7 @@ def dc_run(args):
def dc_log(args):
args = ["logs"] + args + [r"| sed -r 's/^[^|]+\| //g'"]
args = ["logs", "--no-color"] + args + [r"| sed -r 's/^[^|]+\| //g'"]
dc_run(args)
@@ -65,8 +69,25 @@ def dump_files(files):
print(file)
# AFM exec API: curl -fs -o /dev/null http://localhost:9001/actuator/health/readiness
# AQE: /opt/bin/aqe ping
# md-api-new: curl -fs -o /dev/null http://localhost:9008/actuator/health/readiness
# potgres: s6-setuidgid postgres; /usr/bin/pg_isready
# pulsar: curl -fs -o /dev/null http://localhost:8080/admin/v2/tenants/public
# redis: /usr/bin/redis-cli ping
# result-cache: curl -fs -o /dev/null http://localhost:9041/actuator/health/readiness
# scan-model: curl -fs -o /dev/null http://localhost:9061/actuator/health/readiness
# sql-executor: curl -fs -o /dev/null http://localhost:9101/actuator/health/readiness
def curl_check(uri):
cmd = "curl -f -s -o /dev/null " + uri
print(cmd)
return subprocess.call(cmd, shell=True) == 0
def check_pulsar():
return False
return curl_check("http://localhost:8080/admin/v2/tenants/public")
def check_postgres():