WIP: dcm
This commit is contained in:
25
bin/dcm
25
bin/dcm
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user