Sling
  1. Sling
  2. SLING-922

Load modules on startup from an external directory

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Launchpad Base 2.1.0
    • Component/s: Launchpad
    • Labels:
      None

      Description

      Need a way to install and start bundles automatically from an external directory (sling home) on startup. The ideas below are from the list.
      ----------
      > I would like to be able to setup sling to start with a bunch of
      > installed bundles when it first is started. It seems like there are a
      > couple way to do this that I have found but neither is ideal:
      > 1) Rebuild sling from source with the extra bundles in the launcher
      > pom (this seems to create a bunch of resources/# folders with bundles
      > in them)
      > 2) Configure all bundles in the sling.properties file (this requires
      > the bundles to be in an accessible obr)
      > http://incubator.apache.org/sling/site/provisioning-and-startup.html
      >
      > I would like to ideally do something in between like so:
      > Get a binary copy of the sling jar
      > Create a folder with sub-folders like /1 /10 /15
      > Put my bundles in the various subfolders
      > Configure sling.properties to point to the folder
      > Start sling and have all bundles in the sub-folders installed and started

      • Aaron Zeckoski
        ===============
        Currently, as you say in (1), the BootstrapInstaller of the Sling
        launchpad looks into its own resources enclosed in the JAR or WAR file
        for bundles to install on startup.

      How about extending this mechanism like this:

      • Copy all bundles from enclosed resources to
        $ {sling.home}/startup. This gives something like
        ${sling.home}

        /startup/0, /1, /10, /15, ...
        Existing files are only replaced if the files
        enclosed in the Sling launchpad jar/war file are
        newer.

      • Scan $ {sling.home}

        /startup for bundles to install
        in the same way as today the enclosed resources
        are scanned directly.

      So you could place your bundles in that structure and get them installed
      at the requested start level (0 being "default bundle start level").

      A nice side effect of this is, that you can quickly see, which bundles
      have been installed at all.

      • Felix
        =================
        I like this, and agree that this should replace the current mechanism.

      How about adding a sling.properties option to completely ignore the
      bundles that come from the Sling jar/war file? Might make it easier to
      have precise control on what's installed.

      -Bertrand
      =================
      Maybe worth it to make this optional or controllable via a property in the sling properties.

      • Aaron Zeckoski
      1. SLING-922.patch
        45 kB
        Aaron Zeckoski
      2. SLING922_fmeschbe.patch
        30 kB
        Felix Meschberger
      3. binary-test-resources.zip
        10 kB
        Aaron Zeckoski

        Issue Links

          Activity

          Aaron Zeckoski created issue -
          Felix Meschberger made changes -
          Field Original Value New Value
          Assignee Felix Meschberger [ fmeschbe ]
          Aaron Zeckoski made changes -
          Attachment binary-test-resources.zip [ 12407018 ]
          Attachment SLING-922.patch [ 12407019 ]
          Felix Meschberger made changes -
          Attachment SLING922_fmeschbe.patch [ 12407139 ]
          Felix Meschberger made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Felix Meschberger made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s Launchpad Base 2.0.6 [ 12313965 ]
          Resolution Fixed [ 1 ]
          Bertrand Delacretaz made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Felix Meschberger [ fmeschbe ]
          Felix Meschberger made changes -
          Assignee Felix Meschberger [ fmeschbe ]
          Felix Meschberger made changes -
          Workflow jira [ 12460827 ] no-reopen-closed,doc-test-required [ 12476215 ]
          Felix Meschberger made changes -
          Status Reopened [ 4 ] In Progress [ 3 ]
          Felix Meschberger made changes -
          Status In Progress [ 3 ] Documentation Required [ 10007 ]
          Felix Meschberger made changes -
          Component/s Launchpad Launcher [ 12311947 ]
          Justin Edelson made changes -
          Link This issue is related to SLING-1443 [ SLING-1443 ]
          Carsten Ziegeler made changes -
          Fix Version/s Launchpad Base 2.2.2 [ 12314956 ]
          Fix Version/s Launchpad Base 2.1.0 [ 12313965 ]
          Carsten Ziegeler made changes -
          Status Documentation Required [ 10007 ] Resolved [ 5 ]
          Carsten Ziegeler made changes -
          Fix Version/s Launchpad Base 2.1.0 [ 12313965 ]
          Fix Version/s Launchpad Base 2.2.2 [ 12314956 ]
          Carsten Ziegeler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow no-reopen-closed,doc-test-required [ 12476215 ] Copy of no-reopen-closed,doc-test-required [ 12764912 ]
          Carsten Ziegeler made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Carsten Ziegeler made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Carsten Ziegeler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow Copy of no-reopen-closed,doc-test-required [ 12764912 ] no-reopen-closed,doc-test-required [ 12765945 ]
          Gavin made changes -
          Workflow no-reopen-closed,doc-test-required [ 12765945 ] re-open possible,doc-test-required [ 12787932 ]
          Gavin made changes -
          Workflow re-open possible,doc-test-required [ 12787932 ] no-reopen-closed,doc-test-required [ 12792841 ]

            People

            • Assignee:
              Felix Meschberger
              Reporter:
              Aaron Zeckoski
            • Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 72h
                72h
                Remaining:
                Remaining Estimate - 72h
                72h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development