summaryrefslogtreecommitdiffstats
path: root/mod/onboardingapi/start.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mod/onboardingapi/start.sh')
-rwxr-xr-xmod/onboardingapi/start.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/onboardingapi/start.sh b/mod/onboardingapi/start.sh
new file mode 100755
index 0000000..8b3978d
--- /dev/null
+++ b/mod/onboardingapi/start.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+if [ -z $PG_CONN ]; then
+ echo "PG_CONN variable has not been set"
+ echo "PG_CONN contains the full postgresql URI"
+ exit 1
+fi
+
+if [ ! -f ~/.config/dcae-cli/config.json ]; then
+ echo "Creating dcae-cli config"
+ # TODO: Make this into a variable that gets fed in via docker run
+ echo "{\"server_url\": \"https://git.onap.org/dcaegen2/platform/cli/plain\", \"user\": \"api\", \"db_url\": \"$PG_CONN\", \"cli_version\": \"2.11.1\", \"path_component_spec\": \"/component-json-schemas/component-specification/dcae-cli-v2/component-spec-schema.json\", \"path_data_format\": \"/component-json-schemas/data-format/dcae-cli-v1/data-format-schema.json\"}" > ~/.config/dcae-cli/config.json
+fi
+
+dcae_cli http --live