Skip to content

Commit

Permalink
Fix deployment dir mount path
Browse files Browse the repository at this point in the history
  • Loading branch information
msmshariq authored and KavinduZoysa committed Dec 10, 2018
1 parent dbba2a2 commit b747ed5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions pattern-2/bosh-release/config/blobs.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
mysqldriver/mysql-connector-java-5.1.46-bin.jar:
size: 1004840
object_id: e2f42d3c-9159-4993-53d1-a27db275107e
object_id: 0a7c82a6-c76d-4670-4f1e-158a88562956
sha: 0a22bced42a2f076aaa17feee67fc6b998cfd4f9
openjdk/jdk-8u202-ea-bin-b03-linux-x64-07_nov_2018.tar.gz:
size: 139097684
object_id: aaadbff7-003e-46e6-584d-e82c207b6939
object_id: cb15cef2-fcd1-42a2-740a-af8e6d4fef06
sha: 43df5d55fff80327cc83680cda6170f33308883c
wso2am/wso2am-2.6.0.zip:
size: 437096938
object_id: 5b410f1d-d4e2-4751-4400-96064fecceb9
object_id: 43ce4312-d8b6-4c8c-5ff8-5f0bb9bf7265
sha: 721c82e0a54ab1dc878b19db6654a3db24837109
wso2am_analytics/wso2am-analytics-2.6.0.zip:
size: 174219759
object_id: cfd712f6-92f5-4f3b-455e-7f6ffef30fa8
object_id: 3bb62e85-8cea-4d0a-6200-4aaa11619995
sha: 58f7b9013efb0b76721b6b171613ae72f8a51897
2 changes: 1 addition & 1 deletion pattern-2/bosh-release/jobs/nfs_server/templates/ctl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pid_file=${run_dir}/pid
mkdir -p ${run_dir} ${log_dir}
chown -R vcap:vcap ${run_dir} ${log_dir}

export NFS_EXPORT_SERVER_DIR=/mnt/nfs-export/wso2am/deployment/server
export NFS_EXPORT_SERVER_DIR=/mnt/nfs-export/wso2am/deployment-server
export NFS_EXPORT_TENANTS_DIR=/mnt/nfs-export/wso2am/tenants

export DEBUG_LOG=${log_dir}/nfs_server.log
Expand Down
12 changes: 6 additions & 6 deletions pattern-2/bosh-release/jobs/wso2apim/templates/ctl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export JAVA_OPTS=" -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:MaxPermSize=${MAX_PERMG

export DEBUG_LOG=${log_dir}/wso2apim.log

export NFS_EXPORT_SERVER_DIR=/mnt/nfs-export/wso2am/repository/deployment/server
export NFS_EXPORT_SERVER_DIR=/mnt/nfs-export/wso2am/deployment-server

export NFS_SHARE_SERVER_DIR=/mnt/nfs-share/wso2am/repository/deployment/server/jaggeryapps
export NFS_SHARE_SERVER_DIR=/mnt/nfs-share/wso2am/repository/deployment/server

touch $DEBUG_LOG
chmod -R 755 /var/vcap/sys
Expand Down Expand Up @@ -98,15 +98,15 @@ case $1 in
cp /var/vcap/packages/mysqldriver/* ${WSO2_APIM_HOME}/repository/components/lib/

mkdir /tmp/wso2am
mv $WSO2_APIM_HOME/repository/deployment/server/jaggeryapps/ /tmp/wso2am
mv $WSO2_APIM_HOME/repository/deployment/server/ /tmp/wso2am

mount -t nfs <%= link("nfs-server").instances[0].address %>:${NFS_EXPORT_SERVER_DIR}/jaggeryapps ${NFS_SHARE_SERVER_DIR}
mount -t nfs <%= link("nfs-server").instances[0].address %>:${NFS_EXPORT_SERVER_DIR} ${NFS_SHARE_SERVER_DIR}

if [ -z "$(ls -A ${NFS_SHARE_SERVER_DIR})" ]; then
cp -Tr /tmp/wso2am/repository/deployment/server/jaggeryapps/ ${NFS_SHARE_SERVER_DIR}/
cp -r /tmp/wso2am/server/* ${NFS_SHARE_SERVER_DIR}
fi

ln -s ${NFS_SHARE_SERVER_DIR} $WSO2_APIM_HOME/repository/deployment/server/jaggeryapps
ln -s ${NFS_SHARE_SERVER_DIR} $WSO2_APIM_HOME/repository/deployment/

$WSO2_APIM_HOME/bin/wso2server.sh start

Expand Down

0 comments on commit b747ed5

Please sign in to comment.