304. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2018 8:27:03 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

304.1 Files compared

# Location File Last Modified
1 OSCIF MHED P3 Annie.zip\cms-staff-app-release-4.0.0@aff5ba84233.zip redeploy.sh Thu Feb 22 10:28:51 2018 UTC
2 OSCIF MHED P3 Annie.zip\cms-staff-app-release-4.0.0@aff5ba84233.zip redeploy.sh Wed May 9 13:07:09 2018 UTC

304.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 780
Changed 2 8
Inserted 0 0
Removed 0 0

304.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

304.4 Active regular expressions

No regular expressions were active.

304.5 Comparison detail

  1   #!/bin/sh
  2  
  3  
  4   DOMAIN_DIR =/u01/apps /oracle/mi ddleware/u ser_projec ts/domains /MobileHea lthDomain
  5  
  6   TOP_DIR=`p wd`
  7   bigLoop=1
  8   loop=1
  9  
  10   while [ $b igLoop -eq  1 ]
  11   do
  12           if  [ "X$1" ! = "X" ]; t hen
  13                    sele ction="$1" ;
  14           fi
  15  
  16           #
  17           #  Loop until  we get a  valid answ er or the  user selec ts the exi t option.
  18           #
  19           wh ile [ $loo p -eq 1 ]
  20           do
  21                    if [  "X$select ion" == "X " ]; then
  22                             echo
  23                             echo " Ready to p erform Ann ie actions ."
  24                             echo
  25                             echo " 1.  Redepl oy Everyth ing (Backe nd, Apache  config, S taff and V et UI, set  timezones )"
  26                             echo " 2.  Redepl oy the Bac kend Serve r, the Sta ff UI and  the Vetera n UI."
  27                             echo " 3.  Redepl oy just th e Backend  Server."
  28                             echo " 4.  Redepl oy just th e Staff UI ."
  29                             echo " 5.  Redepl oy just th e Veteran  UI."
  30                             echo " 6.  Redepl oy both th e Staff UI  and the V eteran UI. "
  31                             echo " 7.  Redepl oy the Apa che config  files."
  32                             echo " 8.  Redepl oy Staff &  Vet UI (d ev mode)"
  33                             echo
  34                             echo " 9.  Reset  Applicatio n Data."
  35                             echo " 10. Set VM  timezone' s to EST."
  36                             echo " 11. Take a  snapshot  of your Mo ngoDB"
  37                             echo " 12. Restor e your Mon goDB from  the last s napshot"
  38                             echo " 13. Set th e ROI flag  to preven t \"first  time\" dia logs for v ets loggin g in"
  39                             echo " 14. Point  MVI and HD R to the E C2 environ ment"
  40                             echo " 15. Point  MVI to the  EC2 envir onment and  HDR to th e local So apUI insta nce"
  41                             echo " 16. Restor e MVI and  HDR pointe rs to what  they are  in the rep ository"
  42                             echo
  43                             echo " 0. Cancel/ Exit shell  script."
  44                             echo
  45  
  46                             read - p "What ac tion would  you like  to perform ?  [defaul t is 1] "  selection
  47                             echo
  48                    fi
  49  
  50                    #
  51                    # If  the user  just hit r eturn, the n set the  selection  variable t o the defa ult value.
  52                    #
  53                    if [  "X$select ion" == "X " ]; then
  54                             select ion=1;
  55                    fi
  56  
  57                    #
  58                    # Ch eck to see  if the us er entered  a number.
  59                    #
  60                    if [  -n "$sele ction" -a  "$selectio n" -ge 0 2 > /dev/nul l ]; then
  61                             #
  62                             # Chec k to see i f the numb er is betw een 0 and  16, inclus ive.
  63                             #
  64                             if [ " $selection " -lt 0 ]  || [ "$sel ection" -g t 16 ]; th en
  65                                      echo "$s election i s an inval id selecti on!  Pleas e reenter. "
  66                                      selectio n=""
  67                                      continue
  68                             else
  69                                      loop=0
  70                             fi
  71  
  72                             #
  73                             # If t he user se lected "Ca ncel/Exit  shell scri pt", then  exit the s hell scrip t
  74                             # with  a non zer o return c ode.
  75                             #
  76                             if [ " $selection " -eq 0 ];  then
  77                                      echo "Ab orting she ll script  per user r equest."
  78                                      exit 1
  79                             fi
  80                    else
  81                             echo " $selection  is an inv alid selec tion!  Ple ase reente r."
  82                             select ion=""
  83                    fi
  84           do ne
  85  
  86           #
  87           #  This needs  to be the  first sel ection run , because  if it runs  last, it
  88           #  could rese t data tha t was set  up as part  of other  selections  that migh t also
  89           #  be run.
  90           #
  91           #  Reset Mong o Data
  92           #
  93           if  [ $select ion -eq 1  ] || [ $se lection -e q 9 ]; the n
  94                    sour ce ./reset Data.sh
  95                    if [  $? -ne 0  ]; then
  96                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  97                             exit 1 ;
  98                    fi
  99           fi
  100  
  101           #  Rebuild th e Annie CS S if eithe r the Vete ran or Sta ff UI is b eing deplo yed
  102           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 4 ]  || [ $sele ction -eq  5 ] || [ $ selection  -eq 6 ]||  [ $selecti on -eq 8 ] ; then
  103                    ./sc ripts/rebu ild_annie_ css.sh
  104              if [ $? -n e 0 ]; the n
  105                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  106                             exit 1 ;
  107                    fi
  108           fi
  109  
  110           #
  111           #  Build/pack age the ne eded backe nd and/or  frontend c ode that w ill be nee ded.
  112           #
  113           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 3 ];  then
  114                    echo  Build Ann ie Resourc es
  115                    ./gr adlew clea n build cr eateVersio nJson
  116              cp courier -resources /build/lib s/courier- resources- *.war cour ier-resour ces/build/ libs/couri er-resourc es-3.0.0.w ar
  117                    if [  $? -ne 0  ]; then
  118                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  119                             exit 1 ;
  120                    fi
  121           fi
  122  
  123           #
  124           #  build the  version.js on file fo r the fron t end.
  125           #
  126           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 4 ]  || [ $sele ction -eq  5 ] || [ $ selection  -eq 6 ]; t hen
  127                    cd $ TOP_DIR
  128                    echo  'Building  version.j son file'
  129                    ./gr adlew crea teVersionJ son
  130                    if [  $? -ne 0  ]; then
  131                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  132                             exit 1 ;
  133                    fi
  134           fi
  135  
  136           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 4 ]  || [ $sele ction -eq  6 ]; then
  137                    echo  Build Ann ie Staff W ebApp
  138                    cd M essagingAp p
  139                    grun t
  140                    if [  $? -ne 0  ]; then
  141                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  142                             exit 1 ;
  143                    fi
  144                    cd $ TOP_DIR
  145           fi
  146  
  147           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 5 ]  || [ $sele ction -eq  6 ]; then
  148                    echo  Build Ann ie Vet Web App
  149                    cd P atientApp
  150                    grun t
  151                    if [  $? -ne 0  ]; then
  152                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  153                             exit 1 ;
  154                    fi
  155                    cd $ TOP_DIR
  156           fi
  157  
  158           #
  159           #D eploy Apac he config  files to h ttpd
  160           #
  161           ## #if [ $sel ection -eq  1 ] || [  $selection  -eq 4 ] | | [ $selec tion -eq 5  ] || [ $s election - eq 6 ] ||  [ $selecti on -eq 7 ] ; then
  162           ## #  cd $TOP _DIR/infra structure/ vagrant/vi rtualbox/v amfStack
  163           ## #     echo  Copying / var/www to  /var/www2
  164           ## #     vagr ant ssh va mf_apache  --command  "sudo cp - rf  /var/w ww /var/ww w2"
  165           ## #     if [  $? -ne 0  ]; then
  166           ## #              echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  167           ## #              exit 1 ;
  168           ## #     fi
  169           ## #  cd $TOP _DIR
  170           ## #fi
  171  
  172           if  [ $select ion -eq 1  ] || [ $se lection -e q 7 ]; the n
  173              cd $TOP_DI R/infrastr ucture/vag rant/virtu albox/vamf Stack
  174                    echo
  175                    echo  'Deployin g Apache C onfigurati on Files'
  176                    vagr ant ssh va mf_apache  --command  "sudo cp - rf /cms-pr oject/scri pts/apache /staff_htt pd.conf /e tc/httpd2/ conf/httpd .conf && s udo /etc/i nit.d/http d2 restart "
  177                    if [  $? -ne 0  ]; then
  178                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  179                             exit 1 ;
  180                    fi
  181                    vagr ant ssh va mf_apache  --command  "sudo cp - rf /cms-pr oject/scri pts/apache /vet_httpd .conf /etc /httpd/con f/httpd.co nf && sudo  /etc/init .d/httpd r estart"
  182                    if [  $? -ne 0  ]; then
  183                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  184                             exit 1 ;
  185                    fi
  186              cd $TOP_DI R
  187           fi
  188  
  189  
  190           #
  191           #  Deploy the  Staff UI.
  192           #
  193           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 4 ]  || [ $sele ction -eq  6 ]; then
  194              cd $TOP_DI R/infrastr ucture/vag rant/virtu albox/vamf Stack
  195                    echo  'Deployin g the Staf f UI'
  196                    vagr ant ssh va mf_apache  --command  "sudo rm - rf /var/ww w2/html/an nie-provid er-v3 && s udo chmod  -R 777 /va r/www2/ &&  cp -Rf /s rv/webapps /annie-pro vider/dist / /var/www 2/html/ann ie-provide r-v3"
  197                    if [  $? -ne 0  ]; then
  198                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  199                             exit 1 ;
  200              cd $TOP_DI R
  201                    fi
  202           fi
  203  
  204           #
  205           #  Deploy the  Veteran U I.
  206           #
  207           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 5 ]  || [ $sele ction -eq  6 ]; then
  208              cd $TOP_DI R/infrastr ucture/vag rant/virtu albox/vamf Stack
  209                    echo  'Deployin g the Vete ran UI'
  210                    vagr ant ssh va mf_apache  --command  "sudo rm - rf /var/ww w/html/ann ie-vet-v3  && sudo ch mod -R 777  /var/www/  && sudo c p -rf /srv /webapps/a nnie-vet/d ist/ /var/ www/html/a nnie-vet-v 3"
  211                    if [  $? -ne 0  ]; then
  212                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  213                             exit 1 ;
  214                    fi
  215              cd $TOP_DI R
  216           fi
  217  
  218           #
  219           #D eploy Back end Server  and Vet &  Staff pro perty file s to WebLo gic, then  set Server Start clas spath
  220           #
  221           if  [ $select ion -eq 1  ] || [ $se lection -e q 2 ] || [  $selectio n -eq 3 ];  then
  222              cd $TOP_DI R/infrastr ucture/vag rant/virtu albox/vamf Stack
  223                    echo
  224                    echo  'copy Sta ff Propert ies file'
  225                    vagr ant ssh va mf_weblogi c --comman d "cp -rf  /cms-proje ct/scripts /weblogic/ annie.staf flocal.pro perties $D OMAIN_DIR/ cms/cmscon fig/annie3 .propertie s"
  226                    if [  $? -ne 0  ]; then
  227                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  228                             exit 1 ;
  229                    fi
  230                    vagr ant ssh va mf_weblogi c --comman d "cp -rf  /cms-proje ct/scripts /mongodb/m ongodb.pro perties $D OMAIN_DIR/ haconfig/s pring/prop erties/"
  231                    if [  $? -ne 0  ]; then
  232                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  233                             exit 1 ;
  234                    fi
  235                    vagr ant ssh va mf_weblogi c --comman d "cp -rf  /cms-proje ct/scripts /mongodb/m ongo.prope rties $DOM AIN_DIR/ha config/spr ing/proper ties/"
  236                    if [  $? -ne 0  ]; then
  237                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  238                             exit 1 ;
  239                    fi
  240                    echo
  241  
  242                    echo  'copy Vet  Propertie s file'
  243                    vagr ant ssh va mf_weblogi c --comman d "cp -rf  /cms-proje ct/scripts /weblogic/ annie.vetl ocal.prope rties $DOM AIN_DIR/ve t/cmsconfi g/annie3.p roperties"
  244                    if [  $? -ne 0  ]; then
  245                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  246                             exit 1 ;
  247                    fi
  248                    echo
  249                    echo  'Setting  ClassPath'
  250                    vagr ant ssh va mf_weblogi c --comman d "/cms-pr oject/scri pts/weblog ic/ctlvamf wlcluster. sh"
  251                    if [  $? -ne 0  ]; then
  252                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  253                             exit 1 ;
  254                    fi
  255                    echo
  256  
  257                    echo  'Waiting  for Weblog ic to resp ond...'
  258                    vagr ant ssh va mf_weblogi c --comman d "while n etstat -ln t | awk '\ $4 ~ /:600 1\$/ {exit  1}'; do s leep 10; d one"
  259                    if [  $? -ne 0  ]; then
  260                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  261                             exit 1 ;
  262                    fi
  263                    #Dep loy Annie  WAR to Web Logic Clus ter
  264                    echo
  265  
  266                    echo  'Deployin g to Weblo gic...'
  267                     vagrant ss h vamf_web logic --co mmand "sou rce /u01/a pps/oracle /middlewar e/wlserver _10.3/serv er/bin/set WLSEnv.sh  && java we blogic.Dep loyer -adm inurl t3:/ / IP                -username  weblogic - password w eblogic1 - name couri er-resourc es-3 -unde ploy -targ ets Mobile HealthClus terStaff"
  268                     vagrant ss h vamf_web logic --co mmand "sou rce /u01/a pps/oracle /middlewar e/wlserver _10.3/serv er/bin/set WLSEnv.sh  && java we blogic.Dep loyer -adm inurl t3:/ / IP                -username  weblogic - password w eblogic1 - name couri er-resourc es-3 -depl oy -source  /cms-proj ect/courie r-resource s/build/li bs/courier -resources -3.0.0.war  -targets  MobileHeal thClusterS taff"
  269                    if [  $? -ne 0  ]; then
  270                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  271                             exit 1 ;
  272                    fi
  273  
  274                     vagrant ss h vamf_web logic --co mmand "sou rce /u01/a pps/oracle /middlewar e/wlserver _10.3/serv er/bin/set WLSEnv.sh  && java we blogic.Dep loyer -adm inurl t3:/ / IP                -username  weblogic - password w eblogic1 - name couri er-resourc es-3 -unde ploy -targ ets Mobile HealthClus terVet"
  275                     vagrant ss h vamf_web logic --co mmand "sou rce /u01/a pps/oracle /middlewar e/wlserver _10.3/serv er/bin/set WLSEnv.sh  && java we blogic.Dep loyer -adm inurl t3:/ / IP                -username  weblogic - password w eblogic1 - name couri er-resourc es-3 -depl oy -source  /cms-proj ect/courie r-resource s/build/li bs/courier -resources -3.0.0.war  -targets  MobileHeal thClusterV et"
  276                    if [  $? -ne 0  ]; then
  277                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  278                             exit 1 ;
  279                    fi
  280                    vagr ant status
  281              cd $TOP_DI R
  282           fi
  283  
  284  
  285           if  [ $select ion -eq 1  ] || [ $se lection -e q 10 ]; th en
  286              cd $TOP_DI R/infrastr ucture/vag rant/virtu albox/vamf Stack
  287                    echo
  288                    echo  'Setting  VM timezon es to EST'
  289                    vagr ant ssh va mf_apache  --command  "sudo /cms -project/s cripts/set TimezoneTo EST.sh"
  290                    if [  $? -ne 0  ]; then
  291                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  292                             exit 1 ;
  293                    fi
  294                    vagr ant ssh va mf_weblogi c --comman d "sudo /c ms-project /scripts/s etTimezone ToEST.sh"
  295                    if [  $? -ne 0  ]; then
  296                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  297                             exit 1 ;
  298                    fi
  299                    vagr ant ssh va mf_mongo - -command " sudo /cms- project/sc ripts/setT imezoneToE ST.sh"
  300                    if [  $? -ne 0  ]; then
  301                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  302                             exit 1 ;
  303                    fi
  304                    vagr ant ssh va mf_oracle  --command  "sudo /cms -project/s cripts/set TimezoneTo EST.sh"
  305                    if [  $? -ne 0  ]; then
  306                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  307                             exit 1 ;
  308                    fi
  309              cd $TOP_DI R
  310           fi
  311  
  312           if  [ $select ion -eq 11  ]; then
  313                    ./sc ripts/mong odb/snapsh otMongo.sh
  314           fi
  315  
  316           if  [ $select ion -eq 12  ]; then
  317                    ./sc ripts/mong odb/restor eMongoSnap shot.sh
  318           fi
  319  
  320           if  [ $select ion -eq 8  ]; then
  321                    echo  Build Ann ie Staff W ebApp
  322                    cd $ TOP_DIR/Me ssagingApp
  323                    grun t dev
  324                    if [  $? -ne 0  ]; then
  325                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  326                             exit 1 ;
  327                    fi
  328  
  329                    echo  Build Ann ie Vet Web App
  330                    cd $ TOP_DIR/Pa tientApp
  331                    grun t dev
  332                    if [  $? -ne 0  ]; then
  333                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  334                             exit 1 ;
  335                    fi
  336  
  337                    cd $ TOP_DIR/in frastructu re/vagrant /virtualbo x/vamfStac k
  338                    echo  Copying / var/www to  /var/www2
  339                    vagr ant ssh va mf_apache  --command  "sudo cp - rf  /var/w ww /var/ww w2"
  340                    if [  $? -ne 0  ]; then
  341                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  342                             exit 1 ;
  343                    fi
  344  
  345                    echo  'Deployin g the Staf f UI'
  346                    vagr ant ssh va mf_apache  --command  "sudo rm - rf /var/ww w2/html/an nie-provid er-v3 && s udo chmod  -R 777 /va r/www2/ &&  cp -Rf /s rv/webapps /annie-pro vider/app/  /var/www2 /html/anni e-provider -v3"
  347                    if [  $? -ne 0  ]; then
  348                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  349                             exit 1 ;
  350                    fi
  351  
  352                    echo  'Deployin g the Vete ran UI'
  353                    vagr ant ssh va mf_apache  --command  "sudo rm - rf /var/ww w/html/ann ie-vet-v3  && sudo ch mod -R 777  /var/www/  && sudo c p -rf /srv /webapps/a nnie-vet/a pp/ /var/w ww/html/an nie-vet-v3 "
  354                    if [  $? -ne 0  ]; then
  355                             echo " ERROR:  re deploy.sh  failed.  S ee output  for detail s."
  356                             exit 1 ;
  357                    fi
  358  
  359                    cd $ TOP_DIR
  360           fi
  361  
  362           if  [ $select ion -eq 13  ]; then
  363                    ./se tRoi.sh
  364           fi
  365  
  366           if  [ $select ion -eq 14  ]; then
  367                    ./sc ripts/util /setupEc2M ocks.sh
  368           fi
  369  
  370           if  [ $select ion -eq 15  ]; then
  371                    ./sc ripts/util /setupCmsM ocks.sh
  372           fi
  373  
  374           if  [ $select ion -eq 16  ]; then
  375                    ./sc ripts/util /cleanupCm sTree.sh
  376           fi
  377  
  378           #
  379           #  Shift the  command li ne argumen ts left by  one, drop ping the l ead argume nt (that w e just pro cessed.
  380           #  If there a re no more  arguments , exit.
  381           #
  382           se lection="" ;
  383           lo op=1;
  384           if  [ $# -gt  0 ]; then
  385                    shif t 1
  386                    if [  $# -eq 0  ]; then
  387                             exit 0 ;
  388                    fi
  389           el se
  390                    echo
  391                    echo  "=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=-=-=-=- =-=-=-=-=- ="
  392                    echo
  393           fi
  394   done