wttech / aemc Goto Github PK
View Code? Open in Web Editor NEWAEM Compose (Core & CLI)
Home Page: https://wttech.blog/blog/2023/get-your-aem-together-with-aem-compose/
License: Apache License 2.0
AEM Compose (Core & CLI)
Home Page: https://wttech.blog/blog/2023/get-your-aem-together-with-aem-compose/
License: Apache License 2.0
problems to solve:
mvn clean package
each time when running setup
scriptaem package deploy --file <path>
(the file name may change any time / especially version file)for the sake of simplicity, let's assume checking building all zip only; not taking into account particular Maven modules
do not allow to start instance if port defined for HTTP is already used
As stdout output could make aem.log not parsable / is not compatible with logfmt - https://pkg.go.dev/github.com/kr/logfmt
maybe just we need to have 2 files, sample names:
cli.log
output.log
adopt if/when ready
https://github.com/manifoldco/promptui
may be useful to prompt user for AEM jar location, license file, etc then render config file at expected path aem/home/aem.yml;
now the process of copying aem/aem.sample.yml to aem/home/aem.yml is manual
checker should be aware of admin:admin pair being active before reaching initial 30% of stable bundles (AEM auth is initialised at this stage)
archetype.properties contains aemVersion=
property
basing on it if cloud is detected
maybe setup-cloud.sh and setup-onprem.sh should be in source code then intelligently copied by project/init.sh script
should check if there is 200 response when requesting
Steps:
Bug:
Folder aem/home/lib is not created
as currently it is only developed and tested on Macs
and replace it by local_[author|publish].enabled
property
https://www.geeksforgeeks.org/time-time-in-function-in-golang-with-examples/
as e.g Europe/Belgrade
str read from AEM instance passed to Go time location is causing panic
aemw - stays but no longer launches scripts. Only allows to launch aem CLI
taskw - downloads then installs task tool and runs default task
then report informative message that it is required to not have such folder in project structure;
and this is a prerequisite for aemc
usage: aem osgi component [enable|disable]
aem/home/lib
raised by @maciej-majchrzak-wttech
project-init.sh
should generate .gitignore file so that you don't need to figure it out which files should be pushed to git
Initial .gitignore can be as simple as
aem/home
dispatcher/target
https://github.com/hpcloud/tail
usage: aem instance tail [-A|P]
even if that error is printed to the console, the AEM boots as expected
however it would be nice to mitigate that error and use one of techniques listed here:
https://serverfault.com/questions/9038/run-a-bat-file-in-a-scheduled-task-without-a-window
maybe as a first shot try this - https://serverfault.com/a/9039
sometimes there is outputted
INFO[2023-02-20 10:35:16] local_publish > some events unstable (141): '[com.day.cq.wcm.mobile.api.devicespecs.DeviceSpecsProvider, org.apache.sling.api.resource.observation.ResourceChangeListener]'
=>
INFO[2023-02-20 10:35:16] local_publish > some events unstable (141): com.day.cq.wcm.mobile.api.devicespecs.DeviceSpecsProvider
to be able to inject e.g home path into paths
by changing debug port to 0 or -1 it will be disabled
note that then port checking should not bother
on the second attempt of deploy command using the exact same package...the file uploading and package manager install actions should be avoided; requires package checksum calculation and storing it on AEM somewhere
kill + delete
manipulating PATH env var is probably needed to enforce AEM control scripts which are just calling java
in script body to use configured Java/binary/home in AEMC config file.
this is needed to easily control multiple Java versions when installed on the same VM (especially on local workstations /and when using tools like jenv
)
see: #41 (comment)
script functionality works, however ugly errors are hidden / visible only when debug logging is on
it should be more verbose when the jansi problem will be resolved
prepare an example script that may help with appending to hosts file host names needed to be set up to access dispatcher/httpd vhosts
project/script/hosts.sh
assumptions
main use case: temporarily disable DAM update asset workflow before package deployment, then enabling again right after
this avoids unnecessary DAM renditions reprocessing
right now package deploy accepts only --file
.
what if it could accept --url
directly and handle also file downloading right before deployment
step "downloading APM"
aem file download --url "https://github.com/wttech/APM/releases/download/apm-5.5.1/apm-all-5.5.1.zip" --file "${DOWNLOAD_DIR}/apm-all-5.5.1.zip"
clc
step "deploying APM"
aem package deploy --file "${DOWNLOAD_DIR}/apm-all-5.5.1.zip"
clc
# TODO consider implementing this
# aem package deploy --url "https://github.com/wttech/APM/releases/download/apm-5.5.1/apm-all-5.5.1.zip"
as Mac security does not allow to run AEM jars from there; simply OSGi framework will not boot;
AEMC should report this as prerequisite
When download URL is not specified then jdk is downloaded from url determined dynamically. However when jdk maintainer will change again then the download URL hard-coded will be no longer valid and there will be no option to override default behavior
How about download_url_template config param with adoptium explicitly (no longer implicitly) defined there?
to prevent aem up with incorrect java detected
to handle dist_path
properly:
as curl then saves corrupted file and then command is not idempotent;
nice error should be shown that aemc archive file does not exist at URL ...
https://github.com/dustin/go-humanize
maybe it is needed to have it also automated in AEMC
as it is being passed via system property only alnum chars should be allowed
create + start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.