Deploy amp or jar into dockerized alfresco 6.1

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

Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Hi,

 

someones know if there is a guide to deploy and amp (or jar) module into a dockerized alfresco 6.1.

 

Thanks in advance.

 

1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Amp files needs to be installed unlike jar files. When you copy jar files to WEB-INF/lib (as shown here) and restart, it loads the module on restart without any additional action. But when you have amps, you need to apply them using alfresco-mmt after ftping them to their respective folders such as /usr/local/tomcat/amps and /usr/local/tomcat/amps_share. 

Here are the steps you need to do:

For Alfresco layer:

1- Copy repo amp to "/usr/local/tomcat/amps"

docker cp C:\alf-addon\js-console\javascript-console-repo\target\javascript-console-repo-0.7-SNAPSHOT.amp 2bf46dd1ae7dd05dd6e28a790d867e581376fa64f8482a124f25139de21ec96c:/usr/local/tomcat/amps

2- Apply amp:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps /usr/local/tomcat/webapps/alfresco -directory -nobackup -force

3- Restart container:

docker container restart 2bf46dd1ae7

here, 2bf46dd1ae7 is the container id

4-You can tail the log to see if module is installed or not. It will show something like this :

jsconsole amp loading.PNG

For Share layer:

1- Copy repo amp to "/usr/local/tomcat/amps_share"

docker cp C:\alf-addon\js-console\javascript-console-share\target\javascript-console-share-0.7-SNAPSHOT.amp 653e41842aed205d3f18ef5b2be6816ab550eddea2161fb03f6168658c964545:/usr/local/tomcat/amps_share

2- Apply amp:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force

3- Restart container:

docker container restart 653e41842ae

here, 653e41842ae is the container id

4-You can tail the log to see if module is installed or not. It will show something like this :

jsconsole share amp loading.PNG

 

View solution in original post

10 Replies
Highlighted
Moderator
Moderator

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Are you using SDK4 for generating the jar/amp?  or trying to deploy an external jar/amp in an already running container?

Go through this post, it may help you: https://hub.alfresco.com/t5/alfresco-content-services-forum/alfresco-6-deploy-jar/m-p/154184

 

Highlighted
Active Member II

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

I want to install js-console add-on amp in a dockerized alfresco 6.1, i have no sdk project yet.

Highlighted
Moderator
Moderator
Highlighted
Active Member II

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

javascript-console module has more files into the amp, like .properties, .messages etc. If i copy just jar file, i doesnt work. is there any way to install an AMP?

Highlighted
Moderator
Moderator

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

You can install amp, look at the link i mentioned above. There is a discussion as to how to install amps.

Highlighted
Active Member II

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Thanks in advance abhinavmishra14 for the replys,

can you confirm if this resume to apply an AMP over a dockerized Alfresco is right:
1. ftp the AMP over platform container
docker cp C:\alf-addon\js-console\javascript-console-repo\target\javascript-console-repo-0.7-SNAPSHOT.amp 2bf46dd1ae7dd05dd6e28a790d867e581376fa64f8482a124f25139de21ec96c:/usr/local/tomcat/amps
2. ftp the AMP over share container
docker cp C:\alf-addon\js-console\javascript-console-share\target\javascript-console-share-0.7-SNAPSHOT.amp 653e41842aed205d3f18ef5b2be6816ab550eddea2161fb03f6168658c964545:/usr/local/tomcat/amps_share
3. Check the amps exist in the container with the commands bash:

docker exec -it alfresco_v61_alfresco_1 /bin/bash

docker exec -it alfresco_v61_share_1 /bin/bash

4. Restart containers
docker restart 2bf46dd1ae7dd05dd6e28a790d867e581376fa64f8482a124f25139de21ec96c
docker restart 653e41842aed205d3f18ef5b2be6816ab550eddea2161fb03f6168658c964545

...but I cant see the module deployed yet in my alfresco Smiley Sad

Highlighted

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Try this project:

https://github.com/Alfresco/alfresco-docker-installer

This will generate a Docker Compose template ready to accept JAR or AMP packages to be deployed when starting.

Software Engineer in Alfresco Search Team.
Highlighted
Moderator
Moderator

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Amp files needs to be installed unlike jar files. When you copy jar files to WEB-INF/lib (as shown here) and restart, it loads the module on restart without any additional action. But when you have amps, you need to apply them using alfresco-mmt after ftping them to their respective folders such as /usr/local/tomcat/amps and /usr/local/tomcat/amps_share. 

Here are the steps you need to do:

For Alfresco layer:

1- Copy repo amp to "/usr/local/tomcat/amps"

docker cp C:\alf-addon\js-console\javascript-console-repo\target\javascript-console-repo-0.7-SNAPSHOT.amp 2bf46dd1ae7dd05dd6e28a790d867e581376fa64f8482a124f25139de21ec96c:/usr/local/tomcat/amps

2- Apply amp:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps /usr/local/tomcat/webapps/alfresco -directory -nobackup -force

3- Restart container:

docker container restart 2bf46dd1ae7

here, 2bf46dd1ae7 is the container id

4-You can tail the log to see if module is installed or not. It will show something like this :

jsconsole amp loading.PNG

For Share layer:

1- Copy repo amp to "/usr/local/tomcat/amps_share"

docker cp C:\alf-addon\js-console\javascript-console-share\target\javascript-console-share-0.7-SNAPSHOT.amp 653e41842aed205d3f18ef5b2be6816ab550eddea2161fb03f6168658c964545:/usr/local/tomcat/amps_share

2- Apply amp:

java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install /usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force

3- Restart container:

docker container restart 653e41842ae

here, 653e41842ae is the container id

4-You can tail the log to see if module is installed or not. It will show something like this :

jsconsole share amp loading.PNG

 

View solution in original post

Highlighted
Active Member II

Re: Deploy amp or jar into dockerized alfresco 6.1

Jump to solution

Thancks in advance