From d76905b9c98ec32f17bb9568ff80c04068aa213e Mon Sep 17 00:00:00 2001 From: fkrzywka Date: Mon, 30 Jul 2018 12:55:03 +0200 Subject: Define simple healthchecks for simulators - currently containers are healthy if they have successfully started their Http servers thus simple endpoint at /healthcheck is sufficient - to enable docker healthcheck we need to add `curl` to docker images - http_proxy needs to be provided for docker to be able to build images behind proxy Closes ONAP-695 Change-Id: I02f0b8cc2732713b5307dbc34ba604d8185b74fc Signed-off-by: fkrzywka Issue-ID: DCAEGEN2-601 --- .../onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hv-collector-dcae-app-simulator/src/main') diff --git a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt index cb1484b7..79f143ee 100644 --- a/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt +++ b/hv-collector-dcae-app-simulator/src/main/kotlin/org/onap/dcae/collectors/veshv/simulators/dcaeapp/remote/ApiServer.kt @@ -93,6 +93,9 @@ class ApiServer(private val consumerFactory: ConsumerFactory, .block() } } + .get("healthcheck") { ctx -> + ctx.response.status(STATUS_OK).send() + } } private fun generateEvents(ctx: Context, parameters: List): -- cgit 1.2.3-korg