Merge "Link DCAE MOD design tool to Acumos Adapter"
[dcaegen2/platform.git] / mod / onboardingapi / start.sh
1 #!/bin/bash
2
3 if [ -z $PG_CONN ]; then
4     echo "PG_CONN variable has not been set"
5     echo "PG_CONN contains the full postgresql URI"
6     exit 1
7 fi
8
9 if [ ! -f ~/.config/dcae-cli/config.json ]; then
10     echo "Creating dcae-cli config"
11     # TODO: Make this into a variable that gets fed in via docker run
12     echo "{\"server_url\": \"https://git.onap.org/dcaegen2/platform/plain/mod\", \"user\": \"api\", \"db_url\": \"$PG_CONN\", \"cli_version\": \"2.12.0\", \"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
13 fi
14
15 dcae_cli http --live