Adding / replacing instances | Community
Skip to main content
New Participant
August 21, 2016
Solved

Adding / replacing instances

  • August 21, 2016
  • 3 replies
  • 1996 views

Hello,

when adding or replacing an existing AEM author / publish instance, what would be the best way to update them with all project related code and content? Is there an automated way to do this (osgi config?) or is it only possible via manual replication or packaging of code / content? By "code" I mean both component related scripts and osgi bundles.

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 andrewj40704587

Hi Jake,

Like Ankur said, the easy way to add instances is to copy/paste the whole directory and adjust things as necessary. Keep in mind that adding instances this way would not keep things up to date when one instance updates something, unless you've got something to share the repository (Mongo, shared Datastore, etc). If you're cloning Publish instances it helps to create a new replication agent for the new instance before making the copy, so anything activated while you're setting things up will queue up beforehand. 

For migrating code and content to another fresh instance, I've found that content packages are a good way to accomplish this. The only caveat is that it doesn't include page versions. I'm currently looking into using the crx2oak tool to migrate content, as that should bring versions as well. You should include osgi configs in your code package or an /install folder on the local filesystem, rather than creating them manually through the osgi console. That way they're easier to manage and migrate. 

3 replies

kautuk_sahni
Employee
August 23, 2016

Thanks you Ankur and Andrew for Excellent answer. 

~kautuk

Kautuk Sahni
andrewj40704587Accepted solution
New Participant
August 22, 2016

Hi Jake,

Like Ankur said, the easy way to add instances is to copy/paste the whole directory and adjust things as necessary. Keep in mind that adding instances this way would not keep things up to date when one instance updates something, unless you've got something to share the repository (Mongo, shared Datastore, etc). If you're cloning Publish instances it helps to create a new replication agent for the new instance before making the copy, so anything activated while you're setting things up will queue up beforehand. 

For migrating code and content to another fresh instance, I've found that content packages are a good way to accomplish this. The only caveat is that it doesn't include page versions. I'm currently looking into using the crx2oak tool to migrate content, as that should bring versions as well. You should include osgi configs in your code package or an /install folder on the local filesystem, rather than creating them manually through the osgi console. That way they're easier to manage and migrate. 

AnkurAhlawat-1
New Participant
August 22, 2016

Hi Jake,

One way is to copy and paste author/publish repository on new server and then change the required configuration like sling id, replication agent url.

Another approach:- Is to start a vanilla instance of aem, create package of content from existing instance and install on new server. For code migration(scrips/osgi budles) prefer jenking or any other tool to trigger  the build.

Community Member:- Please correct me if i am wrong or missed something.

regards,

Ankur Ahlawat

AEM CQ5 Tutorials