-
Notifications
You must be signed in to change notification settings - Fork 82
Developing with the S3 connector
The S3 connector is an .amp used by the acs-packaging project to add functionality to the alfresco-enterprise-repo. The purpose of the connector is to enable storage of binary content in S3 that is managed by Alfresco.
This guide is meant as a quick start to enable a developer to begin working on the project as quickly as possible. You will find additional documents in the alfresco-s3-connector/documentation folder if you wish for further details.
The best way to run the project is to leverage the acs-packaging project. This project contains many tools to aid in development, which this guide will reference.
Cloned the alfresco-s3-connector project.
The following projects should be download/cloned to the same local directory eg.
- /c/alfresco/acs-community-packaging
- /c/alfresco/acs-packaging
- /c/alfresco/alfresco-community-repo
- /c/alfresco/alfresco-enterprise-repo
- /c/alfresco/alfresco-enterprise-share
You must have docker, with docker-compose installed.
You have a bucket in S3 you can use, along with credentials to access it:
- Access Key
- Secret Key
- Navigate to the folder containing the prerequisite projects (i.e. /c/alfresco/)
- There is an alias file in acs-packaging that we will be using, enter the following:
source ./acs-packaging/dev/aliases
- To use local versions of alfresco-community-repo and alfresco-enterprise-repo (required for debugging) use the following script:
./acs-packaging/dev/scripts/linkPoms.sh
This will update the dependencies of each project with SNAPSHOT versions (on windows you will have to do this manually)- (OPTIONAL) Manually updating the pom.xml The dependency order is as follows: alfresco-community-repo -> alfresco-enterprise-repo -> acs-packaging
- Update alfresco-community-repo references in alfresco-enterprise-repo to SNAPSHOT versions
- Update alfresco-enterprise-repo references in acs-packaging to SNAPSHOT versions
- Update the references in S3-connector
- This is the parent pom and should be the alfresco-enterprise-repo SNAPSHOT version
- Build the repository projects by running the command:
entXR
- Build s3 project using:
(cd directory/to/s3-connector && mvn clean install -DskipTests)
- Update the s3-connector version in acs-packaging pom.xml to the SNAPSHOT version build in previous step
- Add your s3 credentials to acs-packaging/dev-acs-amps-overlay. You will see 5 properties that need to be altered as appropriate:
- connector.s3.accessKey
- connector.s3.secretKey
- connector.s3.bucketName
- connector.s3.bucketRegion
- connector.s3.storeProtocol = s3v2
- You need to tell acs-packaging to use the s3-connector by exporting the variable AMPS with the needed profile:
export AMPS=-Ps3
- Run the database, and other required services using the command:
envUp
- You are now finally ready to run the project using:
entT
or with debugging:entTDebug
- Update the required pom.xml files with versions and config needed, either manually and with the script
./acs-packaging/dev/scripts/linkPoms.sh
or just manually. - From the root directory (in the above example /c/alfresco/) run the following commands:
source ./acs-packaging/dev/aliases
entXR
(cd directory/to/s3-connector && mvn clean install -DskipTests)
-
envUp
(To reset your environment first runenvKill && envRm
-
entT
or with debugging:entTDebug