This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is to avoid following error | |
# FATA[0000] Error: Invalid registry endpoint certificate signed by unknown authority. If this private registry supports only HTTP or HTTPS # with an unknown CA certificate, please add `--insecure-registry HOST` to the daemon's arguments. In the case of HTTPS, if you have access # to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/HOST/ca.crt | |
# For red hat Linux | |
vi /etc/sysconfig/docker | |
# Add following line | |
other_args="--insecure-registry <Your-Registry-HOST>" | |
service docker restart | |
# For Mac book |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Check if /var is getting filled | |
df -k | |
#If /var space is not more than 50GB do following | |
sudo su | |
#Stop Docker | |
service docker stop | |
#Copy all files to folder that have enough space | |
#usually in linux boxes there is enough space under /export | |
#Create a dummy directory 'mkdir /export/apps/docker' | |
cp -R /var/lib/docker/ <Your other folder> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Make sure that you run this command from same directory where docker file is | |
#Also makes sure that all files are at same location | |
docker build --tag="localhost:5000/wemblog/microsites_aem:5.6" . | |
#Make sure that image exist before push | |
docker images | |
#Push image to registry | |
docker push localhost:5000/wemblog/microsites_aem:5.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos | |
#Install and set java home | |
RUN mkdir -p /export/apps/jdk | |
ADD JDK-1_7_0_51 /export/apps/jdk/JDK-1_7_0_51 | |
ENV JAVA_HOME /export/apps/jdk/JDK-1_7_0_51 | |
ENV PATH $PATH:$JAVA_HOME/bin | |
#Install CQ Author | |
RUN mkdir -p /export/apps/aem/author | |
WORKDIR /export/apps/aem/author | |
ADD cq5-publish-p4503.jar /export/apps/aem/author/cq5-author-p4502.jar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install Docker Client | |
yum -y remove docker | |
yum install docker-io | |
yum -y update docker-io | |
#This will start docker deamon | |
service docker start | |
#Install docker registry | |
yum install python-devel libevent-devel python-pip gcc xz-devel | |
python-pip install docker-registry[bugsnag,newrelic,cors] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd <Mongo bin directory> | |
./mongo | |
# Show all db | |
show dbs | |
# Check status of replica set | |
rs.status() | |
# If this is secondary you need to do | |
rs.slaveOk() | |
# Use database (Use AEM DB or DB you chose) | |
use <data-base-name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd <Mongo bin directory> | |
use admin | |
db.shutdownServer() | |
#Take Backup | |
./mongodump --dbpath ../data/<NAME OF DB> -o dataout | |
# Now set up new Mongo DB servers that you want to add in replica set Instruction above | |
# Now start your existing Mongo Using following command, Note that this time we are using replSet | |
# You can also do this using Mongo DB configuration file | |
./mongod --port 27017 --dbpath <your DB path> --replSet <Replica set Name> & | |
#Connect to the mongodb instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unpack AEM jar using | |
java -jar <AEM Jar> -unpack | |
# Go to bin directory | |
cd crx-quickstart/bin | |
#Change syour start script | |
vi start | |
#Set runmode to crx3mongo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd <Your Mongo bin Location> | |
# You can also configure port using configuration file | |
./mongo --port <PORT> | |
rs.initiate() | |
# Check the conf that it is not part of replica set yet | |
rs.conf() | |
#This is your second Mongo Instance, Make sure that your other Mongo Instance is already set up | |
rs.add("<HOST>:<PORT>") | |
#This is your Third Mongo Instance (You need to have odd number of instances for election to work) | |
rs.add("<HOST>:<PORT>") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependencies> | |
<!-- OSGi Dependencies --> | |
<dependency> | |
<groupId>org.apache.felix</groupId> | |
<artifactId>org.apache.felix.scr</artifactId> | |
</dependency> | |
<dependency> | |
<groupId>org.apache.felix</groupId> | |
<artifactId>org.apache.felix.scr.annotations</artifactId> |