Hint: Under construction
User documentation: SDN-R Upgrade Procedure
This will be a CommandLineTool for:
- (re)initialize/upgrade SDN-R DB
- backup and restore SDN-R DB data
- create unit test init-file
Its sources are located in the data-provider subproject of ccsdk/features sdnr/wt projects but it won't be deployed as a bundle for opendaylight, so that it is possible to run it independently from any sdnc.
Database Init Container
This Tool will be executed inside the sdnc container with a seperate flag (env-var) 'SDNRINIT', so that the tool will be executed once and the container will be stopped afterwards. The parameters will also pushed within environment variables
- SDNRDBURL
- SDNRDBUSERNAME
- SDNRDBPASSWORD
Structure:
In Elasticsearch(ES) there are no database and datatables. Instead there are indices and doctypes. Since version 5.0 of ES only one doctype per index is allowed, so that we can say our index equals the table in a normal relational database like mariadb.
Examples
init database (for startODL.sh)
java -jar $ODL_HOME/system/org/onap/ccsdk/features/sdnr/wt/sdnr-wt-data-provider-setup/0.7.1-SNAPSHOT/sdnr-dmt.jar -c init -db $SDNRDBURL -dbu $SDNRDBUSERNAME -dbp $SDNRDBPASSWORD
clear database
java -jar $ODL_HOME/system/org/onap/ccsdk/features/sdnr/wt/sdnr-wt-data-provider-setup/0.7.1-SNAPSHOT/sdnr-dmt.jar -c delete -db $SDNRDBURL -dbu $SDNRDBUSERNAME -dbp $SDNRDBPASSWORD
import data
java -jar $ODL_HOME/system/org/onap/ccsdk/features/sdnr/wt/sdnr-wt-data-provider-setup/0.7.1-SNAPSHOT/sdnr-dmt.jar -c import -db $SDNRDBURL -dbu $SDNRDBUSERNAME -dbp $SDNRDBPASSWORD -if filename
export data
java -jar $ODL_HOME/system/org/onap/ccsdk/features/sdnr/wt/sdnr-wt-data-provider-setup/0.7.1-SNAPSHOT/sdnr-dmt.jar -c export -db $SDNRDBURL -dbu $SDNRDBUSERNAME -dbp $SDNRDBPASSWORD -of filename
create unit test plugin file for elasticsearch-maven-plugin
java -jar $ODL_HOME/system/org/onap/ccsdk/features/sdnr/wt/sdnr-wt-data-provider-setup/0.7.1-SNAPSHOT/sdnr-dmt.jar -c pluginfile -of filename