The following article is a step-by-step introduction how manage CQ5 instances on Amazon EC2 instances. The article includes a script that can be used to setup single instances - or new cluster nodes that automatically join an existing instance pool.
Note: The scripts are experimental and have no error handling implemented (they assume everything is prepared the way it was designed).
For Products + Version
For Host Operating System
What Does the Script Do?
The attached script will automate the installation of a CQ5 instance in an Amazon EC2 server.
Following howto from Robert Sosinski is specifically written for Mac users:
Although you can master the basic tasks with the AWS Management Console, advanced task such as monitoring and load-balancer are only available via the command line.
scp -i ~/.ssh/ec2-keypair cq-wcm-quickstart-5.3.0.20100127.jar root@ec2-
.compute-1.amazonaws.com:.
scp -i ~/.ssh/ec2-keypair jdk-6u20-linux-amd64.rpm root@ec2-
.compute-1.amazonaws.com:.
scp -i ~/.ssh/ec2-keypair cq-wcm-quickstart-5.3.0.20100127.jar root@ec2-
.compute-1.amazonaws.com:.
cat aws-deploy-cq530.sh | ssh -i ~/.ssh/yourec2key root@ec2-
.compute-1.amazonaws.com
Open the shell script and edit properties in the 1st section
Edit CLUSTER_ACTION in the script. The repository data is shared with NFS from the 1st instance started on /mnt/cluster/author or publish/shared
:
CLUSTER_ACTION=master
to start an instanceCLUSTER_ACTION=fastjoin
and add CLUSTER_MASTER
. this connects to the master and creates a backup - restores the backup and starts the instance.
Alternative there is a CLUSTER_ACTION=join
. That uses the official join method of CRX but it needs much more time as all bundels needs to be installed and search indexes created.
/mnt/crx/author or publish/crx-quickstart/..
/mnt/cluster/author or publish/shared
crx
to run the java processuse the serverctl
located in /mnt/crx/author or publish/crx-quickstart/server
to start and stop the server
su -s /bin/bash crx ./start
./stop
ssh -i ~/.ssh/ec2-keypair root@ec2-
.compute-1.amazonaws.com
ps -efH
kill <process id>
kill -9 <process id>
df -h
ls -lah
tail -f filename.log
find filename.log -exec grep "string your are looking for" {} \; -print
rm -Rf *
du -sh /path/to/folder
rsync -a -r -W --delete --delete-after /mnt/crx/author /data/backup
the simplest way is to use secure copy:
scp -i ~/.ssh/ec2-keypair root@ec2-
.compute-1.amazonaws.com:/path/file.ext file.ext
Stáhnout
Přihlaste se ke svému účtu.