├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ └── build.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── dist └── install.first │ ├── aws-s3 │ ├── org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config.sample │ ├── org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config.sample │ └── org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config.sample │ ├── conf │ └── sling.properties │ ├── logs │ └── org.apache.sling.commons.log.LogManager.config │ ├── org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config │ ├── org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config │ ├── org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.config │ └── org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config ├── docker-compose.yml ├── requirements.txt ├── scripts ├── download.sh ├── force-recompilation.sh ├── gdrive.sh ├── githublatest.awk ├── githublatest.py ├── run-tini.sh ├── run.sh └── start.sh └── test ├── playbook.yml └── run_tests.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | #github: [maxbarrass] 4 | patreon: maxbarrass 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 Bug Report 3 | about: It doesn't work for me. 🤔 4 | 5 | --- 6 | 11 | 12 | ## Bug Report 13 | 14 | **Current Behavior** 15 | A clear and concise description of the behavior, including steps that are repeatable, and your setup; if applicable, proxy component pattern and component version. 16 | 17 | **Expected behavior/code** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Environment** 21 | - AEM version and patch level (e.g. AEM 6.3 SP1 CFP2) 22 | - Core Components version (e.g. 2.0.4) 23 | - JRE version (e.g. `Java(TM) SE Runtime Environment (build 1.8.0_152-b16)`) 24 | 25 | **Possible Solution** 26 | 27 | 28 | **Additional context / Screenshots** 29 | Add any other context about the problem here. If applicable, add screenshots to help explain. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🚀 Feature Request 3 | about: I have a suggestion (and I could even submit a PR 🤘🏼)! 4 | 5 | --- 6 | 7 | ## Feature Request 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I have an issue when [...] 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. Add any considered drawbacks. 14 | 15 | **Are there alternatives?** 16 | A clear and concise description of any alternative solutions or features you've considered. 17 | 18 | **Documentation** 19 | If you can, explain how users will be able to use this and possibly write out a version of the docs. 20 | Maybe a screenshot or design? -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | | Q | A 10 | | ------------------------ | --- 11 | | Fixed Issues? | `Fixes #1, Fixes #2` 12 | | Patch: Bug Fix? | 13 | | Minor: New Feature? | 14 | | Major: Breaking Change? | 15 | | Tests Added + Pass? | Yes 16 | | Documentation Provided | Yes (code comments and or markdown) 17 | | Any Dependency Changes? | 18 | | License | Apache License, Version 2.0 19 | 20 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: [push, repository_dispatch] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | env: 10 | DOCKER_REGISTRY: docker.io 11 | DOCKER_REGISTRY_INDEX: index.docker.io/aemdesign 12 | ORGANISATION_NAME: aemdesign 13 | DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} 14 | DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} 15 | GOOGLE_DRIVEID: ${{ secrets.GOOGLE_DRIVEID }} 16 | GOOGLE_DRIVEID_AEM63: ${{ secrets.GOOGLE_DRIVEID_AEM63 }} 17 | GOOGLE_DRIVEID_AEM64: ${{ secrets.GOOGLE_DRIVEID_AEM64 }} 18 | CREDS_ADOBE: ${{ secrets.CREDS_ADOBE }} 19 | PACKAGE_PATH: "./packages" 20 | JAR_PATH: "./jar" 21 | PYTHON_VERSION: 3.6 22 | 23 | 24 | steps: 25 | - uses: actions/checkout@v1 26 | - name: set up python ${{ env.PYTHON_VERSION }} 27 | uses: actions/setup-python@v1 28 | with: 29 | python-version: ${{ env.PYTHON_VERSION }} 30 | - name: install dependencies 31 | run: | 32 | python -m pip install --upgrade pip 33 | pip install -r requirements.txt 34 | - name: set envirnment variables 35 | id: config 36 | run: | 37 | echo GET PACKAGES 38 | export PACKAGE_PATH=$(pwd)/packages 39 | echo ::set-env name=PACKAGE_PATH::${PACKAGE_PATH} 40 | source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_config.sh) 41 | echo $PACKAGE_PATH 42 | echo $JAR_PATH 43 | if [[ ! -d $PACKAGE_PATH ]]; then mkdir $PACKAGE_PATH; fi 44 | if [[ ! -d $JAR_PATH ]]; then mkdir $JAR_PATH; fi 45 | echo PACKAGES CONTENTS $PACKAGE_PATH 46 | ls -latr $PACKAGE_PATH 47 | echo DOWNLOAD JAR INTO ${JAR_PATH} 48 | ./scripts/gdrive.sh "download" "$GOOGLE_DRIVEID" "$JAR_PATH/aem-quickstart.jar" 49 | echo DOWNLOAD PACKAGES INTO ${PACKAGE_PATH} 50 | # ============================================ 51 | # PACKAGE INSTALL 52 | # ============================================ 53 | export PACKAGE_CKECK_COUNT=1 54 | # -------------------------------------------- 55 | ./scripts/download.sh "$PACKAGE_PATH/01-" "$CREDS_ADOBE" "-" "https://www.adobeaemcloud.com/content/companies/public/adobe/packages/cq650/servicepack/AEM-6.5.3.0/jcr%3acontent/package/file.res/AEM-6.5.3.0-6.5.3.zip" 56 | #./scripts/download.sh "$PACKAGE_PATH/02-" "$CREDS_ADOBE" "-" "https://www.adobeaemcloud.com/content/companies/public/adobe/packages/cq650/servicepack/fd/AEM-Forms-6.5.3.0-LX/jcr%3acontent/package/file.res/AEM-Forms-6.5.3.0-LX-6.0.122.zip" 57 | #./scripts/download.sh "$PACKAGE_PATH/03-" "$CREDS_ADOBE" "-" "https://www.adobeaemcloud.com/content/companies/public/adobe/packages/cq650/compatpack/AEM-FORMS-6.5.3.0-COMPAT/jcr%3acontent/package/file.res/AEM-FORMS-6.5.3.0-COMPAT-2.0.26.zip" 58 | #./scripts/download.sh "$PACKAGE_PATH/04-" "-" "-" "https://github.com/Adobe-Consulting-Services/com.adobe.acs.bundles.twitter4j/releases/download/com.adobe.acs.bundles.twitter4j-1.0.0/com.adobe.acs.bundles.twitter4j-content-1.0.0.zip" 59 | #./scripts/download.sh "$PACKAGE_PATH/05-" "-" "-" "https://github.com/Adobe-Consulting-Services/acs-aem-commons/releases/download/acs-aem-commons-4.4.0/acs-aem-commons-content-4.4.0.zip" 60 | #./scripts/download.sh "$PACKAGE_PATH/06-" "-" "-" "https://github.com/adobe/aem-core-wcm-components/releases/download/core.wcm.components.reactor-2.8.0/core.wcm.components.all-2.8.0.zip" 61 | #./scripts/download.sh "$PACKAGE_PATH/07-" "-" "-" "http://repo1.maven.org/maven2/biz/netcentric/cq/tools/accesscontroltool/accesscontroltool-package/2.5.1/accesscontroltool-package-2.3.2.zip" 62 | #./scripts/download.sh "$PACKAGE_PATH/08-" "-" "-" "http://repo1.maven.org/maven2/biz/netcentric/cq/tools/accesscontroltool/accesscontroltool-oakindex-package/2.5.1/accesscontroltool-oakindex-package-2.5.1.zip" 63 | #./scripts/download.sh "$PACKAGE_PATH/09-" "$CREDS_ADOBE" "-" "https://www.adobeaemcloud.com/content/companies/public/adobe/packages/cq600/component/vanityurls-components/jcr%3acontent/package/file.res/vanityurls-components-1.0.2.zip" 64 | #./scripts/download.sh "$PACKAGE_PATH/10-" "-" "githublatest:aemdesign-aem-core-deploy" "https://api.github.com/repos/aem-design/aemdesign-aem-core/releases/latest" 65 | #./scripts/download.sh "$PACKAGE_PATH/11-" "-" "githublatest:aemdesign-aem-support-deploy" "https://api.github.com/repos/aem-design/aemdesign-aem-support/releases/latest" 66 | #./scripts/download.sh "$PACKAGE_PATH/12-" "-" "githublatest:brightcove_connector" "https://api.github.com/repos/aem-design/Adobe-AEM-Brightcove-Connector/releases/latest" 67 | # -------------------------------------------- 68 | echo ::set-env name=PACKAGE_CKECK_COUNT::${PACKAGE_CKECK_COUNT} 69 | echo PACKAGE COUNT=$PACKAGE_CKECK_COUNT 70 | ls -latr $PACKAGE_PATH 71 | source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_get_version.sh) 72 | 73 | - name: build and test docker image 74 | run: | 75 | docker build --pull -t $IMAGE:$IMAGE_VERSION . 76 | source <(curl -sL https://github.com/aem-design/aemdesign-docker/releases/latest/download/github_container_verify.sh) 77 | (cd test && ./run_tests.sh "$IMAGE:$IMAGE_VERSION") 78 | docker images 79 | 80 | - name: login to docker registry 81 | run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login ${DOCKER_REGISTRY} -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin 82 | 83 | - name: push image version 84 | run: docker push $IMAGE:$IMAGE_VERSION 85 | 86 | - name: push latest image on master 87 | if: github.ref == 'refs/heads/master' 88 | run: | 89 | docker tag $IMAGE:$IMAGE_VERSION $IMAGE:latest 90 | docker push $IMAGE:latest 91 | 92 | - name: update registry description with readme on master 93 | if: github.ref == 'refs/heads/master' 94 | run: | 95 | docker run --rm -v $(pwd):/data/ aemdesign/dockerhub-description "$DOCKER_USERNAME" "$DOCKER_PASSWORD" "$IMAGE" 96 | 97 | - uses: meeDamian/github-release@1.0 98 | with: 99 | token: ${{ secrets.GITHUB_TOKEN }} 100 | tag: ${{ env.GITHUB_TAG }} 101 | name: ${{ env.GITHUB_TAG }} 102 | body: ${{ env.GIT_RELEASE_NOTES }} 103 | allow_override: true 104 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Ignore IDE and Operating System artifacts 3 | .idea 4 | .classpath 5 | .metadata 6 | .project 7 | .settings 8 | maven-eclipse.xml 9 | *.iml 10 | *.ipr 11 | *.iws 12 | .DS_Store 13 | tmp/ 14 | 15 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM aemdesign/aem-base:latest 2 | 3 | MAINTAINER devops 4 | 5 | LABEL os="centos 7" \ 6 | java="oracle 8" \ 7 | container.description="aem instance, will run as author unless specified otherwise" \ 8 | version="latest" \ 9 | imagename="aem" \ 10 | test.command=" java -version 2>&1 | grep 'java version' | sed -e 's/.*java version "\(.*\)".*/\1/'" \ 11 | test.command.verify="1.8" 12 | 13 | ARG AEM_VERSION="6.5.0" 14 | ARG AEM_JVM_OPTS="-server -Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=256M -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=true -Dorg.apache.felix.http.host=0.0.0.0" 15 | ARG AEM_START_OPTS="start -c /aem/crx-quickstart -i launchpad -p 8080 -a 0.0.0.0 -Dsling.properties=conf/sling.properties" 16 | ARG AEM_JARFILE="/aem/crx-quickstart/app/cq-quickstart-${AEM_VERSION}-standalone-quickstart.jar" 17 | ARG AEM_RUNMODE="-Dsling.run.modes=author,crx3,crx3tar,nosamplecontent" 18 | ARG PACKAGE_PATH="./crx-quickstart/install" 19 | 20 | ENV AEM_JVM_OPTS="${AEM_JVM_OPTS}" \ 21 | AEM_START_OPTS="${AEM_START_OPTS}"\ 22 | AEM_JARFILE="${AEM_JARFILE}" \ 23 | AEM_RUNMODE="${AEM_RUNMODE}" 24 | 25 | WORKDIR /aem 26 | 27 | COPY scripts/*.sh /aem/ 28 | COPY jar/aem-quickstart.jar ./aem-quickstart.jar 29 | 30 | #unpack the jar 31 | RUN java -jar aem-quickstart.jar -unpack && \ 32 | rm aem-quickstart.jar 33 | 34 | COPY dist/install.first/*.config ./crx-quickstart/install/ 35 | COPY dist/install.first/logs/*.config ./crx-quickstart/install/ 36 | COPY dist/install.first/conf/sling.properties ./crx-quickstart/conf/sling.properties 37 | 38 | COPY packages/ $PACKAGE_PATH/ 39 | 40 | #expose port 41 | EXPOSE 8080 58242 57345 57346 42 | 43 | VOLUME ["/aem/crx-quickstart/repository", "/aem/crx-quickstart/logs", "/aem/backup"] 44 | 45 | #ensure script has exec permissions 46 | RUN chmod +x /aem/*.sh 47 | 48 | #make java pid 1 49 | ENTRYPOINT ["/bin/tini", "--", "/aem/run-tini.sh"] 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## CentOS 7 with AEM 2 | 3 | [![build_status](https://github.com/aem-design/docker-aem/workflows/build/badge.svg?branch=master)](https://github.com/aem-design/docker-aem/actions?query=workflow%3Abuild+branch%3Amaster) 4 | [![github license](https://img.shields.io/github/license/aem-design/aem)](https://github.com/aem-design/aem) 5 | [![github issues](https://img.shields.io/github/issues/aem-design/aem)](https://github.com/aem-design/aem) 6 | [![github last commit](https://img.shields.io/github/last-commit/aem-design/aem)](https://github.com/aem-design/aem) 7 | [![github repo size](https://img.shields.io/github/repo-size/aem-design/aem)](https://github.com/aem-design/aem) 8 | [![docker stars](https://img.shields.io/docker/stars/aemdesign/aem)](https://hub.docker.com/r/aemdesign/aem) 9 | [![docker pulls](https://img.shields.io/docker/pulls/aemdesign/aem)](https://hub.docker.com/r/aemdesign/aem) 10 | [![github release](https://img.shields.io/github/release/aem-design/aem)](https://github.com/aem-design/aem) 11 | 12 | This is docker image based on CentOS 7 with Tini 13 | One image that can be used for both Author and Publish nodes 14 | No license is included, you will need to register when starting up 15 | 16 | ### Container Version to Branch Mapping 17 | 18 | Following is description of container contents based on branch names 19 | 20 | * 6.5.0 - base aem version without any packages 21 | * 6.5.0-bundle - base aem version with typical packages 22 | * 6.5.1.0 - base aem version with Service Pack 1 23 | * 6.5.1.0-bundle - base aem version with Service Pack 1 and typical packages 24 | * 6.5.1.0-bundle-forms - base aem version with Service Pack 1, typical packages and forms 25 | 26 | ### Typical Packages 27 | 28 | These are typical packages that are included in bundled containers 29 | 30 | | File | Notes | 31 | | --- | --- | 32 | | com.adobe.acs.bundles.twitter4j-content-1.0.0.zip | acs twitter | 33 | | acs-aem-commons-content-4.3.2.zip | acs commons | 34 | | core.wcm.components.all-2.6.0.zip | adobe corecomponents | 35 | | accesscontroltool-package-2.3.2.zip | netcentric acl tools | 36 | | accesscontroltool-oakindex-package-2.3.2.zip | netcentric acl tools | 37 | | vanityurls-components-1.0.2.zip | vanity url servlet | 38 | | aemdesign-aem-core-deploy-{LATEST}.zip | aem design core | 39 | | aemdesign-aem-support-deploy-{LATEST}.zip | aem design showcase content | 40 | | brightcove_connector-{LATEST}.zip | bright cove package | 41 | 42 | Packages that have `{LATEST}` mean that when the container is built it will pull the latest version available in git repository. 43 | 44 | ### Service Pack Packages 45 | 46 | This is a typical service pack that is added to container 47 | 48 | | File | Notes | 49 | | --- | --- | 50 | | AEM-6.5.1.0-6.5.1.zip | sp 1 | 51 | 52 | ### Forms Packages 53 | 54 | This is a typical form and forms service pack that is added to container 55 | 56 | | File | Notes | 57 | | --- | --- | 58 | | aem-compat-cq65-to-cq64-0.18.zip | aem forms backwards compatibility | 59 | | com.adobe.acs.bundles.twitter4j-content-1.0.0.zip | acs twitter | 60 | 61 | 62 | ### Environment Variables 63 | 64 | Following environment variables are available 65 | 66 | | Name | Default Value | Notes | 67 | | --- | --- | --- | 68 | | AEM_VERSION | "6.5.0" | only used during build | 69 | | AEM_JVM_OPTS | "-server -Xms1024m -Xmx1024m -XX:MaxDirectMemorySize=256M -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=true -Dorg.apache.felix.http.host=0.0.0.0" | | 70 | | AEM_START_OPTS | "start -c /aem/crx-quickstart -i launchpad -p 8080 -a 0.0.0.0 -Dsling.properties=conf/sling.properties" | | 71 | | AEM_JARFILE | "/aem/crx-quickstart/app/cq-quickstart-${AEM_VERSION}-standalone-quickstart.jar" | | 72 | | AEM_RUNMODE | "-Dsling.run.modes=author,crx3,crx3tar,nosamplecontent" | | 73 | 74 | 75 | ### Volumes 76 | 77 | Following volumes are exposed 78 | 79 | | Path | Notes | 80 | | --- | --- | 81 | | "/aem/crx-quickstart/repository" | | 82 | | "/aem/crx-quickstart/logs" | setup your logs to out put to console | 83 | | "/aem/backup" | | 84 | 85 | ### Ports 86 | 87 | Following Ports are exposed 88 | 89 | | Path | Notes | 90 | | --- | --- | 91 | | 8080 | main http port | 92 | | 58242 | debug | 93 | | 57345 | debug | 94 | | 57346 | debug | 95 | 96 | 97 | ### Starting 98 | 99 | To start local demo AEM 6.5 instance on port 4502 100 | 101 | ```bash 102 | docker run --name author \ 103 | -e "AEM_RUNMODE=-Dsling.run.modes=author,crx3,crx3tar,dev" \ 104 | -p4502:8080 -d \ 105 | -p30303:58242 -d \ 106 | aemdesign/aem 107 | ``` 108 | 109 | To start local demo AEM 6.4 instance on port 4512 110 | 111 | ```bash 112 | docker run --name author64 \ 113 | -e "AEM_RUNMODE=-Dsling.run.modes=author,crx3,crx3tar,dev" \ 114 | -p4512:8080 -d \ 115 | -p30313:58242 -d \ 116 | aemdesign/aem:6.4.0 117 | ``` 118 | 119 | To start local demo AEM 6.5 instance on port 4565 with Bundled Packages run the following 120 | 121 | ```bash 122 | docker run --name author65bundle \ 123 | -e "TZ=Australia/Sydney" \ 124 | -e "AEM_RUNMODE=-Dsling.run.modes=author,crx3,crx3tar,dev" \ 125 | -e "AEM_JVM_OPTS=-server -Xms248m -Xmx1524m -XX:MaxDirectMemorySize=256M -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=true -Dorg.apache.felix.http.host=0.0.0.0 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=58242,suspend=n" \ 126 | -p4565:8080 -d \ 127 | -p30364:58242 -d \ 128 | aemdesign/aem:6.5.0-bundle 129 | ``` 130 | 131 | 132 | To start local demo AEM 6.4 instance on port 4564 with Bundled Packages run the following 133 | 134 | ```bash 135 | docker run --name author64bundle \ 136 | -e "TZ=Australia/Sydney" \ 137 | -e "AEM_RUNMODE=-Dsling.run.modes=author,crx3,crx3tar,dev" \ 138 | -e "AEM_JVM_OPTS=-server -Xms248m -Xmx1524m -XX:MaxDirectMemorySize=256M -XX:+CMSClassUnloadingEnabled -Djava.awt.headless=true -Dorg.apache.felix.http.host=0.0.0.0 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=58242,suspend=n" \ 139 | -p4564:8080 -d \ 140 | -p30364:58242 -d \ 141 | aemdesign/aem:6.4.0-bundle 142 | ``` 143 | 144 | 145 | -------------------------------------------------------------------------------- /dist/install.first/aws-s3/org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config.sample: -------------------------------------------------------------------------------- 1 | accessKey= 2 | secretKey= 3 | s3Bucket= 4 | s3Region= 5 | connectionTimeout=I"120000" 6 | socketTimeout=I"120000" 7 | maxConnections=I"40" 8 | writeThreads=I"30" 9 | maxErrorRetry=I"10" 10 | 11 | -------------------------------------------------------------------------------- /dist/install.first/aws-s3/org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config.sample: -------------------------------------------------------------------------------- 1 | mongouri= 2 | db= 3 | customBlobStore=B"true" -------------------------------------------------------------------------------- /dist/install.first/aws-s3/org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config.sample: -------------------------------------------------------------------------------- 1 | customBlobStore=B"true" 2 | -------------------------------------------------------------------------------- /dist/install.first/conf/sling.properties: -------------------------------------------------------------------------------- 1 | sling.bootdelegation.class.com.rsa.jsafe.provider.JsafeJCE=com.rsa.* 2 | sling.bootdelegation.class.org.bouncycastle.jce.provider.BouncyCastleProvider=org.bouncycastle.* 3 | org.apache.sling.commons.log.file="" 4 | org.apache.sling.commons.log.level=ERROR 5 | sling.ignoreSystemProperties=false -------------------------------------------------------------------------------- /dist/install.first/logs/org.apache.sling.commons.log.LogManager.config: -------------------------------------------------------------------------------- 1 | org.apache.sling.commons.log.pattern="%d{dd.MM.yyyy\ HH:mm:ss.SSS}\ *%level*\ [%thread]\ %logger\ %msg%n" 2 | org.apache.sling.commons.log.file.size="'.'yyyy-MM-dd" 3 | org.apache.sling.commons.log.file="" 4 | org.apache.sling.commons.log.file.number=I"5" 5 | org.apache.sling.commons.log.level="error" 6 | org.apache.sling.commons.log.maxOldFileCountInDump=I"3" 7 | org.apache.sling.commons.log.configurationFile="" 8 | org.apache.sling.commons.log.numOfLines=I"1000" 9 | org.apache.sling.commons.log.maxCallerDataDepth=I"7" 10 | org.apache.sling.commons.log.packagingDataEnabled=B"false" -------------------------------------------------------------------------------- /dist/install.first/org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config: -------------------------------------------------------------------------------- 1 | minRecordLength=I"4096" 2 | path="./crx-quickstart/repository/datastore" 3 | cacheSizeInMB=I"128" 4 | maxCachedBinarySize=I"17408" 5 | -------------------------------------------------------------------------------- /dist/install.first/org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config: -------------------------------------------------------------------------------- 1 | mongouri="mongodb://0.0.0.0:27017" 2 | db="aem-author" 3 | customBlobStore=B"true" 4 | cache=I"256" 5 | changesSize=I"256" 6 | -------------------------------------------------------------------------------- /dist/install.first/org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.config: -------------------------------------------------------------------------------- 1 | enableCopyOnReadSupport=B"true" 2 | enableCopyOnWriteSupport=B"true" 3 | prefetchIndexFiles=B"true" -------------------------------------------------------------------------------- /dist/install.first/org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config: -------------------------------------------------------------------------------- 1 | tarmk.size=I"256" 2 | cache=I"256" 3 | customBlobStore=B"true" 4 | repository.home="./crx-quickstart/repository/segmentstore" -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | aem: 2 | build: . 3 | labels: 4 | aem.version: "6.5" 5 | os.version: "centos 7" 6 | java.version: "oracle 8" 7 | container.description: "aem instance, will run as author unless specified otherwise" 8 | container_name: "aem" 9 | ports: 10 | - "8080:8080" 11 | - "58242:58242" 12 | volumes: 13 | - /var/author_home/aem/crx-quickstart:/aem/crx-quickstart 14 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests -------------------------------------------------------------------------------- /scripts/download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # get current script location 5 | CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 6 | 7 | function help() { 8 | echo "Usage:" 9 | echo " ./download.sh {[FILE NAME PREFIX] [AUTH] [MODULE] [URL]}..." 10 | echo "" 11 | echo " FILENAME_PREFIX:" 12 | echo " - filename prefix to use, [-] = none" 13 | echo " AUTH:" 14 | echo " - auth to use, [-] = none" 15 | echo " MODULE:" 16 | echo " - module to use, [-] = none" 17 | echo " URL:" 18 | echo " - url to get" 19 | } 20 | 21 | function download() { 22 | 23 | local FILENAME_PREFIX=${1?Need file name prefix} 24 | local FILEURL=${2?Need file url} 25 | local MODULE=${3:-} 26 | echo "download: $FILEURL" 27 | echo "module: $MODULE" 28 | 29 | local FILENAME=$(basename "$FILEURL") 30 | 31 | if [[ ! "$MODULE" == "" && ! "$MODULE" == "-" ]]; then 32 | MODULE_SCRIPT="${CURRENT_DIR}/$(echo $MODULE | sed -e 's/\(.*\):.*/\1/').py" 33 | echo "script: ${MODULE_SCRIPT}" 34 | 35 | if [[ ! -f "${MODULE_SCRIPT}" ]]; then 36 | echo "module: error, could not find module script" 37 | exit 0 38 | fi 39 | 40 | FILTER=$(echo $MODULE | sed -e 's/.*:\(.*\)/\1/') 41 | echo "filter: ${FILTER}" 42 | echo "url: ${FILEURL}" 43 | FILEURL_FILTER_URL=$(${MODULE_SCRIPT} ${FILTER} ${FILEURL}) 44 | echo "FILEURL_FILTER_URL:" 45 | echo ${FILEURL_FILTER_URL} 46 | if [[ "${FILEURL_FILTER_URL}" == "" ]]; then 47 | echo "module: error, could not get url from module" 48 | exit 0 49 | fi 50 | FILENAME=$(basename "${FILEURL_FILTER_URL}") 51 | FILEURL=${FILEURL_FILTER_URL} 52 | fi 53 | 54 | echo "DOWNLOADING $FILEURL to ${FILENAME_PREFIX}${FILENAME}" 55 | curl \ 56 | --connect-timeout 30 \ 57 | --retry 300 \ 58 | --retry-delay 5 \ 59 | -L "${FILEURL}" -o ${FILENAME_PREFIX}${FILENAME} 60 | 61 | } 62 | 63 | function downloadAuth() { 64 | 65 | local FILENAME_PREFIX=${1?Need file name prefix} 66 | local BASICCREDS=${2?Need username password} 67 | local FILEURL=${3?Need file url} 68 | local MODULE=${4:-} 69 | echo "download: $FILEURL" 70 | echo "module: not supported" 71 | 72 | local FILENAME=$(basename "$FILEURL") 73 | 74 | echo "DOWNLOADING $FILENAME into ${FILENAME_PREFIX}${FILENAME}" 75 | curl \ 76 | --connect-timeout 30 \ 77 | --retry 300 \ 78 | --retry-delay 5 \ 79 | -A "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" \ 80 | -k \ 81 | -u "${BASICCREDS}" -L "${FILEURL}" -o ${FILENAME_PREFIX}${FILENAME} 82 | 83 | } 84 | 85 | 86 | function main() { 87 | 88 | if [[ $# -eq 0 ]]; then 89 | help 90 | exit 1 91 | fi 92 | 93 | local ACTIONS_COUNT=$# 94 | local ACTIONS=($@) 95 | 96 | for (( i=0; i<=$ACTIONS_COUNT; i+=3 )) 97 | do 98 | 99 | local FILENAME_PREFIX=${ACTIONS[$i]} 100 | local AUTH=${ACTIONS[$(($i + 1))]} 101 | local FLAGS=${ACTIONS[$(($i + 2))]} 102 | local URL=${ACTIONS[$(($i + 3))]} 103 | 104 | if [[ ! $FILENAME_PREFIX == "" && ! $AUTH == "" && ! $URL == "" ]]; then 105 | 106 | if [[ $AUTH == "-" ]]; then 107 | download "$FILENAME_PREFIX" "$URL" "$FLAGS" 108 | else 109 | downloadAuth "$FILENAME_PREFIX" "$AUTH" "$URL" "$FLAGS" 110 | fi 111 | 112 | fi 113 | 114 | done 115 | 116 | 117 | } 118 | 119 | 120 | main "$@" 121 | -------------------------------------------------------------------------------- /scripts/force-recompilation.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ $1 == "-h" ]]; then 4 | echo "Usage: force-recompilation.sh " 5 | echo 6 | echo "Example arguments: admin:admin http://localhost:8080" 7 | echo 8 | echo "This will force a recompilation of all Sling scripts (jsps, java, sightly etc.)." 9 | exit 10 | fi 11 | 12 | AEM_DIR="/aem/crx-quickstart" 13 | AEM_URL="http://localhost:8080" 14 | AEM_CREDS="admin:admin" 15 | 16 | CREDS="${1:-$AEM_CREDS}" 17 | HOST="${2:-$AEM_URL}" 18 | 19 | if [[ ! -d "$AEM_DIR" ]]; then 20 | echo "No crx-quickstart directory found." 21 | exit 22 | fi 23 | 24 | echo "stopping the org.apache.sling.commons.fsclassloader bundle..." 25 | BUNDLE="org.apache.sling.commons.fsclassloader" 26 | curl -f -s -S -u $CREDS -F action=stop $HOST/system/console/bundles/$BUNDLE > /dev/null 27 | EXIT_CODE=$? 28 | if [ $EXIT_CODE -ne 0 ]; then 29 | echo 30 | if [ $EXIT_CODE -eq 22 ]; then 31 | echo "Invalid admin password." 32 | fi 33 | echo "aborted."; 34 | exit 35 | fi 36 | 37 | cd "$AEM_DIR" 38 | 39 | CLASS_DIRS=`find launchpad/felix -path "*/bundle*/data/classes" -type d` 40 | if [[ -d "$CLASS_DIRS" ]]; then 41 | echo "deleting file sytem classes cache: `pwd`/$CLASS_DIRS ..." 42 | rm -rf "$CLASS_DIRS" 43 | else 44 | echo "file system classes cache empty or already cleared" 45 | fi 46 | 47 | echo "deleting /var/classes in the JCR..." 48 | curl -f -s -S -u $CREDS -X DELETE $HOST/var/classes > /dev/null 49 | 50 | echo "starting the org.apache.sling.commons.fsclassloader bundle..." 51 | curl -f -s -S -u $CREDS -F action=start $HOST/system/console/bundles/$BUNDLE > /dev/null 52 | if [[ $? -ne 0 ]]; then 53 | echo 54 | echo "aborted, bundle was likely not restarted."; 55 | exit 56 | fi 57 | 58 | echo "done." -------------------------------------------------------------------------------- /scripts/gdrive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function help() { 4 | echo "Usage:" 5 | echo " ./gdrive.sh [ACTION] [FILE ID] [FILE NAME]" 6 | echo "" 7 | echo " ACTIONS" 8 | echo " - download" 9 | } 10 | 11 | function download() { 12 | 13 | local FILEID=${1?Need file id} 14 | local FILENAME=${2?Need file name} 15 | echo "download: $FILEID" 16 | 17 | if [[ ! -d tmp ]]; then 18 | echo "Creating temp folder" 19 | mkdir tmp 20 | fi 21 | 22 | curl -c ./tmp/cookie -s -L "https://drive.google.com/uc?export=download&id=${FILEID}" > /dev/null 23 | curl -Lb ./tmp/cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./tmp/cookie`&id=${FILEID}" -o ${FILENAME} 24 | 25 | } 26 | 27 | function main() { 28 | local ACTION=${1?Need action} 29 | local FILEID=${2?Need file id} 30 | local FILENAME=${3?Need file name} 31 | 32 | case $ACTION in 33 | download) 34 | download "$FILEID" "$FILENAME" 35 | ;; 36 | *) 37 | help 38 | ;; 39 | esac 40 | 41 | 42 | } 43 | 44 | 45 | main "$@" 46 | -------------------------------------------------------------------------------- /scripts/githublatest.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | RS=""; 3 | FS="\n"; 4 | } 5 | { 6 | 7 | split($1, assets, "},{") 8 | assets_length=length(assets) 9 | x=0 10 | do { 11 | if ( index(assets[x],GITHUB_LATEST_FILTER) ) { 12 | 13 | "sed -e 's/.*\"browser_download_url\":\"\\(.*\\)\".*/\\1/'<<<'"assets[x]"'" | getline url 14 | 15 | if ( length(url) > 1 ) { 16 | printf url 17 | exit 18 | } 19 | } 20 | x+=1; 21 | } 22 | while(x<=assets_length) 23 | 24 | } -------------------------------------------------------------------------------- /scripts/githublatest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import requests 4 | import argparse 5 | 6 | # set parameters for script 7 | parser = argparse.ArgumentParser(description='Get download url from github releases with filename filter') 8 | parser.add_argument('filter', help='file name filer') 9 | parser.add_argument('url', help='url of github api') 10 | # read command line params 11 | args = parser.parse_args() 12 | 13 | # get url content 14 | response = requests.get(args.url) 15 | parsed_json = response.json() 16 | 17 | # find assets.browser_download_url that matches filter 18 | for asset in parsed_json['assets']: 19 | if asset['browser_download_url'].find(args.filter) > 0: 20 | print(asset['browser_download_url']) 21 | -------------------------------------------------------------------------------- /scripts/run-tini.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # if `docker run` first argument start with `--` the user is passing launcher arguments 4 | if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then 5 | 6 | exec java $AEM_JVM_OPTS $AEM_RUNMODE -jar $AEM_JARFILE $AEM_START_OPTS 7 | 8 | fi 9 | 10 | # if other params assume user want to run his own process, for example a `bash` shell to explore this image 11 | exec "$@" -------------------------------------------------------------------------------- /scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #exec java $AEM_JVM_OPTS $AEM_RUNMODE -jar $AEM_JARFILE $AEM_START_OPTS 4 | 5 | trap '/aem/crx-quickstart/bin/stop' TERM INT 6 | java $AEM_JVM_OPTS $AEM_RUNMODE -jar $AEM_JARFILE $AEM_START_OPTS & 7 | PID=$! 8 | wait $PID 9 | trap - TERM INT 10 | wait $PID 11 | EXIS_STATUS=$? 12 | 13 | echo $EXIS_STATUS -------------------------------------------------------------------------------- /scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p /aem/crx-quickstart/logs 4 | 5 | LOG=/aem/crx-quickstart/logs/start_history.log 6 | 7 | function log() { 8 | echo "`date` $1">>"$LOG" 9 | } 10 | 11 | log "Checking If First Time" 12 | 13 | # check if has been extracted earlier 14 | #if [ ! -d "/aem/crx-quickstart/bin" ] ; then 15 | # 16 | # log "====================================================" 17 | # log "Unpacking AEM Package" 18 | # cd /aem; java -jar cq-quickstart-6.jar -unpack >>"$LOG" 19 | # log "Unpacking Is DONE" 20 | # log "----------------------------------------------------" 21 | # log "Copying Configuration files" 22 | # mkdir -p /aem/crx-quickstart/install && cp -a /aem/install/. /aem/crx-quickstart/install/ 23 | # log "====================================================" 24 | # log "Install DONE" 25 | # 26 | #fi 27 | 28 | # Merged from /crx-quickstart/bin/start and /crx-quickstart/bin/quickstart 29 | # 30 | # This script configures the start information for this server. 31 | # 32 | # The following variables may be used to override the defaults. 33 | # For one-time overrides the variable can be set as part of the command-line; e.g., 34 | # 35 | # % AEM_PORT=1234 ./start 36 | # 37 | 38 | #Force all ports 39 | #AEM_PORT=8080 40 | AEM_DEBUG_PORT=58242 41 | 42 | # TCP port used for stop and status scripts 43 | if [ -z "$AEM_PORT" ]; then 44 | AEM_PORT=4502 45 | fi 46 | 47 | # hostname of the interface that this server should listen to 48 | if [ -z "$AEM_HOST" ]; then 49 | AEM_HOST=0.0.0.0 50 | fi 51 | 52 | # runmode(s) 53 | # will not be used if repository is already present 54 | if [ -z "$AEM_RUNMODE" ]; then 55 | AEM_RUNMODE='author' 56 | fi 57 | 58 | # name of the jarfile 59 | if [ -z "$AEM_JARFILE" ]; then 60 | AEM_JARFILE='' 61 | fi 62 | 63 | # default JVM options 64 | if [ -z "$AEM_JVM_OPTS" ]; then 65 | AEM_JVM_OPTS='-server -Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true' 66 | fi 67 | 68 | # file size limit (ulimit) 69 | if [ -z "$AEM_FILE_SIZE_LIMIT" ]; then 70 | AEM_FILE_SIZE_LIMIT=8192 71 | fi 72 | 73 | # ------------------------------------------------------------------------------ 74 | # authentication 75 | # ------------------------------------------------------------------------------ 76 | # when using oak (crx3) authentication must be configured using the 77 | # Apache Felix JAAS Configuration Factory service via the Web Console 78 | # see http://jackrabbit.apache.org/oak/docs/security/authentication/externalloginmodule.html 79 | 80 | # use jaas.config (legacy: only used for crx2 persistence) 81 | #if [ -z "$AEM_USE_JAAS" ]; then 82 | # AEM_USE_JAAS='true' 83 | #fi 84 | 85 | # config for jaas (legacy: only used for crx2 persistence) 86 | #if [ -z "$AEM_JAAS_CONFIG" ]; then 87 | # AEM_JAAS_CONFIG='etc/jaas.config' 88 | #fi 89 | 90 | # ------------------------------------------------------------------------------ 91 | # persistence mode 92 | # ------------------------------------------------------------------------------ 93 | # the persistence mode can not be switched for an existing repository 94 | AEM_RUNMODE="${AEM_RUNMODE},crx3,crx3tar" 95 | #AEM_RUNMODE="${AEM_RUNMODE},crx3,crx3mongo" 96 | 97 | # settings for mongo db 98 | #if [ -z "$AEM_MONGO_HOST" ]; then 99 | # AEM_MONGO_HOST=127.0.0.1 100 | #fi 101 | #if [ -z "$AEM_MONGO_PORT" ]; then 102 | # AEM_MONGO_PORT=27017 103 | #fi 104 | #if [ -z "$AEM_MONGO_DB" ]; then 105 | # AEM_MONGO_DB=aem6 106 | #fi 107 | 108 | # ------------------------------------------------------------------------------ 109 | # do not configure below this point 110 | # ------------------------------------------------------------------------------ 111 | 112 | if [ $AEM_FILE_SIZE_LIMIT ]; then 113 | CURRENT_ULIMIT=`ulimit` 114 | if [ $CURRENT_ULIMIT != "unlimited" ]; then 115 | if [ $CURRENT_ULIMIT -lt $AEM_FILE_SIZE_LIMIT ]; then 116 | echo "ulimit ${CURRENT_ULIMIT} is too small (must be at least ${AEM_FILE_SIZE_LIMIT})" 117 | exit 1 118 | fi 119 | fi 120 | fi 121 | 122 | AEM_JARFILE=`find /aem/crx-quickstart/app/ -name "*quickstart.jar" -print -quit` 123 | CURR_DIR="/aem/crx-quickstart" 124 | 125 | #BIN_PATH=$(dirname $0) 126 | #cd $BIN_PATH/.. 127 | #if [ -z $AEM_JARFILE ]; then 128 | # AEM_JARFILE=`ls app/*.jar | head -1` 129 | #fi 130 | #CURR_DIR=$(basename $(pwd)) 131 | #cd .. 132 | 133 | START_OPTS="start -c ${CURR_DIR} -i launchpad" 134 | if [ $AEM_PORT ]; then 135 | START_OPTS="${START_OPTS} -p ${AEM_PORT}" 136 | fi 137 | 138 | #merged from quickstart 139 | #if [ $AEM_GUI ]; then 140 | # START_OPTS="${START_OPTS} -gui" 141 | #fi 142 | if [ $AEM_VERBOSE ]; then 143 | START_OPTS="${START_OPTS} -verbose" 144 | fi 145 | if [ $AEM_NOFORK ]; then 146 | START_OPTS="${START_OPTS} -nofork" 147 | fi 148 | if [ $AEM_FORK ]; then 149 | START_OPTS="${START_OPTS} -fork" 150 | fi 151 | if [ $AEM_FORKARGS ]; then 152 | START_OPTS="${START_OPTS} -forkargs ${AEM_FORKARGS}" 153 | fi 154 | if [ $AEM_LOWMEMACTION ]; then 155 | START_OPTS="${START_OPTS} -low-mem-action ${AEM_LOWMEMACTION}" 156 | fi 157 | 158 | if [ $AEM_RUNMODE ]; then 159 | AEM_JVM_OPTS="${AEM_JVM_OPTS} -Dsling.run.modes=${AEM_RUNMODE}" 160 | fi 161 | if [ $AEM_HOST ]; then 162 | AEM_JVM_OPTS="${AEM_JVM_OPTS} -Dorg.apache.felix.http.host=${AEM_HOST}" 163 | START_OPTS="${START_OPTS} -a ${AEM_HOST}" 164 | fi 165 | if [ $AEM_MONGO_HOST ]; then 166 | START_OPTS="${START_OPTS} -Doak.mongo.host=${AEM_MONGO_HOST}" 167 | fi 168 | if [ $AEM_MONGO_PORT ]; then 169 | START_OPTS="${START_OPTS} -Doak.mongo.port=${AEM_MONGO_PORT}" 170 | fi 171 | if [ $AEM_MONGO_DB ]; then 172 | START_OPTS="${START_OPTS} -Doak.mongo.db=${AEM_MONGO_DB}" 173 | fi 174 | 175 | if [ $AEM_USE_JAAS ]; then 176 | AEM_JVM_OPTS="${AEM_JVM_OPTS} -Djava.security.auth.login.config=${AEM_JAAS_CONFIG}" 177 | fi 178 | START_OPTS="${START_OPTS} -Dsling.properties=conf/sling.properties" 179 | 180 | if [ $AEM_DEBUG ]; then 181 | AEM_JVM_OPTS="${AEM_JVM_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=${AEM_DEBUG_PORT},suspend=n" 182 | fi 183 | 184 | if [ $AEM_MONITOR ]; then 185 | if [ -z "$AEM_MONITOR_PORT" ]; then 186 | AEM_MONITOR_PORT=3333 187 | fi 188 | #allow visual VM to connect 189 | AEM_JVM_OPTS="${AEM_JVM_OPTS} -Dcom.sun.management.jmxremote.port=${AEM_MONITOR_PORT} -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" 190 | fi 191 | 192 | # timezone 193 | if [ "$AEM_TZ" ]; then 194 | AEM_JVM_OPTS="${AEM_JVM_OPTS} -Duser.timezone=${AEM_TZ}" 195 | fi 196 | 197 | #allow override of everything!!! 198 | AEM_JVM_OPTS=${AEM_JVM_OPTS_OVD:-$AEM_JVM_OPTS} 199 | AEM_START_OPT=${AEM_START_OPTS_OVD:-$START_OPTS} 200 | 201 | 202 | log "Starting..." 203 | 204 | log "java $AEM_JVM_OPTS -jar $AEM_JARFILE $AEM_START_OPT" 205 | 206 | ##IF UPGRADE 207 | if [ $AEM_UPGRADE ]; then 208 | AEM_START_OPT="-r" 209 | fi 210 | 211 | if [[ $# -lt 1 ]] || [[ "$1" == "--"* ]]; then 212 | 213 | exec java $AEM_JVM_OPTS -jar $AEM_JARFILE $AEM_START_OPT 214 | 215 | fi 216 | 217 | # As argument is not jenkins, assume user want to run his own process, for example a `bash` shell to explore this image 218 | exec "$@" 219 | 220 | #trap '/aem/crx-quickstart/bin/stop' TERM INT 221 | #java $AEM_JVM_OPTS -jar $AEM_JARFILE $AEM_START_OPT & 222 | #PID=$! 223 | #wait $PID 224 | #trap - TERM INT 225 | #wait $PID 226 | #EXIT_STATUS=$? 227 | 228 | #( 229 | # ( 230 | # java $AEM_JVM_OPTS -jar $CURR_DIR/$CQ_JARFILE $AEM_START_OPT & 231 | # echo $! > $CURR_DIR/conf/cq.pid 232 | # ) >> $CURR_DIR/logs/stdout.log 2>&1 233 | #) & -------------------------------------------------------------------------------- /test/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | 4 | tasks: 5 | - name: test 6 | debug: 7 | msg: test 8 | 9 | -------------------------------------------------------------------------------- /test/run_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # The 'run' performs a simple test that verifies that STI image. 4 | # The main focus is that the image prints out the base-usage properly. 5 | # 6 | # IMAGE_NAME specifies a name of the candidate image used for testing. 7 | # The image has to be available before this script is executed. 8 | # 9 | IMAGE_NAME=${1:-aemdesign/aem} 10 | FLAG_DEBUG=${2:-true} 11 | IP=$(which ip) 12 | if [[ -z $IP ]]; then 13 | LOCAL_IP="localhost" 14 | else 15 | LOCAL_IP=$($IP route | awk '/default/ { print $3 }') 16 | fi 17 | 18 | # check if git variables are set 19 | if [[ ${PACKAGE_CKECK_COUNT} == "" ]]; then 20 | echo PACKAGE_CKECK_COUNT="${PACKAGE_CKECK_COUNT}" 21 | echo PLEASE SET PACKAGE_CKECK_COUNT 22 | exit 1 23 | fi 24 | 25 | #debug(message,type[error,info,warning],newlinesiffix) 26 | function debug { 27 | 28 | local DEFAULT_COLOR_WARN="\033[0;31;93m" #light yellow 29 | local DEFAULT_COLOR_ERROR="\033[0;31;91m" #light red 30 | local DEFAULT_COLOR_INFO="\033[0;31;94m" #light blue 31 | local DEFAULT_COLOR_DEFAULT="\033[0;31;92m" #light green 32 | local DEFAULT_COLOR_RESET="\033[0m" #light green 33 | 34 | COLOR_WARN="${COLOR_WARN:-$DEFAULT_COLOR_WARN}" #light yellow 35 | COLOR_ERROR="${COLOR_ERROR:-$DEFAULT_COLOR_ERROR}" #light red 36 | COLOR_INFO="${COLOR_INFO:-$DEFAULT_COLOR_INFO}" #light blue 37 | COLOR_DEFAULT="${COLOR_DEFAULT:-$DEFAULT_COLOR_DEFAULT}" #light green 38 | COLOR_RESET="${COLOR_RESET:-$DEFAULT_COLOR_RESET}" #light green 39 | 40 | LABEL_WARN="${LABEL_WARN:-*WARN*}" 41 | LABEL_ERROR="${LABEL_ERROR:-*ERROR*}" 42 | LABEL_INFO="${LABEL_INFO:-*INFO*}" 43 | LABEL_DEFAULT="${LABEL_DEFAULT:-}" 44 | 45 | 46 | COLOR_START="$COLOR_DEFAULT" 47 | COLOR_END="$COLOR_RESET" 48 | 49 | local TEXT="${1:-}" 50 | local TYPE="${2:-}" 51 | local LABEL_TEXT="" 52 | local TEXT_SUFFUX="" 53 | local NEWLINESUFFUX=$3 54 | 55 | if [ ! "$NEWLINESUFFUX" == "" ]; then 56 | TEXT_SUFFUX="$NEWLINESUFFUX" 57 | fi 58 | 59 | case $TYPE in 60 | ("error") COLOR_START="$COLOR_ERROR" LABEL_TEXT="$LABEL_ERROR " COLOR_END="$COLOR_END";; 61 | ("info") COLOR_START="$COLOR_INFO" LABEL_TEXT="$LABEL_INFO ";; 62 | ("warn") COLOR_START="$COLOR_WARN" LABEL_TEXT="$LABEL_WARN ";; 63 | esac 64 | 65 | 66 | if [ "$FLAG_DEBUG" == "true" ]; then 67 | 68 | local LABEL="" 69 | if [ "$FLAG_DEBUG_LABEL" == "true" ]; then 70 | LABEL=${LABEL_TEXT:-} 71 | fi 72 | 73 | TEXT="${TEXT//#d:/$COLOR_DEFAULT}" 74 | TEXT="${TEXT//#w:/$COLOR_WARN}" 75 | TEXT="${TEXT//#e:/$COLOR_ERROR}" 76 | TEXT="${TEXT//#i:/$COLOR_INFO}" 77 | TEXT="${TEXT//#r:/$COLOR_INFO}" 78 | 79 | echo -e "$COLOR_START$LABEL$TEXT$TEXT_SUFFUX$COLOR_END" 80 | # printf "$COLOR_START%s%s$COLOR_END$TEXT_SUFFUX" "$LABEL" "$TEXT" 81 | fi 82 | } 83 | 84 | 85 | printTitle() { 86 | echo -n ${1:-Test} 87 | } 88 | printLine() { 89 | echo ${1:-Test} 90 | } 91 | printResult() { 92 | debug "${1:-fail}" "${1:-fail}" 93 | } 94 | printDebug() { 95 | debug "$(printf '*%.0s' {1..100})" "error" 96 | echo ${1:-Test Failed} 97 | echo "${2:-No Output}" 98 | debug "$(printf '*%.0s' {1..100})" "error" 99 | } 100 | 101 | test_docker_run_contains_packages() { 102 | printLine "Testing if image has packages" 103 | CHECK="${PACKAGE_CKECK_COUNT}" 104 | 105 | printLine "Starting Container" 106 | 107 | OUTPUT=$(docker run --rm ${IMAGE_NAME} bash -c "cd /aem/crx-quickstart/install && ls -l *.zip 2>/dev/null | wc -l") 108 | 109 | if [[ "$OUTPUT" != *"$CHECK"* ]]; then 110 | printResult "error" 111 | printDebug "Image '${IMAGE_NAME}' test FAILED could not find ${CHECK} in output" "${OUTPUT}" 112 | exit 1 113 | else 114 | printResult "success" 115 | fi 116 | } 117 | 118 | 119 | test_docker_run_contains_packages 120 | 121 | --------------------------------------------------------------------------------