Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.98 KB | None | 0 0
  1. ##The installer is intended on targeting a UAT environment by default. The base installer is setup for prod environment by default.
  2. ##If the target environment is not a UAT environment, please make the proper changes to the variables just below this comment.
  3.  
  4. #Base configuration variables.
  5. ENVIRONMENT_TYPE "UAT"
  6. BASE_FILESTORE_DIR="/data01/rn9001/uat/filestore";
  7. BASE_WORK_DIR="/data01/rn9001/uat/edge_work";
  8. APPLICATION_DIR_NAME="one-plt-9.1.241860-edge";
  9. BASE_JDK_DIR="/usr/java/latest";
  10.  
  11. #PLT Global param configuration variables. WARNING: The following will fail if data contains comma or backslash. Please handle manually if that is the case.
  12. PLT_URL="http://10.3.6.175:8080";
  13. PLT_VC_NAME="TransportationValueChain";
  14. PLT_USER="FGIIntegAdmin";
  15. PLT_PASSWORD="password";
  16. SAFEWAY_USER="SafewayIntegAdmin";
  17. SAFEWAY_PASSWORD="password";
  18. PLT_ROLE="TransportationValueChainAdmin";
  19.  
  20.  
  21.  
  22.  
  23. echo "Beginning installation...";
  24. cd /one/EDGE;
  25.  
  26. ##Obtain the base installer & hotpatches. Apply into the /one/EDGE.
  27. echo "Retrieving installer...";
  28. cp /net/nfs-installers-dca-176/installers/rn9001/prod/edge-install/edge-base-install.zip /one/EDGE;
  29. unzip edge-base-install.zip;
  30. cp -r /net/nfs-installers-dca-176/installers/rn9001/prod/edge-install/hotpatch/* /one/EDGE/one-plt-9.1.241860-edge/;
  31.  
  32. ##Create the symlinks needed as defined above by base directories.
  33. echo "Applying symlinks..."
  34. ln -sfn $BASE_FILESTORE_DIR /one/EDGE/filestore;
  35. ln -sfn $BASE_WORK_DIR /one/EDGE/edge_work;
  36. ln -sfn /one/EDGE/edge_work /one/EDGE/work;
  37. ln -sfn $BASE_JDK_DIR /one/EDGE/jdk;
  38. ln -sfn /one/EDGE/$APPLICATION_DIR_NAME /one/EDGE/edge_latest;
  39. ln -sfn /one/EDGE/edge_latest /one/EDGE/latest;
  40.  
  41. ##Enable proper security & readability for known issue documents.
  42. echo "Enabling proper document security & unix readability..."
  43. chmod -R 777 /one/EDGE/scripts;
  44. chmod -R 777 /one/EDGE/wrapper;
  45. chmod -R 777 /one/EDGE/bin;
  46. 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.
  47. dos2unix /one/EDGE/latest/queuedb.script; #Needed, the queuedb.script was cleaned and rezipped in Windows environment.
  48.  
  49. ##Migrate target documents for environment specific configurations.
  50. echo "Migrating documents for $ENVIRONMENT_TYPE environemnt...";
  51. sed -i "s/EDGE_ENV=PROD/EDGE_ENV=$ENVIRONMENT_TYPE/g" /one/EDGE/scripts/edge_constants.sh; #Handle script environment configuration setting.
  52. 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.
  53. 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.
  54. 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.
  55. 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.
  56. 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.
  57. 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.
  58. 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.
  59.  
  60. #Installation Finished, ouput basic reminder the user will realistally see.
  61. echo "--EDGE Installation Finished for environment $ENVIRONMENT_TYPE.";
  62. echo '--NOTICE: Execute the edge.sh start command within /one/EDGE/bin to start application.';
  63. echo '--NOTICE: Do not forget to migrate Con-Job.';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement