System user and content deployment in AEM as a Cloud Service | Community
Skip to main content
Prince_Shivhare
Community Advisor
Community Advisor
April 28, 2021
Solved

System user and content deployment in AEM as a Cloud Service

  • April 28, 2021
  • 3 replies
  • 2120 views

Hello Everyone,

 

I am currently working on an AEM as a cloud service.

 

Where we have adobe cloud git repo. and limited access to higher environments.

 

now we have a requirement to create system users in AEM and also content deployment.

 

But we don't have access to crx/explorer and  CRX package manager.

 

Can anyone please help me to know about this in detail?

I read this article -  https://sling.apache.org/documentation/bundles/repository-initialization.html
but not able to understand anything.

 

Thank you

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 Asutosh_Jena_

Hi @prince_shivhare 

 

To create the system user you can leverage the Repo Init service i.e. create an OSGi config under the deafult run mode with the below name:

org.apache.sling.jcr.repoinit.RepositoryInitializer-projectname.config and add the following content to it. You can customize as needed and once the code is deployed the system user will be created and required permission will be set.

 

scripts=[
"
create service user demo-user
set ACL on /content/project
allow jcr:read for demo-user
end
"
]

 

Now coming to Content Deployment which can be done in both Cloud Manager as well as Package Manager. Please see the link below for more details:

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/deploying/overview.html?lang=en#deploying-content-packages-via-cloud-manager-and-package-manager

 

Hope this helps!

Thanks

3 replies

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
April 28, 2021

Hi @prince_shivhare 

 

To create the system user you can leverage the Repo Init service i.e. create an OSGi config under the deafult run mode with the below name:

org.apache.sling.jcr.repoinit.RepositoryInitializer-projectname.config and add the following content to it. You can customize as needed and once the code is deployed the system user will be created and required permission will be set.

 

scripts=[
"
create service user demo-user
set ACL on /content/project
allow jcr:read for demo-user
end
"
]

 

Now coming to Content Deployment which can be done in both Cloud Manager as well as Package Manager. Please see the link below for more details:

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/deploying/overview.html?lang=en#deploying-content-packages-via-cloud-manager-and-package-manager

 

Hope this helps!

Thanks

Prince_Shivhare
Community Advisor
Community Advisor
April 28, 2021
But I need a write access as well because we will save the file /etc/customnode node as well.
Adobe Employee
April 28, 2021

You need to create a cfg.json OSGI config for repo init to create system users and assign permissions. See docs below:

 

 

[1] https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/aem-project-content-package-structure.html#repo-init

 

Shashi_Mulugu
Community Advisor
Community Advisor
April 28, 2021