2 Replies Latest reply on Jul 8, 2013 2:11 AM by Lukáš Fryč

    Idea: Container Installer Extension

    Lukáš Fryč Master

      Hey guys,

       

      I have created a simple extension which allow to unpack a container distribution for managed container adapter.

       

      It allows resolution of container distribution from:

       

      • Maven G:A:V (using ShrinkWrap Resolver)
      • URL (file:///.., http://..)

       

      This solution basically removes a need for unpacking the container distribution from Maven.

       

      I have already found several cases where it would be beneficial to use it and also Ondra Zizka is interested.

       

      ----

       

      The configuration is done in arquillian.xml.

       

      At the end, extension's configuration could look like:

       

      <extension qualifier="container-installer">
            <property name="installation">{group:artifactId:version}|http://...|file://...}</property>
              <property name="target">${project.build.directory}</property>
              <property name="uninstallAfterSuite">true</property>
      </extension>
      

       

      Or better, it could hook into configuration of containers, so that each configuration will have associated distribution.

       

          <container qualifier="jboss" default="true">
              <configuration>
                  <property name="jbossHome">${project.build.directory}/${jbossHome}</property>
      
                  
                  <!-- the location of distribution ZIP -->
      
                  <property name="installation">{group:artifactId:version}|http://...|file://...}</property>
                  <!-- the location of configuration files that we need to rewrite -->
      
                    <property name="installConfiguration">{group:artifactId:version}|http://...|file://...}</property>
                    <property name="installationTarget">${project.build.directory}</property>
                    <property name="uninstallAfterSuite">true</property>
              </configuration>
          </container>
      
      

       

      It occurs to me that it would be also beneficial when this extension could setup containerHome automatically after resolution of a binary and its expansion, in this case it would set ${jbossHome} env property.

       

      ----

       

      The container installation can also provide some useful event hooks:

       

      • InstallContainer
      • ConfigureInstalledContainer
      • UnconfigureInstalledContainer
      • UninstallContainer

       

      You can use arbitrary method to configure container, e.g. use ShrinkWrap Descriptors to rewrite container's XML configuration.

       

      ----

       

      Would you find this extension useful?

        • 1. Re: Idea: Container Installer Extension
          Stefan Miklosovic Novice

          wow ... this seems to be great tooling for downloading whole Android SDK like this http://dl.google.com/android/android-sdk_r22.0.1-linux.tgz upon the test execution e.g. into target or to custom location, perfectly suitable for CI / jenkins environments, totally going together with Android Droidium Not sure if it goes together with Android container out of box but after minor tweaking here and there or even putting this into standalone extension, I think it is pretty the way to go ...

           

          I am totally in, we need to do this kind of thing anyway, e.g. with automatic downloading of tools like Android server apk from Selenium or other bits, lowering configuration effort of  the tester / developer. I would go for making API which a developer would use in extensions like android-extension drone where you just use that api and everything is dowloaded for you automatically ... Check these pdfs http://miklosovic.net/paper01.pdf http://miklosovic.net/paper02.pdf We had some brainstorming with Karel some time ago (he was brainstormed, I just listened to him ) and this is what we got. I think you had the same idea ...

          • 2. Re: Idea: Container Installer Extension
            Lukáš Fryč Master

            Hey Stefan,

             

            we would just need to polish the scheme of configuration, but we can definitely cover downloading of more than just Containers, e.g. Android SDK, Chrome binary, whatever...

             

            It appears that the design of configuration would be most critical piece here.