Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##The installer is intended on targeting a UAT environment by default. The base installer is setup for prod environment by default.
- ##If the target environment is not a UAT environment, please make the proper changes to the variables just below this comment.
- #Base configuration variables.
- ENVIRONMENT_TYPE "UAT"
- BASE_FILESTORE_DIR="/data01/rn9001/uat/filestore";
- BASE_WORK_DIR="/data01/rn9001/uat/edge_work";
- APPLICATION_DIR_NAME="one-plt-9.1.241860-edge";
- BASE_JDK_DIR="/usr/java/latest";
- #PLT Global param configuration variables. WARNING: The following will fail if data contains comma or backslash. Please handle manually if that is the case.
- PLT_URL="http://10.3.6.175:8080";
- PLT_VC_NAME="TransportationValueChain";
- PLT_USER="FGIIntegAdmin";
- PLT_PASSWORD="password";
- SAFEWAY_USER="SafewayIntegAdmin";
- SAFEWAY_PASSWORD="password";
- PLT_ROLE="TransportationValueChainAdmin";
- echo "Beginning installation...";
- cd /one/EDGE;
- ##Obtain the base installer & hotpatches. Apply into the /one/EDGE.
- echo "Retrieving installer...";
- cp /net/nfs-installers-dca-176/installers/rn9001/prod/edge-install/edge-base-install.zip /one/EDGE;
- unzip edge-base-install.zip;
- cp -r /net/nfs-installers-dca-176/installers/rn9001/prod/edge-install/hotpatch/* /one/EDGE/one-plt-9.1.241860-edge/;
- ##Create the symlinks needed as defined above by base directories.
- echo "Applying symlinks..."
- ln -sfn $BASE_FILESTORE_DIR /one/EDGE/filestore;
- ln -sfn $BASE_WORK_DIR /one/EDGE/edge_work;
- ln -sfn /one/EDGE/edge_work /one/EDGE/work;
- ln -sfn $BASE_JDK_DIR /one/EDGE/jdk;
- ln -sfn /one/EDGE/$APPLICATION_DIR_NAME /one/EDGE/edge_latest;
- ln -sfn /one/EDGE/edge_latest /one/EDGE/latest;
- ##Enable proper security & readability for known issue documents.
- echo "Enabling proper document security & unix readability..."
- chmod -R 777 /one/EDGE/scripts;
- chmod -R 777 /one/EDGE/wrapper;
- chmod -R 777 /one/EDGE/bin;
- find /one/EDGE/scripts -type f -print0 | xargs -0 dos2unix; #Maybe not needed, although there have been issues with scripts not being converted, just to be safe.
- dos2unix /one/EDGE/latest/queuedb.script; #Needed, the queuedb.script was cleaned and rezipped in Windows environment.
- ##Migrate target documents for environment specific configurations.
- echo "Migrating documents for $ENVIRONMENT_TYPE environemnt...";
- sed -i "s/EDGE_ENV=PROD/EDGE_ENV=$ENVIRONMENT_TYPE/g" /one/EDGE/scripts/edge_constants.sh; #Handle script environment configuration setting.
- sed -i "s,\"PLT_URL\" value=\"http://ln-integ.elogex.com:8080\",\"PLT_URL\" value=\"$PLT_URL\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle replace the targeting PLT_URL.
- sed -i "s,\"PLT_VC_NAME\" value=\"TransportationValueChain\",\"PLT_VC_NAME\" value=\"$PLT_VC_NAME\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle replace the targeting PLT_VC_NAME.
- sed -i "s,\"PLT_USER\" value=\"FGIIntegAdmin\",\"PLT_USER\" value=\"$PLT_USER\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle replace the targeting PLT_USER.
- sed -i "s,\"PLT_PASSWORD\" value=\"4Me2Know!\",\"PLT_PASSWORD\" value=\"$PLT_PASSWORD\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle replace the targeting PLT_PASSWORD.
- sed -i "s,\"SAFEWAY_USER\" value=\"SafewayIntegAdmin\",\"SAFEWAY_USER\" value=\"$SAFEWAY_USER\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle repalce the targeting SAFEWAY_USER.
- sed -i "s,\"SAFEWAY_PASSWORD\" value=\"4Me2Know!\",\"SAFEWAY_PASSWORD\" value=\"$SAFEWAY_PASSWORD\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle replace the targeting SAFEWAY_PASSWORD.
- sed -i "s,\"PLT_ROLE\" value=\"TransportationValueChainAdmin\",\"PLT_ROLE\" value=\"$PLT_ROLE\",g" /one/EDGE/latest/cfg/data-agent-config.xml; #Handle replace the targeting PLT_ROLE.
- #Installation Finished, ouput basic reminder the user will realistally see.
- echo "--EDGE Installation Finished for environment $ENVIRONMENT_TYPE.";
- echo '--NOTICE: Execute the edge.sh start command within /one/EDGE/bin to start application.';
- echo '--NOTICE: Do not forget to migrate Con-Job.';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement