Subversion Repositories SmartDukaan

Rev

Rev 20670 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20670 Rev 25435
Line 58... Line 58...
58
cd ${PROJECT_DIR}/ContentStore
58
cd ${PROJECT_DIR}/ContentStore
59
echo "Executing command java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -u CATALOG -t ONE -e ${ENTITY_ID}"
59
echo "Executing command java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -u CATALOG -t ONE -e ${ENTITY_ID}"
60
java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -u ${TYPE} -t ONE -e ${ENTITY_ID} > ${CONTENT_LOG} 
60
java -cp ${M2_CLASSPATH}  in.shop2020.util.ContentGenerationUtility -u ${TYPE} -t ONE -e ${ENTITY_ID} > ${CONTENT_LOG} 
61
echo "======================================================="
61
echo "======================================================="
62
echo "Content generation completed"
62
echo "Content generation completed"
63
mongodump -d CONTENT -c siteContent -q {"_id":${ENTITY_ID}} -o /tmp
63
#mongodump -d CONTENT -c siteContent -q {"_id":${ENTITY_ID}} -o /tmp
64
for PROD_SERVER in $PROD_SERVERS
64
for PROD_SERVER in $PROD_SERVERS
65
do
65
do
66
	echo "Mongo restore on server ${PROD_SERVER}"
66
	echo "Mongo restore on server ${PROD_SERVER}"
67
	mongo CONTENT -host ${PROD_SERVER} --quiet --eval "db.siteContent.remove({"_id":${ENTITY_ID}})" --shell
67
	#mongo CONTENT -host ${PROD_SERVER} --quiet --eval "db.siteContent.remove({"_id":${ENTITY_ID}})" --shell
68
	mongorestore -host ${PROD_SERVER} -d CONTENT -c siteContent /tmp/CONTENT/siteContent.bson
68
	#mongorestore -host ${PROD_SERVER} -d CONTENT -c siteContent /tmp/CONTENT/siteContent.bson
69
	echo "Copying generated content to production server ${PROD_SERVER}"
69
	echo "Copying generated content to production server ${PROD_SERVER}"
70
	echo "======================================================="
70
	echo "======================================================="
71
	#Update entities on staging using the entities-shop2020 direcotry
71
	#Update entities on staging using the entities-shop2020 direcotry
72
	cd /var/lib/tomcat6/webapps/export/html
72
	cd /var/lib/tomcat6/webapps/export/html
73
	scp -r ${PROD_ENTITIES_EXPORT_PATH}/${ENTITY_ID} ${PROD_SERVER}:${ENTITIES_DEST_PATH}
73
	scp -r ${PROD_ENTITIES_EXPORT_PATH}/${ENTITY_ID} ${PROD_SERVER}:${ENTITIES_DEST_PATH}