...
The way recommended by Adobe is to put the AEM application code directly in the GIT repository provided by the Cloud Manager. In this case no separate “configuration-management” GIT repository is used, so we need to define an additional CONGA Environments Environment for the AEM cloud dev and /stage/prod environments in the Cloud . Create a CONGA environment directly in the application GIT repository at config-definition/src/main/dev-environments
:
Define a new “dev” “cloud” environment:
Copy the https://github.com/wcm-io/wcm-io-maven-archetype-aem/blob/develop/src/main/resources/archetype-resources/config-definition/src/main/dev-environments/devcloud.yaml template from the archetype and remove the velocity statements (#set, #if..#end)
Replace the variables
${projectName}
and${packageGroupNames}
Define a new “prod” environment:
Copy the https://github.com/wcm-io/wcm-io-maven-archetype-aem/blob/develop/src/main/resources/archetype-resources/config-definition/src/main/dev-environments/prod.yaml template from the archetype and remove the velocity statements (#set, #if..#end)
Replace the variables
${projectName}
and${packageGroupNames}
Validate the root/redirect paths in the dispatcher/tenant configuration
Validate the root/redirect paths in the dispatcher/tenant configuration
Consider to use the
cloudManagerConditional
configuration option instead of the simplifiedserverName
/serverAlias
definition to define the host names for each cloud environment
Rename the predefined “development” environment to “local” to avoid confusion with the new cloud “dev” environment. For this you have to:
Rename the file
development.yaml
tolocal.yaml
Change the references to the “development” CONGA_ENVIRONMENT in the
configuration/definition/packages-upload.sh
andbuild-deploy.sh
scripts to “local”
Mark this “local” environment to be ignored by the Cloud Manager (it’s only used for local AEM deployment) by adding to the
config:
section:Code Block # Not used for AEM cloud cloudManager.target: - none
The rationale behind this:
We define two new CONGA environments “dev” (used by the dev instances in the AEM Cloud) and “prod” (used by the stage and prod instances in the AEM Cloud)Each environment defines the roles and selects the packages to be deployed by configuring the roles a single “cloud” CONGA environment instead of three for dev/stage/prod cloud environments because the Adobe Cloud Manager has currently limitations and does not support deploying packages on some and environments and not on others (e.g. with sample content not on dev, without sample content on prod)
CONGA will build a separate “all” package for author and publish instances for each environment containing the selected packages with dependencies automatically defined following the order of the files in the role definitions
We have only one dispatcher configuration defined in the “prod” environment, but it is used for all environments (also for dev) because Adobe Cloud Manager currently only supports one single dispatcher configuration for all environments.
...
prod). Therefore we currently have to live with a single “cloud” environment. It’s still possible to define different host names for each environment, and OSGi configuration can also be defined individually using the environment names as run modes.
CONGA will build a separate “all” package for author and publish instances containing the selected packages with dependencies automatically defined following the order of the files in the role definitions
An additional ZIP file is generated containing the dispatcher configuration which is used for all cloud environments as well.
Step 13: Build “all” and “dispatcher config” packages for Cloud Manager
...
Code Block | ||
---|---|---|
| ||
<plugin> <groupId>io.wcm.devops.conga.plugins</groupId> <artifactId>conga-aem-maven-plugin</artifactId> <executions> <!-- Generate "all" packages including all packages from CONGA configuration for deployment via Adobe Cloud Manager --> <execution> <id>cloudmanager-all-package</id> <phase>generate-resources</phase> <goals> <goal>cloudmanager-all-package</goal> </goals> <configuration> <group>${packageGroupName}<<group>epsiloncloudProject</group> <!-- Use separate dependency chains for immutable and mutable packagesWorkaround because Cloud Manager does not properly support dependencies for mutable content packages yet --> <autoDependenciesSeparateMutable>true<<autoDependenciesMode>IMMUTABLE_ONLY</autoDependenciesSeparateMutable>autoDependenciesMode> </configuration> </execution> <!-- Generate Dispatcher configuration ZIP file for deployment via Adobe Cloud Manager --> <execution> <id>cloudmanager-dispatcher-config</id> <phase>generate-resources</phase> <goals> <goal>cloudmanager-dispatcher-config</goal> </goals> </execution> </executions> </plugin> |
...