Sample Migration Config Files for AEMaaCS Migrations
Here, will provide sample working configuration files (aem-migration-config.yaml or config.yaml) those can be used with different types of migration tools like dispatcher converter, repository modernizer, index converter and workflow migrator.
Replace C:/Projects/…/test with your actual project directory.
More details on the meaning of all the configurations and migration tools can be found at https://github.com/adobe/aio-cli-plugin-aem-cloud-service-migration/blob/master/config/README.md
Dispatcher Converter :
Steps : https://github.com/adobe/aem-cloud-service-source-migration/tree/master/packages/dispatcher-converter#how-to-execute (uses config.yaml file)
Command : aio aem-migration:repository-modernizer (uses aem-migration-config.yaml file)
dispatcherConverter:
# Path to the src folder of the dispatcher sdk. You must include the src folder itself in the path.
sdkSrc: "C:/path/to/dispatcher-sdk-2.0.21/src"
# Add information about on-premise dispatcher configuration here
onPremise:
# Path to the dispatcher.any file
dispatcherAnySrc: "C:/path/to/dispatcher.any"
# Path to the httpd.conf file (the main apache config file)
# If `vhostsToConvert` is not specified you can use this property to find vhosts by parsing the main apache file
httpdSrc: "C:/path/to/httpd.conf"
# Array of paths to vhosts files and/or vhost folders containing vhost files you wish to convert to cloud service configurations
vhostsToConvert:
- "C:/path/to/mywebsite.vhost"
- "C:/path/to/myotherwebsite.vhost"
- "C:/path/to/vhostfolder"
# Array of mapped objects that replace existing variables with new variables.
# The original variable is first and the variable to replace is second
variablesToReplace:
TIER: "ENVIRONMENT_TYPE"
# This can be a file that you want to append to every vhost file in case you need logic added to all configurations.
# This is useful to replace logic that was once stored in your main apache config file.
appendToVhosts:
# Array of paths to existing dispatcher configuration root folders to scan for the included files.
# These paths help to map includes in the configurations to their current location in the provided folder structure.
# In case the files are distributed across all the folders use command `for i in $(find `pwd` -type d); do echo "- \"$i/\""; done` for unix based system
# and `dir /s /b /o:n /ad` for windows to generate folder/sub-folder and paste the output here.
pathToPrepend:
# Only port 80 is supported in AEM as a Cloud Service - if you were using a non standard port here and need it mapped
# in AEM, provide it here - all other vhosts with non default ports will be removed.
portsToMap:
- 8080
# Add information about Adobe Managed Services dispatcher configuration here
ams:
# Path to dispatcher configuration folder
# (expected immediate subfolders - conf, conf.d, conf.dispatcher.d and conf.modules.d)
cfg: "C:/Projects/.../test/dispatcher/folder"
Repository Modernizer :
Steps : https://github.com/adobe/aem-cloud-service-source-migration/tree/master/packages/repository-modernizer#how-to-execute (uses config.yaml file)
Or command : aio aem-migration:dispatcher-converter (uses aem-migration-config.yaml file)
repositoryModernizer:
# groupId to be used for newly created packages
groupId: com-test-aem
# information about parent pom
parentPom:
# absolute path to the parent pom file
path: C:/Projects/.../test/pom.xml
# the artifactId to be set for the parent pom
artifactId: TEST-aem-parent
# the application title to be set for the parent pom
appTitle: TEST-AEM Parent
# version to be to be set for the parent pom
version: 1.0.0-SNAPSHOT
# information required for all and analyse packages
all:
# prefix that is to be used to set the artifactId for all and analyse packages
artifactId: test-aem
# application title
appTitle: test-AEM Code Repository
# version to be set for all pom
version: 1.0.0-SNAPSHOT
# information about projects (expects an array of project information)
# NOTE : For multiple projects create separate copies of the info section for each project
projects:
- # absolute path to the XYZ project folder
projectPath: C:/Projects/.../test
# Array of relative path(s) (w.r.t. the project folder) to the existing content package(s) that needs to be restructured.
# NOTE : only content packages are expected here, NOT bundle/jar artifacts
existingContentPackageFolder:
- /ui.apps
- /ui.content
- /ui.permissions
# relative path (w.r.t. the existing content package folder) to the filter.xml file
# (If not specified, default path `/src/main/content/META-INF/vault/filter.xml` will be used.)
relativePathToExistingFilterXml:
# relative path (w.r.t. the existing content package folder) to the jcr_root directory
# (If not specified, default path `/src/main/content/jcr_root` will be used)
relativePathToExistingJcrRoot:
# prefix that is to be used to set the artifactId for newly created ui.apps and ui.content packages
artifactId: test-content-aem
# application title
appTitle: TEST
# application ID (will be used for config and package folder names)
appId: test-app
# project specific version to be used for content packages
version: 1.0.0-SNAPSHOT
# Array of relative path(s) (w.r.t. the project folder) to the existing code bundles (will be embedded in the all package).
coreBundles:
- /core
- /api
# OSGi config folders that need to be renamed.
# The existing/source OSGi config folder PATH (JCR path starting from '/apps') is expected as key
# and the replacement OSGi folder NAME is expected as value. See examples below :
# /apps/xyz/config.prod : config.publish.prod
# /apps/system/config.author.dev1 : config.author.dev
# /apps/system/config.author.dev2 : config.author.dev
# NOTE :
# 1. All OSGi config folders under the same path and with same replacement name will be MERGED
# (as configured in above example).
# 2. If there exists OSGi config files with the same pid/filename in more than one config folders
# which are to be merged, they will not be overwritten. A warning regrading the same will be
# generated in the summary report and result log file. User would need to manually evaluate
# which config to persist
osgiFoldersToRename:
/apps/xyz/config.dev1: config.dev
/apps/xyz/config.dev2: config.author.dev
/apps/system/config.author.localdev: config.author.dev
/apps/system/config.author.dev1: config.author.dev
/apps/system/config.prod: config.prod
/apps/system/config.publish: config.publish.prod
There can be subprojects, those can be configured in the same way. Under subProjects: appended to above file.
Example working file can be found at https://github.com/adobe/aem-cloud-service-source-migration/tree/master/packages/repository-modernizer
Index Converter :
Steps : https://github.com/adobe/aem-cloud-service-source-migration/tree/master/packages/index-converter#executing-the-index-conveter-tool (uses config.yaml)
Command : aio aem-migration:index-converter (uses aem-migration-config.yaml file)
indexConverter:
# Path to the jcr_root directory of the package containing the Ensure Index Definitions
# (please ignore if there are no Ensure Index Definitions)
# eg. /Users/xyz/sampleCode/content/src/main/content/jcr_root
ensureIndexDefinitionContentPackageJcrRootPath:
# Path to the jcr_root directory of the package containing the Ensure Oak Index OSGI Configuration
# (please ignore if there are no Ensure Index Definitions)
# eg. /Users/xyz/sampleCode/CONFIG/src/main/content/jcr_root
ensureIndexDefinitionConfigPackageJcrRootPath:
# Version of AEM customer is on, used to determine the baseline index definitions
aemVersion: 65
# Path to the customer OAK Index Definition directory
# (please ignore if there are no Oak Index Definitions)
# eg /Users/xyz/sampleCode/ui.apps/src/main/content/jcr_root/_oak_index
customOakIndexDirectoryPath: "C:/Projects/.../test/ui.content/src/main/content/jcr_root/_oak_index"
# Path to the existing package `filter.xml` file
# eg /Users/xyz/sampleCode/ui.apps/src/main/content/META-INF/vault/filter.xml
filterXMLPath: "C:/Projects/.../test/ui.content/src/main/content/META-INF/vault/filter.xml"
This may produce some errors, but the new index gets created at — /target/index, just validate the index. Mostly it is in correct format.
Workflow Migrator :
Command : aio aem-migration:workflow-migrator (uses aem-migration-config.yaml file)
workflowMigrator:
# information about projects (expects an array of project information)
projects:
- # absolute path to the project folder (the path to ur project dir)
projectPath: "C:/Projects/.../test"