Skip to content
Send messages to AEM Stack Manager via SNS Topic
Shell Python Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
conf/ansible Restructure ansible resources to live on conf/ansible and provisioner… Dec 10, 2018
docs
examples
provisioners/ansible Fixed issue with missing stage dir for sns message template generation ( Jul 31, 2019
scripts
templates/sns
test/integration
.gitignore Added new ansible module to scan/query a DynamoDB and relocating folders Feb 4, 2018
.rtk.json Add release make target for release automation using RTK. May 22, 2019
.travis.yml
.yamllint Add Ansible playbook YAML validation, leaving the truthy warnings for… Dec 11, 2018
CHANGELOG.md
LICENSE
Makefile
README.md
requirements.txt Upgrade Ansible to 2.8.2 . Jul 12, 2019

README.md

Build Status Known Vulnerabilities

AEM Stack Manager Messenger

A set of Ansible playbooks for triggering events on AEM Stack Manager environment which is built using AEM AWS Stack Builder.

Learn more about AEM Stack Manager Messenger:

AEM Stack Manager Messenger is part of AEM OpenCloud platform.

Installation

  • Either clone AEM Stack Manager Messenger git clone https://github.com/shinesolutions/aem-stack-manager-messenger.git or download one of the released versions

  • Install the following required tools:

    Alternatively, you can use AEM Platform BuildEnv Docker container to run AEM Stack Manager Messenger build targets.

  • Resolve the Python packages dependencies by running make deps

Usage

Deploy a set of AEM Packages and Dispatcher artifacts into an AEM environment using a Deployment Descriptor file:

make deploy-artifacts-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir> \
  descriptor_file=deploy-artifacts-descriptor.json

make deploy-artifacts-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir> \
  descriptor_file=deploy-artifacts-descriptor.json

Deploy a single AEM Package into an AEM instance:

make deploy-artifact \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary \
  aem_id=author \
  source=s3://s3bucket/path/aem-helloworld-content-0.0.1-SNAPSHOT.zip \
  group=shinesolutions \
  name=aem-helloworld-content \
  version=0.0.1 \
  replicate=true \
  activate=false \
  force=true

Disable SAML on an AEM instance:

make disable-saml
stack_prefix=<stack_manager_stack_prefix>
target_aem_stack_prefix=<aem_stack_prefix>
config_path=<path/to/config/dir>
component=author-primary
aem_id=author path='/'

Enable SAML with filepath to SAML certificate on an AEM instance:

make enable-saml
stack_prefix=<stack_manager_stack_prefix>
target_aem_stack_prefix=<aem_stack_prefix>
config_path=<path/to/config/dir>
component=author-primary
aem_id=author path='/'
file="s3://aem-opencloud/adobeaemcloud/certs/saml_cert.pem"
assertion_consumer_service_url="https://author.aemopencloud.net:443/saml_login"
service_provider_entity_id=AEMSSO
idp_url="https://federation.server.com"
create_user=true
default_groups=content-authors
group_membership_attribute=groupMembership
handle_logout=true
idp_http_redirect=false
logout_url="https://accounts.google.com/logout"
name_id_format='urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
signature_method="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
synchronize_attributes="givenName=profile/givenName,familyName=profile/familyName,mail=profile/email"
use_encryption=false
user_id_attribute=NameID

Enable SAML with IDP Certalias of the SAML certificate as in the AEM Truststore on an AEM instance:

make enable-saml
stack_prefix=<stack_manager_stack_prefix>
target_aem_stack_prefix=<aem_stack_prefix>
config_path=<path/to/config/dir>
component=author-primary
aem_id=author path='/'
idp_cert_alias='certalias_1234'
assertion_consumer_service_url="https://author.aemopencloud.net:443/saml_login"
service_provider_entity_id=AEMSSO
idp_url="https://federation.server.com"
create_user=true
default_groups=content-authors
group_membership_attribute=groupMembership
handle_logout=true
idp_http_redirect=false
logout_url="https://accounts.google.com/logout"
name_id_format='urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
signature_method="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
synchronize_attributes="givenName=profile/givenName,familyName=profile/familyName,mail=profile/email"
use_encryption=false
user_id_attribute=NameID

Enable SAML with defined SERIAL number of the SAML certificate on an AEM instance:

make enable-saml
stack_prefix=<stack_manager_stack_prefix>
target_aem_stack_prefix=<aem_stack_prefix>
config_path=<path/to/config/dir>
component=author-primary
aem_id=author path='/'
serial='1234567890'
assertion_consumer_service_url="https://author.aemopencloud.net:443/saml_login"
service_provider_entity_id=AEMSSO
idp_url="https://federation.server.com"
create_user=true
default_groups=content-authors
group_membership_attribute=groupMembership
handle_logout=true
idp_http_redirect=false
logout_url="https://accounts.google.com/logout"
name_id_format='urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress'
signature_method="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
synchronize_attributes="givenName=profile/givenName,familyName=profile/familyName,mail=profile/email"
use_encryption=false
user_id_attribute=NameID

Enable CRXDE on an AEM instance:

make enable-crxde \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary

Disable CRXDE on an AEM instance:

make disable-crxde \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary

Export a set of backup packages from an AEM instance using a Package Backup Descriptor file:

make export-packages-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir> \
  descriptor_file=<package_backup_descriptor_file>

make export-packages-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir> \
  descriptor_file=<package_backup_descriptor_file>

Export a single AEM package from an AEM instance:

make export-package \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary \
  package_group=somegroup \
  package_name=somepackage \
  package_filter='[{"root":"/apps/geometrixx","rules":[]},{"root":"/apps/geometrixx-common","rules":[]}]'

Flush dispatcher cache:

make flush-dispatcher-cache \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=publish-dispatcher

Import a single AEM package into an AEM instance:

make import-package \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary \
  source_stack_prefix=stack2 \
  package_group=somegroup \
  package_name=somepackage \
  package_datestamp=201702

List AEM packages available on an AEM instance:

make list-packages \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary

Promote an AEM Author Standby to become AEM Author Primary:

make promote-author \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Take live snapshot of the repositories within an AEM component:

make live-snapshot \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-primary

Take offline snapshots of a single AEM Author and a single AEM Publish repositories within an AEM environment (See offline-snapshot-full-set):

make offline-snapshot \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Take offline snapshots of a single AEM Author and a single AEM Publish repositories within an AEM environment and run offline compaction on those AEM instances (See offline-compaction-snapshot-full-set):

make offline-compaction-snapshot \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Take offline snapshots of a single AEM Author and a single AEM Publish repositories within an AEM environment (currently only supports Full-Set):

make offline-snapshot-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Take offline snapshots of a single AEM Author and a single AEM Publish repositories within an AEM environment and run offline compaction on those AEM instances (currently only supports Full-Set):

make offline-compaction-snapshot-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Take offline snapshots of a single AEM Author and a single AEM Publish repositories within an AEM Consolidated instance:

make offline-snapshot-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Take offline snapshots of a single AEM Author and a single AEM Publish repositories within an AEM Consolidated instance and run offline compaction on the AEM instance:

make offline-compaction-snapshot-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_stack_prefix> \
  config_path=<path/to/config/dir>

Check readiness of an AEM environment:

make check-readiness-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir>

make check-readiness-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir>

Schedule/unschedule jobs on an AEM environment:

make schedule-offline-snapshot-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir>

make unschedule-offline-snapshot-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir>

make schedule-offline-compaction-snapshot-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir>

make unschedule-offline-compaction-snapshot-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix> \
  config_path=<path/to/config/dir>

make schedule-offline-snapshot-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir>

make unschedule-offline-snapshot-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir>

make schedule-offline-compaction-snapshot-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir>

make unschedule-offline-compaction-snapshot-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir>

Upgrade AEM environment to a new version on AEM environment: AEM Upgrade preparation step 1 download AEM e.g. AEM 6.4 jar file and unpack it

make upgrade-unpack-jar \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-publish-dispatcher \
  aem_artifacts_base="s3://aem-opencloud/adobeaemcloud" \
  aem_upgrade_version="6.4" \
  enable_backup=false

AEM Upgrade preparation step 2 run repository migration

make upgrade-unpack-jar \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-publish-dispatcher \
  source_crx2oak="https://repo.adobe.com/nexus/content/groups/public/com/adobe/granite/crx2oak/1.8.6/crx2oak-1.8.6-all-in-one.jar"

Trigger the AEM Upgrade to specified version:

make upgrade-unpack-jar \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix> \
  config_path=<path/to/config/dir> \
  component=author-publish-dispatcher \
   aem_upgrade_version="6.4"

Testing

You can run integration test for running all AEM Stack Manager events for a given AEM architecture, using the latest AEM Hello World Config from GitHub.

Run integration tests for AEM Full-Set architecture:

make test-full-set \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix>

Run integration tests for AEM Consolidated architecture:

make test-consolidated \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix>

Alternatively, you can also run the integration tests using a local AEM Hello World Config.

make test-full-set-local \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_full_set_stack_prefix>

make test-consolidated-local \
  stack_prefix=<stack_manager_stack_prefix> \
  target_aem_stack_prefix=<aem_consolidated_stack_prefix>
You can’t perform that action at this time.