| 1 | == !NetKarma Evaluation == |
| 2 | |
| 3 | The gush2netkarma package deliverable is a script that uses a set of rules to read a log file and generate appropriate provenance information. The initial version was deemed too old (GEC7 version), a new version [https://www.slashtmp.iu.edu/public/download.php?FILE=dghoshal/44577wbJ1BL geni_adaptor.tar.gz ](GEC8 version) was made available on Aug 3rd and requires a download password. Time frame for GEC8 version: This evaluation took place August 25-28, 2010. |
| 4 | |
| 5 | A second version was made available on September 13, which delivered a new ruleset to handle log issues discovered in the previous evaluation. |
| 6 | |
| 7 | == !NetKarma Findings == |
| 8 | |
| 9 | Requested account to get access to code that allows experiment provenance capture using GUSH. The [http://globalnoc.iu.edu/grnoc-internal/file-bin/system-engineering/software-projects/netkarma/gush2netkarma-1.0.tar.zip gush2netkarma-1.0.tar.zip] file is available Global Research NOC. |
| 10 | |
| 11 | * Pre-requisite of openjdk-6-jre and sun-java6-jdk not documented. |
| 12 | * Installation instructions need clarification about the expected location of the various files. |
| 13 | * Initial make fails with what seems like a missing file error. |
| 14 | * env.sh sets CLASSPATH for java-1.6.0-open-jdk but does not set PATH for /usr/lib/jvm/java-1.6.0-openjdk/bin |
| 15 | |
| 16 | Found from PI that version available is the deliverable of the first generation adaptor and that the version |
| 17 | posted is suited to the purposes of the GEC7 demo only. Developer is working on cleaning that up and posting |
| 18 | a version that has a clear separation of the front end adaptor, and demo-only back end graph generation. |
| 19 | |
| 20 | The GEC8 version was downloaded on August 3. Upon use, it was found that some prerequisites where not captured: |
| 21 | * graphviz: rich set of graph drawing tools |
| 22 | * libgtkglext1: OpenGL Extension to GTK+ (shared libraries) |
| 23 | * libgts-dev: GNU Triangulated Surface Library |
| 24 | Only the graphviz tool was added to the list of pre-requisistes. |
| 25 | |
| 26 | Once all pre-requisites were installed, using logs from gush testing revealed an issue with the ruleset.xml delivered. |
| 27 | Tried to verify that new ruleset addresses issues in September 3rd version. |
| 28 | |
| 29 | == !NetKarma How-to == |
| 30 | |
| 31 | '''!NetKarma GEC7 Version How-to''' |
| 32 | |
| 33 | The GEC7 version of the netkarma tgz files deliver a Readme.txt which describes installation and run time: |
| 34 | {{{ |
| 35 | Installation |
| 36 | ------------- |
| 37 | The package has 4 parts: |
| 38 | i) src: contains the java files for parsing the logfiles. |
| 39 | ii) lib: contains jar files required for successful execution of the parser. |
| 40 | iii) toolbox-1.1.1-release.zip: the visualization tool for OPM graphs. |
| 41 | iv) config-files and shell-scripts: required for executing theend-to-end process for generating OPM graphs. |
| 42 | |
| 43 | Configuration-info: |
| 44 | i) Copy the src/*.java files in a directory where the config-files & shell-scripts have been kept. |
| 45 | ii) Copy the lib directory. |
| 46 | iii) Unzip the OPM-toolbox |
| 47 | iv) Modify the config-parameters ($CLASSPATH & $JAVA_HOME) in env.sh and provenance_collector.sh, if required. |
| 48 | |
| 49 | Compilation: |
| 50 | Compile the source-code using the following commands:- |
| 51 | i) source env.sh |
| 52 | ii) make |
| 53 | |
| 54 | Additional-Info: |
| 55 | The package also contains the following files which are required for the programs to execute:- |
| 56 | i) ruleset.xml: the rule file to parse the geni logfiles. |
| 57 | ii) ruleset.properties: some decode-info for the ruleset. |
| 58 | |
| 59 | Execution |
| 60 | ---------- |
| 61 | To generate the OPM graph, run the shell-script as: |
| 62 | ./provenance_collector.sh <rule.xml file> <logfile> <out_opm_file> <.dot file> <.pdf file> <opmtoolbox-path> |
| 63 | }}} |
| 64 | |
| 65 | 1. Unpacked the gush2netkarma-1.0.tar.zip which created directory named !NetKarmaFiles. |
| 66 | |
| 67 | 2. Executed the "Configuration-info" steps: |
| 68 | |
| 69 | * Not sure what is the target of step i. Some configuration files are delivered at the top level of the !NetKarmaFiles |
| 70 | directory, so I created links in the !NetKarmaFiles to the "src*.java" files. |
| 71 | |
| 72 | * The file "env.sh" and "provenance_collector.sh" files set CLASSPATH to a directory named ~/geni_parser, based on this, the step ii copies the '''lib''' to '''~/geni_parser''' directory. |
| 73 | |
| 74 | * Unzip a files named "toolbox-1.1.1-release.zip" which created a directory named "OPM-toolbox". |
| 75 | |
| 76 | * Did not modify configuration parameters as files were placed in expected locations. |
| 77 | |
| 78 | 3. Executed "Compilation" steps, ran into undocumented requirements: |
| 79 | * Two packages had to be installed: openjdk-6-jre and sun-java6-jdk. |
| 80 | * The env.sh sets the CLASSPATH, but also PATH needs to be set to point to /usr/lib/jvm/java-1.6.0-openjdk/bin |
| 81 | |
| 82 | Once the above were completed, was able to execute the compilation steps: |
| 83 | {{{ |
| 84 | $ source env.sh |
| 85 | $ make |
| 86 | javac -g PropertyReader.java |
| 87 | javac -g Decoder.java |
| 88 | javac -g ProvenanceSummary.java |
| 89 | javac -g ProvenanceInformation.java |
| 90 | javac -g Comparators.java |
| 91 | javac -g Constants.java |
| 92 | javac -g SelectionQueries.java |
| 93 | javac -g GeniLogParser.java |
| 94 | javac -g OPMMapper.java |
| 95 | javac -g OPMGraphGenerator.java |
| 96 | }}} |
| 97 | |
| 98 | Tried to use Provenance collector script, but not enough information is available, could not get details |
| 99 | about parameters and their meaning: |
| 100 | {{{ |
| 101 | $ ./provenance_collector.sh |
| 102 | Usage: ./provenance_collector.sh <rule.xml file> <logfile> <out_opm_file> <.dot file> <.pdf file> <opmtoolbox-path> |
| 103 | }}} |
| 104 | |
| 105 | '''!NetKarma GEC8 Version How-to''' |
| 106 | |
| 107 | 1. Downloaded geni_adaptor.tar.gz from https://www.slashtmp.iu.edu/public/download.php?FILE=dghoshal/44577wbJ1BL |
| 108 | |
| 109 | 2. Unpacked the tgz bundle which delivers a directory named '''geni_parser''' containing a Readme.txt: |
| 110 | |
| 111 | {{{ |
| 112 | # |
| 113 | # Copyright 2010 The Trustees of Indiana University |
| 114 | # |
| 115 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 116 | # you may not use this file except in compliance with the License. |
| 117 | # You may obtain a copy of the License at |
| 118 | # |
| 119 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 120 | # |
| 121 | # Unless required by applicable law or agreed to in writing, software |
| 122 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 123 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 124 | # See the License for the specific language governing permissions and |
| 125 | # limitations under the License. |
| 126 | # |
| 127 | # ----------------------------------------------------------------- |
| 128 | # |
| 129 | # Project: NetKarma Provenance Service Adaptor |
| 130 | # File: Readme.txt |
| 131 | # Description: |
| 132 | # This prototype provenance collection adaptor mines a log file against a |
| 133 | # set of rules and generates provenance events. The provenance events would |
| 134 | # normally be sent to the Karma service, but in this GEC7 demo (March 2010), the provenance |
| 135 | # events are written to a file. The file is then fed as input to a visualization |
| 136 | # client that reads the file and generates a visual representation of the provenance |
| 137 | # graph. |
| 138 | # ----------------------------------------------------------------- |
| 139 | # |
| 140 | |
| 141 | This module can be built from the included source. |
| 142 | |
| 143 | |
| 144 | Building from Source: |
| 145 | --------------------- |
| 146 | Prerequisites: |
| 147 | i) Apache-Ant (the directory where this is installed is referred to as ANT_HOME) |
| 148 | ii) JDK 1.6 (the directory where this is installed is referred to as JAVA_HOME) |
| 149 | |
| 150 | Edit the Configuration File: |
| 151 | In the env.sh file, set the paths for the GENI_HOME, JAVA_HOME, and ANT_HOME |
| 152 | environment variables to match the directory where you unzipped the tarball (GENI_HOME) |
| 153 | and where you installed java and ant respectively. |
| 154 | |
| 155 | Aside from the above prerequisites, all of the necessary source, configuration files, |
| 156 | and jars are included in the tarball named geni_adaptor.tar.gz. Unzip this tarball and it will |
| 157 | create a directory named geni_parser (containing this readme file) that will be |
| 158 | your build and installation directory. |
| 159 | This installation directory is referred to as <GENI_HOME>. |
| 160 | |
| 161 | Also, unzip the toolbox-1.1.1-release.zip. |
| 162 | |
| 163 | This module is built and run using a set of scripts. The scripts in the <GENI_HOME> |
| 164 | directory are configured for the bash shell. If you are using the C shell, please |
| 165 | use the scripts in the <GENI_HOME>/tcsh_scripts instead. |
| 166 | |
| 167 | To build the parser, run the following script in the <GENI_HOME> directory. |
| 168 | ./compile.sh |
| 169 | |
| 170 | If you encounter an error, please be sure that both ANT and JDK 1.6 are on |
| 171 | your path. |
| 172 | |
| 173 | Running the Geni Parser: |
| 174 | ------------------------ |
| 175 | Edit the Configuration File: |
| 176 | Similar to compiling, please edit the settings for GENI_HOME and JAVA_HOME in the |
| 177 | geni_stdenvs.cfg file used to set the environment for running the parser. |
| 178 | |
| 179 | Specifying the Rules Files: |
| 180 | When the parser is run it expects the following two files which are used to specify |
| 181 | the rules used to map log entries into notifications. Defaults are included for these |
| 182 | in the <GENI_HOME> directory: |
| 183 | i) ruleset.xml: the rule file to parse the geni logfiles. |
| 184 | ii) ruleset.properties: some decode-info for the ruleset. |
| 185 | |
| 186 | Execution: |
| 187 | ----------- |
| 188 | To generate the OPM graph, run the shell-script as: |
| 189 | provenance_collector.sh <logfile> |
| 190 | where <logfile> is the log-file which is to be parsed |
| 191 | |
| 192 | There is a sample log file named "logfile-ubuntu-15555-1267499048.txt" in the tarball. |
| 193 | |
| 194 | Troubleshooting: |
| 195 | ---------------- |
| 196 | In case, you get any java-runtime linkage error for jaxb-api, put the |
| 197 | lib/jaxb-api-2.1.jar in <JAVA_HOME>/lib/endorsed directory. |
| 198 | }}} |
| 199 | |
| 200 | 3. Install Apache Ant and JDK 1.6: |
| 201 | {{{ |
| 202 | $ sudo apt-get install ant |
| 203 | $ sudo apt-get install sun-java6-jdk |
| 204 | }}} |
| 205 | 4. Edit the configuration file env.sh to set GENI_HOME, JAVA_HOME, and ANT_HOME: |
| 206 | |
| 207 | {{{ |
| 208 | export GENI_HOME=/home/lnevers/NetKarma/geni_parser |
| 209 | export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.20 |
| 210 | export ANT_HOME=/usr/share/ant |
| 211 | export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH |
| 212 | |
| 213 | export CLASSPATH=$GENI_HOME/lib/provInfo.jar:$GENI_HOME/lib/commons-lang-2.3.jar:$GENI_HOME/lib/jaxb-impl.jar:$GENI_HOME/lib/jsr173_1.0_api.jar:$GENI_HOME/lib/opm-core-1.1.1.jar:$GENI_HOME/lib/opm-elmo-1.1.1.jar:$GENI_HOME/lib/Ruleset.jar:$GENI_HOME/lib/runtime-0.4.1.5.jar:$GENI_HOME/lib/xbean.jar:$GENI_HOME/lib/xml-apis-1.0.b2.jar:. |
| 214 | |
| 215 | }}} |
| 216 | |
| 217 | 5. Unzipped toolbox-1.1.1-release.zip, which created a directory named opmToolbox: |
| 218 | {{{ |
| 219 | $ unzip toolbox-1.1.1-release.zip |
| 220 | }}} |
| 221 | |
| 222 | 6. Compiled the parser tool: |
| 223 | {{{ |
| 224 | lnevers@sendaria:~/NetKarma/geni_parser$ ./compile.sh |
| 225 | Buildfile: build.xml |
| 226 | |
| 227 | build-subprojects: |
| 228 | |
| 229 | init: |
| 230 | |
| 231 | build-project: |
| 232 | [echo] Geni-Update-1.0: /home/lnevers/NetKarma/geni_parser/build.xml |
| 233 | [javac] Compiling 11 source files to /home/lnevers/NetKarma/geni_parser/bin |
| 234 | |
| 235 | build: |
| 236 | |
| 237 | BUILD SUCCESSFUL |
| 238 | Total time: 1 second |
| 239 | }}} |
| 240 | |
| 241 | 7. Running the parser tool requires the following: |
| 242 | |
| 243 | * Edit the geni_stdenvs.cfg gile to set GENI_HOME and JAVA_HOME |
| 244 | * Check rule files ruleset.xml and ruleset.properties. |
| 245 | |
| 246 | Note: Initial attempt to run the parser showed a failure which resulted in the following packages being identified as required: |
| 247 | {{{ |
| 248 | $ sudo apt-get install graphviz |
| 249 | $ sudo apt-get install libgtkglext1 |
| 250 | $ sudo apt-get install libgts-dev |
| 251 | }}} |
| 252 | |
| 253 | Once the prerequisites are install, the parser can be run: |
| 254 | {{{ |
| 255 | $ ./provenance_collector.sh logfile-ubuntu-15555-1267499048.txt |
| 256 | }}} |
| 257 | |
| 258 | The provenance_collector.sh script generates 4 output files: |
| 259 | |
| 260 | * opm_out.dot |
| 261 | * opm_out.pdf |
| 262 | * opm_out.rdf |
| 263 | * opm_out.xml |
| 264 | |
| 265 | The opm_out.pdf for logfile-ubuntu-15555-1267499048.txt shows the following: |
| 266 | [[Image(2010-09-15_netkarma-pdf.jpg)]] |
| 267 | |
| 268 | The opm_out.rdf for logfile-ubuntu-15555-1267499048.txt when viewed with suggested RDF tools Welkin: |
| 269 | [[Image(2010-09-15_netkarma-rdf.jpg)]] |
| 270 | |
| 271 | A "Play" button on the drawing tab for welkin tools moved the nodes in the upper-right-hand quadrant: |
| 272 | [[Image(2010-09-15_netkarma-rdf2.jpg)]] |
| 273 | |
| 274 | The opm_out.dot for logfile-ubuntu-15555-1267499048.txt shows the following: |
| 275 | [[Image(2010-09-15_netkarma-dot.jpg)]] |