OGCE Build


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

OGCE Build

  1. 1. OGCE Building and Testing on NMI Slides by: Rishi Verma
  2. 2. Configuring OGCE for NMI <ul><ul><li>Design of NMI tests: </li></ul></ul><ul><ul><ul><li>Used three NMI build scripts representing 28 platforms </li></ul></ul></ul><ul><ul><ul><li>Each script downloads OGCE portal via svn </li></ul></ul></ul><ul><ul><ul><li>Scripts use Maven to build portal for each platform </li></ul></ul></ul><ul><ul><ul><li>Following each build, scripts run Apache JMeter runtime checks against each platform's recently built portal </li></ul></ul></ul>
  3. 3. Configuring OGCE for NMI <ul><li>Example NMI submit file script (Linux) </li></ul>project = OGCE component = Trunk Build component_version = 1.0.0 description = Automated test of OGCE build/runtime execution run_type = build inputs = ogcePortal.svn, buildOGCEPortal-nonmac.scp, OGCEJMeterTestFile.scp, OGCEJMeterResults.scp, jakarta-jmeter-2.scp, maven.scp remote_task = buildOGCEPortal-nonmac.sh remote_task_args = &quot;&quot; platforms = x86_64_fc_4, x86_64_fc_5, x86_64_rhap_5, x86_64_rhas_3, x86_64_rhas_4, x86_64_sles_8, x86_cent_4.2, x86_deb_3.1, x86_deb_4.0, x86_fc_2, x86_fc_3, x86_fc_4, x86_fc_5, x86_rh_7.2, x86_rh_8.0, x86_rh_9, x86_rhap_5, x86_rhas_3, x86_rhas_4, x86_slc_3, x86_sles_8, x86_sles_9, x86_slf_3, x86_suse_10.0, x86_suse_10.2, x86_ubuntu_5.10 prereqs = java-1.5.0_08 notify = riverma@indiana.edu remote_task_timeout = 120m
  4. 4. Configuring OGCE for NMI <ul><li>Example NMI submit file script (OSX on x86) </li></ul>project = OGCE component = Trunk Build component_version = 1.0.0 description = Automated test of OGCE build/runtime execution run_type = build inputs = ogcePortal.svn, buildOGCEPortal-mac-x86.scp, tarResultsOGCEPortal-mac-x86.scp, OGCEJMeterTestFile.scp, jakarta-jmeter-2.scp remote_task = buildOGCEPortal-mac-x86.sh remote_task_args = &quot;&quot; platforms = x86_macos_10.4 prereqs = java-1.5.0_06 notify = riverma@indiana.edu remote_task_timeout = 120m
  5. 5. Configuring OGCE for NMI <ul><li>Example NMI submit file script (OSX on ppc) </li></ul>project = OGCE component = Trunk Build component_version = 1.0.0 description = Automated test of OGCE build/runtime execution run_type = build inputs = ogcePortal.svn, buildOGCEPortal-mac-ppc.scp, tarResultsOGCEPortal-mac-ppc.scp, OGCEJMeterTestFile.scp, OGCEJMeterResults.scp, jakarta-jmeter-2.scp remote_task = buildOGCEPortal-mac-ppc.sh remote_task_args = &quot;&quot; platforms = ppc_macos_10.4 prereqs = java-1.5.0_05 notify = riverma@indiana.edu remote_task_timeout = 120m
  6. 6. Configuring OGCE for NMI <ul><ul><li>Practical lessons: </li></ul></ul><ul><ul><li>1. Need to modify your build script for some platforms </li></ul></ul><ul><ul><ul><ul><li>JDK versions were different between Linux platforms, Macintosh x86, and Macintosh ppc platforms respectively </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Made it necessary to use three different NMI scripts </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>Maven program had to be copied separately for Linux platforms because of NMI incompatibilities with OGCE’s bundled maven </li></ul></ul></ul></ul>
  7. 7. Configuring OGCE for NMI <ul><li>Practical lessons continued.. </li></ul><ul><ul><li>2. Environment variables need to be specifically assigned </li></ul></ul><ul><ul><ul><li>$JAVA_HOME needed to be set and added to path </li></ul></ul></ul><ul><ul><ul><li>$HOME directory needed to be set to current NMI build directory because OGCE portal requires knowledge of $HOME </li></ul></ul></ul><ul><ul><li>3. Keep trying to build even if project fails the first time </li></ul></ul><ul><ul><ul><li>OGCE svn download would occasionally fail, so we had each script try 'rebuilding' the portal up to three times every night </li></ul></ul></ul>
  8. 8. Configuring OGCE for NMI <ul><li>Practical lessons continued.. </li></ul><ul><ul><li>4. Have your script &quot;sleep&quot; if runtime programs aren't loading </li></ul></ul><ul><ul><ul><li>Apache Tomcat server would often fail to start </li></ul></ul></ul><ul><ul><ul><li>Issuing a &quot;sleep 20&quot; command gave Tomcat enough time to load </li></ul></ul></ul>
  9. 9. Current state of OGCE NMI tests <ul><ul><li>Builds </li></ul></ul><ul><ul><ul><li>Occur nightly </li></ul></ul></ul><ul><ul><ul><li>26 Linux platforms, 2 Macintosh platforms </li></ul></ul></ul><ul><ul><ul><li>Notifications sent via email, NMI dashboard </li></ul></ul></ul><ul><ul><li>Run-time assertion tests of portal </li></ul></ul><ul><ul><ul><li>Tests run via console mode of Apache JMeter </li></ul></ul></ul><ul><ul><ul><li>Still being implemented into OGCE NMI nightly build scheme </li></ul></ul></ul><ul><ul><ul><li>We are still working on programmatic way to combine all platforms' test information into single document for simple viewing </li></ul></ul></ul>
  10. 10. Analysis of OGCE NMI build tests <ul><ul><li>Linux platforms </li></ul></ul><ul><ul><ul><li>Average build time per platform = 52.19 minutes </li></ul></ul></ul><ul><ul><ul><li>Average total time w/ queue wait (all platforms) = 223.2 minutes </li></ul></ul></ul><ul><ul><li>Macintosh OSX 10.4 (PPC) </li></ul></ul><ul><ul><ul><li>Average build time = 10.3 minutes </li></ul></ul></ul><ul><ul><ul><li>Average total time (including queue) = 25.29 minutes </li></ul></ul></ul><ul><ul><li>Macintosh OSX 10.4 (x86) </li></ul></ul><ul><ul><ul><li>Average build time = 6.2 minutes </li></ul></ul></ul><ul><ul><ul><li>Average total time (including queue) = 96.5 minutes </li></ul></ul></ul>
  11. 11. Runtime testing: Apache JMeter <ul><ul><li>Apache JMeter </li></ul></ul><ul><ul><ul><li>Webpage load-testing and performance analysis software </li></ul></ul></ul><ul><ul><ul><li>Assertion testing feature particularly useful for OGCE testing </li></ul></ul></ul><ul><ul><li>Status on NMI testbed </li></ul></ul><ul><ul><ul><li>JMeter not provided by NMI, so we have scripts copy and install JMeter during each nightly build </li></ul></ul></ul><ul><ul><ul><li>After each platform's nightly build finishes, Tomcat server is started and then JMeter tests are run </li></ul></ul></ul><ul><ul><ul><li>JMeter takes XML test-plan file, and outputs results of tests into another XML file </li></ul></ul></ul>
  12. 12. Runtime testing: Apache JMeter <ul><ul><li>What kind of runtime tests? </li></ul></ul><ul><ul><ul><li>Testing of “logging into portal” </li></ul></ul></ul><ul><ul><ul><li>Testing of “obtaining MyProxy certificates” </li></ul></ul></ul><ul><ul><ul><li>Testing each &quot;portlet&quot; of OGCE portal </li></ul></ul></ul><ul><ul><ul><ul><li>Automatic clicking of all web-links </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Performing all theoretical user-actions </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Submitting files, downloading, submitting jobs </li></ul></ul></ul></ul><ul><ul><ul><li>Testing of “logging out of portal” </li></ul></ul></ul>
  13. 13. Runtime testing: Apache JMeter <ul><ul><li>How we set-up runtime tests on NMI </li></ul></ul><ul><ul><ul><li>Copy Apache JMeter by using &quot;.scp&quot; file </li></ul></ul></ul><ul><ul><ul><ul><li>method = scp </li></ul></ul></ul></ul><ul><ul><ul><ul><li>scp_file=/home/<username>/JMeter.tar.gz </li></ul></ul></ul></ul><ul><ul><ul><li>Run JMeter within script </li></ul></ul></ul><ul><ul><ul><ul><li>jmeter -n -t <JMeter Test File>.jmx -l <JMeter output file> </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>&quot;-n&quot; specifies non-gui mode </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>&quot;-t&quot; specifies name of a JMeter test plan file </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>&quot;-l&quot; specifies name of output file </li></ul></ul></ul></ul></ul><ul><ul><ul><li>Collect JMeter output file </li></ul></ul></ul><ul><ul><ul><ul><li>Have script store JMeter output file in a &quot;results.tar.gz&quot; file (NMI standard technique) </li></ul></ul></ul></ul>
  14. 14. Runtime testing: Apache JMeter <ul><ul><li>Current state of testing </li></ul></ul><ul><ul><ul><li>XML-based results can be graphically interpreted via XSLT programming </li></ul></ul></ul><ul><ul><ul><li>Not yet fully implemented for all platforms </li></ul></ul></ul>
  15. 15. Runtime testing: Apache JMeter <ul><ul><li>Graphical interpretation of results (XML output) </li></ul></ul>