diff options
author | Dan Timoney <dtimoney@att.com> | 2020-06-24 08:14:17 -0400 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2020-07-02 13:46:57 -0400 |
commit | fc24231f90399ee7c6395dd5b6d6da7b703a695a (patch) | |
tree | 6e303d05918c21701ca29c3c83a1555f1c2c4ddf /ms/generic-resource-api/src/main/resources | |
parent | 8bb4278a79901f23216b61555ab8e6a3830fcd6a (diff) |
Add REST CRUD ops for service data
Add REST Create/Read/Update/Delete for service data
Change-Id: Ie22e8a82afa6b50c4a9fbe80ec792996e377abed
Issue-ID: SDNC-1213
Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/generic-resource-api/src/main/resources')
-rw-r--r-- | ms/generic-resource-api/src/main/resources/startGra.sh | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/ms/generic-resource-api/src/main/resources/startGra.sh b/ms/generic-resource-api/src/main/resources/startGra.sh index 42ef339..5f04e33 100644 --- a/ms/generic-resource-api/src/main/resources/startGra.sh +++ b/ms/generic-resource-api/src/main/resources/startGra.sh @@ -36,8 +36,7 @@ export MYSQL_DB_HOST=${MYSQL_DB_HOST:-dbhost} # Wait for database # echo "Waiting for database" -until mysqladmin ping -h ${MYSQL_DB_HOST} --silent -do +until mysqladmin ping -h ${MYSQL_DB_HOST} --silent; do printf "." sleep 1 done @@ -45,30 +44,26 @@ echo -e "\nDatabase ready" # Create tablespace and user account -mysql -h ${MYSQL_DB_HOST} -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END -CREATE DATABASE ${MYSQL_DB_DATABASE}; -CREATE USER '${MYSQL_DB_USER}'@'localhost' IDENTIFIED BY '${MYSQL_DB_PASSWD}'; -CREATE USER '${MYSQL_DB_USER}'@'%' IDENTIFIED BY '${MYSQL_DB_PASSWD}'; -GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'localhost' WITH GRANT OPTION; -GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'%' WITH GRANT OPTION; -commit; -END +#mysql -h ${MYSQL_DB_HOST} -u root -p${MYSQL_ROOT_PASSWORD} mysql <<-END +#CREATE DATABASE ${MYSQL_DB_DATABASE}; +#CREATE USER '${MYSQL_DB_USER}'@'localhost' IDENTIFIED BY '${MYSQL_DB_PASSWD}'; +#CREATE USER '${MYSQL_DB_USER}'@'%' IDENTIFIED BY '${MYSQL_DB_PASSWD}'; +#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'localhost' WITH GRANT OPTION; +#GRANT ALL PRIVILEGES ON ${MYSQL_DB_DATABASE}.* TO '${MYSQL_DB_USER}'@'%' WITH GRANT OPTION; +#commit; +#END # Initialize schema #mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_DB_USER} -p${MYSQL_DB_PASSWD} ${MYSQL_DB_DATABASE} < ${SDNC_HOME}/config/schema.sql -if [ ! -f ${SDNC_CERT_DIR}/${TRUSTSTORE} ] -then - echo "${SDNC_CERT_DIR}/${TRUSTSTORE} not found ... cannot install ONAP CA certs" -elif [ -z "$TRUSTSTORE_PASSWORD" ] -then - echo "TRUSTSTORE_PASSWORD unset - cannot install ONAP CA certs" +if [ ! -f ${SDNC_CERT_DIR}/${TRUSTSTORE} ]; then + echo "${SDNC_CERT_DIR}/${TRUSTSTORE} not found ... cannot install ONAP CA certs" +elif [ -z "$TRUSTSTORE_PASSWORD" ]; then + echo "TRUSTSTORE_PASSWORD unset - cannot install ONAP CA certs" else - sudo keytool -importkeystore -srckeystore ${SDNC_CERT_DIR}/${TRUSTSTORE} -srcstorepass ${TRUSTSTORE_PASSWORD} -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass ${CACERT_PASSWORD} - echo -e "\nCerts ready" + sudo keytool -importkeystore -srckeystore ${SDNC_CERT_DIR}/${TRUSTSTORE} -srcstorepass ${TRUSTSTORE_PASSWORD} -destkeystore ${JAVA_SECURITY_DIR}/cacerts -deststorepass ${CACERT_PASSWORD} + echo -e "\nCerts ready" fi - cd $SDNC_HOME java -DserviceLogicDirectory=${SVCLOGIC_DIR} -DLOG_PATH=${LOG_PATH} -jar ${SDNC_HOME}/lib/${GRA_JAR} - |