How to deploy amps on dockered Alfresco?

cancel
Showing results for 
Search instead for 
Did you mean: 
joko71
Active Member II

How to deploy amps on dockered Alfresco?

This is a continuation from this prototyping effort.

I've prepared amp volumes for my dockered Alfresco and Share, and test amps for both to test amp deployment.

Yes, amp packages were copied in amps and amps_share folders, but not deployed AFAIK.

Have I missed some step?

15 Replies
angelborroy
Alfresco Employee

Re: How to deploy amps on dockered Alfresco?

Probably you missed this line in your Dockerfile extensions:

https://github.com/Alfresco/alfresco-docker-installer/blob/master/generators/app/templates/images/al...

Hyland Developer Evangelist
joko71
Active Member II

Re: How to deploy amps on dockered Alfresco?

Thanks, but can it be done via docker-compose.yml file? I've used only docker-compose so far, I haven't edited any Dockerfile, and I don't know how to do it if images are downloaded and handled by docker-compose.

angelborroy
Alfresco Employee

Re: How to deploy amps on dockered Alfresco?

It looks like default Docker Image deploys AMPS located in ${TOMCAT_DIR}/amps

https://github.com/Alfresco/acs-community-packaging/blob/master/docker-alfresco/Dockerfile#L22

So you can attach a Docker Volume to this path and that should work.

Hyland Developer Evangelist
joko71
Active Member II

Re: How to deploy amps on dockered Alfresco?

I configured volumes and AMPs are in amps and amps_share folders in containers, but not deployed.

I tried to do it outside, with script, but I got boggled in syntax quagmire:

#! /bin/sh

echo "Alfresco..."

#docker exec -it docker-alfresco_alfresco_1 'java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt-6.0.jar install /usr/local/tomcat/amps -directory -nobackup -force'
docker exec docker-alfresco_alfresco_1 bash -c "java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt-6.0.jar \"install /usr/local/tomcat/amps -directory -nobackup -force\""

echo "Share..."

#docker exec -it docker-alfresco_share_1 'java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt-6.0.jar install /usr/local/tomcat/amps_share -directory -nobackup -force'
docker exec docker-alfresco_share_1 bash -c "java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt-6.0.jar \"install /usr/local/tomcat/amps_share -directory -nobackup -force\""

Interesting that about deploying in Dockerfile, maybe deploys were tried but unsuccessful.

abhinavmishra14
Advanced

Re: How to deploy amps on dockered Alfresco?

@joko71  Have a look at this thread, it may be helpful: https://github.com/Alfresco/acs-community-deployment/issues/131

Steps to make use of docker-compose and dockerfile in combination to deploy custom amps/jar/configs etc: https://github.com/Alfresco/acs-community-deployment/issues/131#issuecomment-691300550

~Abhinav
(ACSCE, AWS SAA, Azure Admin)
SmallHeathTommy
Active Member

Re: How to deploy amps on dockered Alfresco?

I find it easiest to add the dependency in the platform-docker pom file, which will just push the dependencies into the target > extension folder.

Edit: Just realized your interest is not with SDK.  Here is how I am doing it:

export TOMCAT_DIR=/usr/local/tomcat
export JAVA_DIR=/usr/java/default/bin

docker cp ${DEPLOYMENT_LOC}/alfresco-outlook-repository-2.8.0.amp dams_alfresco_1:${TOMCAT_DIR}/amps

ocker cp ${DEPLOYMENT_LOC}/alfresco-outlook-share-2.8.0.amp dams_share_1:${TOMCAT_DIR}/amps_share/

docker exec -u 0 dams_share_1 ${JAVA_DIR}/java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt-6.0.jar install ${TOMCAT_DIR}/amps_share ${TOMCAT_DIR}/webapps/share -directory -nobackup -force
docker exec -u 0 dams_alfresco_1 ${JAVA_DIR}/java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt-6.0.jar install ${TOMCAT_DIR}/amps ${TOMCAT_DIR}/webapps/alfresco -directory -nobackup -force

joko71
Active Member II

Re: How to deploy amps on dockered Alfresco?

I've made some kind of progress, I managed to execute these two commands inside the containers without error:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt-6.0.jar install /usr/local/tomcat/amps/pdf-toolkit-repo-1.4.0.amp /usr/local/tomcat/webapps/alfresco -directory -nobackup -force

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt-6.0.jar install /usr/local/tomcat/amps_share/pdf-toolkit-share-1.4.0.amp /usr/local/tomcat/webapps/share -directory -nobackup -force

Updates from before are the specific amp in the command and the exploded WAR location.

But, no trace of deployed amp inside the folder structure.

I've noticed that the structure of these amps are obsolete maybe, not in accordance to the new structure.

Can you give me an example of already built amp which is in accordance with the Alfresco 7.0 structure? TIA

angelborroy
Alfresco Employee

Re: How to deploy amps on dockered Alfresco?

You can do that in this way.

Once the Docker Container is started, you can't modify the WAR (or deployed webapp) and reload the application.

You need to learn how to extend official Dockerfile in order to apply AMPS / JARS to Alfresco Web Applications.

Or you can use Alfresco Docker Installer project, that does this for you.

Hyland Developer Evangelist
EddieMay
Alfresco Employee

Re: How to deploy amps on dockered Alfresco?

Hi @joko71 

Unfortunately that reply from DavisHale1 (now banned) was spam - I've removed the comment & also edited out the hyperlink in your copied response.

Sorry about that Smiley Mad

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!