Package installation | Community
Skip to main content
New Participant
March 14, 2023
Solved

Package installation

  • March 14, 2023
  • 3 replies
  • 906 views

Hi Team,

 

Is there any way to do following:

 

1) Create Content Package from PROD env.

2) Run the any cron job daily midnight which install same package in some other env lets say DEV or STAGE.

 

NOTE: All instances are in Google cloud.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SivakumarKanoori

@arvind-1 :

You can write a bash script by using curl command to create a package . once created you can keep that package in shared folder or server which can be accessible to your lower environments.

 

Then in your stage or dev , you can write a script again to fetch the package and using curl command again you can install that in your environment.

#create package

curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/testpackage3?cmd=create \
-d packageName=testpackage3 \
-d groupName=my_packages

 

# add filters
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/update.jsp \
-F path=/etc/packages/my_packages/testpackage3.zip -F packageName=testpackage3 \
-F groupName=my_packages \
-F filter="[{\"root\" : \"/etc/tags\", \"rules\": [{\"modifier\" : \"include\", \"pattern\" : \"/.*\"}]}]" \
-F '_charset_=UTF-8'

 

# build package
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/testpackage3.zip?cmd=build

 

Thanks

Siva

3 replies

SivakumarKanoori
SivakumarKanooriAccepted solution
New Participant
March 14, 2023

@arvind-1 :

You can write a bash script by using curl command to create a package . once created you can keep that package in shared folder or server which can be accessible to your lower environments.

 

Then in your stage or dev , you can write a script again to fetch the package and using curl command again you can install that in your environment.

#create package

curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/testpackage3?cmd=create \
-d packageName=testpackage3 \
-d groupName=my_packages

 

# add filters
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/update.jsp \
-F path=/etc/packages/my_packages/testpackage3.zip -F packageName=testpackage3 \
-F groupName=my_packages \
-F filter="[{\"root\" : \"/etc/tags\", \"rules\": [{\"modifier\" : \"include\", \"pattern\" : \"/.*\"}]}]" \
-F '_charset_=UTF-8'

 

# build package
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service/.json/etc/packages/my_packages/testpackage3.zip?cmd=build

 

Thanks

Siva

Thanks,Siva
Jagadeesh_Prakash
New Participant
March 14, 2023

@arvind-1 If you are looking for a solution in AEMaaCS this is little complicated and not suggestable.

 

But if you are using a solution on-prem then it is possible with curl commands solution in the link provided

https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/curl.html?lang=en

 

But also it is never recommanded to have a daily sync job on the PROD server. 

Umesh_Thakur
New Participant
March 14, 2023

I think there can be a way to achieve it.

thru shell script with the help of curl commands you can create a package build it and replicate it.

Maybe you need to setup one replication agent for this, if there is not any already available.

CURL list can be found one below link:

https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/curl.html?lang=en

Hope this helps.

Umesh Thakur