0283cf373bbffc7d10d65fd72593e07e8308e84f
[docs.git] / manuals / getting-started-guide / src / main / asciidoc / tsdr / tsdr-h2-install.adoc
1 == TSDR H2 Default Datastore Installation Guide
2 This document is for the user to install the artifacts that are needed
3 for using Time Series Data Repository (TSDR) functionality in the ODL Controller by enabling the default JPA (H2) Datastore. TSDR is new functionality added in OpenDayLight in Lithium Release. 
4
5 === Overview
6 In Lithium Release the time deries data records of OpenFlow statistics are collected periodically and stored in a persistent store. For non-production usage, the bundled default JPA based datastore (H2) is utilized based on odl-tsdr-all feature installation. The TSDR records get persisted in H2 store in <install folder>/tsdr/ folder by default.  
7
8 === Pre Requisites for Installing TSDR with default H2 datastore 
9 There are no additional pre-requisites for TSDR based on default datastore 
10
11 === Preparing for Installation
12 No additional steps required for preparation of installing TSDR feature 
13
14 === Installing TSDR with default H2 datastore 
15 Once Opendaylight distribution is up, from karaf console install the TSDR feature with default datastore (JPA based datastore H2 store used) can be installed by 
16
17 feature:install odl-tsdr-all 
18
19 This will install all dependency features (and can take sometime) before returning control to the console. 
20
21 === Verifying your Installation
22 If the feature install was successful you should be able to see the following tsdr commands added 
23
24 **tsdr:list 
25 **tsdr:purgeAll 
26
27 ==== Troubleshooting
28 Check the ../data/log/karaf.log for any exception related to TSDR or JPA related features  
29
30 === Post Installation Configuration
31 The feature installation takes care of automated configuration of the datasource by installing a file in <install folder>/etc named org.ops4j.datasource-metric.cfg. This contains the default location of <install folder>/tsdr where the H2 datastore files are stored. If you want to change the default location of the datastore files to some other location update the last portion of the url property in the org.ops4j.datasource-metric.cfg and then restart the karaf container 
32
33 === Upgrading From a Previous Release
34 Lithium being the first release supporting TSDR functionality, only fresh installation is possible.However if you want to move to production usage by enabling the store HBase for TSDR usage, you can do it by uninstalling the TSDR with default H2 datastore, restarting the Karaf container and then enabling the TSDR with HBase store as documented in tsdr-hbase-install.doc  
35
36 === Uninstalling TSDR with default H2 datastore 
37 To uninstall the TSDR functionality with the default store, you need to do the following from karaf console 
38 * feature:uninstall odl-tsdr-all 
39 * feature:uninstall odl-tsdr-core 
40 * feature:uninstall odl-tsdr-H2-persistence
41
42 Its recommended to restart the Karaf container after uninstallation of the TSDR functionality with the default store 
43