Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-20081

Switching from file system storage (fs) to AWS s3 storage in APS

    Details

    • Bug Priority:
      Category 2
    • ACT Numbers:

      00976238, 00993759

      Description

      Issues
      As per testing in APS 1.8.1 and APS 1.9.0 using APS installer, AWS s3 storage configuration properties will not be picked up unless default file system storage (fs) configuration being fully removed/commented out from following location:

      • From class path: <APS_HOME>/tomcat/lib/activiti-app.properties
      • From root path: <APS_HOME>/tomcat/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties

      Steps to reproduce

      1. Install APS 1.9.0 with Windows installer. Start APS with default configuration.
      2. OOTB, we can find activiti-app.properties in two disk location path which is configure to use file system storage by default.
        • /tomcat/lib
          # 
          # CONTENT STORAGE 
          # 
          contentstorage.fs.rootFolder=C:/alfresco/process-services-1.9.0/act_data/data 
          
        • /tomcat/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app (which is extracted when activiti.war is getting deployed during initial bootstrap)
          
          contentstorage.fs.rootFolder=data/ 
          contentstorage.fs.createRoot=true 
          contentstorage.fs.depth=4 
          contentstorage.fs.blockSize=1024 
          
        • During initial startup, you can see in catalina.bat startup log:
          03:09:39 [localhost-startStop-1] INFO  com.activiti.conf.ContentStorageConfiguration  - Using file-system based content storage (C:/alfresco/process-services-1.9.0/act_data/data)
          03:09:39 [localhost-startStop-1] INFO  com.activiti.conf.ContentStorageConfiguration  - File system root : C:\alfresco\process-services-1.9.0\act_data\data
          
      3. If you then only update /tomcat/lib/activiti-app.properties with below changes:
        #disable fs storage 
        #contentstorage.fs.rootFolder=C:/alfresco/process-services-1.9.0/act_data/data 
        
        #enable s3 storage 
        contentstorage.s3.bucketName=your-s3-bucket 
        contentstorage.s3.objectKeyPrefix=your-s3-bucket-objectKeyPrefix 
        contentstorage.s3.accessKey=xxxx 
        contentstorage.s3.secretKey=xxxxx 
        

        Save file changes then restart without modify /tomcat/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app which still contains default fs configuration .

        • In startup log: you then see these line -> which is using file-system based content storage (/data) as found in root configuration file and it create a new root for me under /tomcat/bin/data..
          06:30:36 [localhost-startStop-1] INFO com.activiti.conf.ContentStorageConfiguration - Using file-system based content storage (data/) 
          06:30:36 [localhost-startStop-1] INFO com.activiti.conf.ContentStorageConfiguration - Creating content storage root and possible missing parents: C:\alfresco\PROCES~1.0\tomcat\bin\data 
          06:30:36 [localhost-startStop-1] INFO com.activiti.conf.ContentStorageConfiguration - File system root : C:\alfresco\PROCES~1.0\tomcat\bin\data 
          
      4. To switch from file system storage to s3 storage, you must do the following:
        • Open <APS1.9_home>/tomcat/lib/activities-app.properties, change to:
          #disable fs storage 
          #contentstorage.fs.rootFolder=C:/alfresco/process-services-1.9.0/act_data/data 
          
          #enable s3 storage 
          contentstorage.s3.bucketName=your-s3-bucket 
          contentstorage.s3.objectKeyPrefix=your-s3-bucket-objectKeyPrefix 
          contentstorage.s3.accessKey=xxxx 
          contentstorage.s3.secretKey=xxxxx 
          

          Save file changes.

        • Open <APS1.9_home>/tomcat/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties, comment out the default fs configuration:
          
          #contentstorage.fs.rootFolder=data/ 
          #contentstorage.fs.createRoot=true 
          #contentstorage.fs.depth=4 
          #contentstorage.fs.blockSize=1024 
          
        • Save file changes and restart APS server. Now, after you delete/comment out all fs related configuration in all activiti-app.properties file, then APS will be able to load the s3 storage (which is found in /tomcat/lib/activiti-app.properties) upon bootstrap.
          06:53:26 [localhost-startStop-1] INFO com.activiti.conf.ContentStorageConfiguration - No file system configuration found, using s3 based content storage 
          

      Actual
      One must comment out fs storage configuration from both
      /tomcat/lib/activiti-app.properties AND /tomcat/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties before it can use the s3 storage.

      Expected
      It should be able to easily switch over from fs to s3 storage by only changing /tomcat/lib/activiti-app.properties, without having to also change /tomcat/webapps/activiti-app/WEB-INF/classes/META-INF/activiti-app/activiti-app.properties.

      Also, there is no clear documentation how should one configure S3 storage in our APS documentation

        Attachments

          Structure

            Activity

              People

              • Assignee:
                apsteam APS Team
                Reporter:
                sliaw Seng Liaw
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel