283. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/18/2019 5:55:27 PM Eastern 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.

283.1 Files compared

# Location File Last Modified
1 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_DevOps\mccf_devops\scripts\shell installElasticSearch.sh Wed Apr 3 02:27:18 2019 UTC
2 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_DevOps\mccf_devops\scripts\shell installElasticSearch.sh Tue Apr 16 15:27:28 2019 UTC

283.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 418
Changed 1 2
Inserted 0 0
Removed 0 0

283.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

283.4 Active regular expressions

No regular expressions were active.

283.5 Comparison detail

  1   #! /bin/ba sh
  2   #
  3   #set -x
  4  
  5   scriptname =${0}
  6   scriptBase ="$( cd "$ ( dirname  "$scriptna me" )";  p wd)"
  7   VAULTPASS_ PATH="~/.v ault_pass"
  8   REPO_FILE= "elasticse arch-requi rements.ym l"
  9   ROOT_DIR=" $( cd ../. .;  pwd)"
  10   TIMESTAMP= `date "+%Y %m%d_%H%M% S"`
  11   LOG_DIR="$ {ROOT_DIR} /logs"
  12   LOGFILE="$ {LOG_DIR}/ elasticsea rchInstall _${TIMESTA MP}.log"
  13   playbooks= ("install- elasticsea rch.yml")
  14   function u sage() {
  15     echo "us age: $scri ptname -e  ENV -h HOS TS -n node _name"
  16     echo "       where  ENV = AWS_ DEV | MAG_ ALL | MAG_ CI | MAG_C IT | MAG_D EV | MAG_S QA | MAG_U AT | local "
  17     echo "       where  HOSTS = we bserver |  appserver  | dbserver  | lbserve r"
  18     echo "       where  $node_name  = node na me, exampl e node1"
  19     echo "op tional arg uments: "
  20     echo "   -u|--user  Bitbucket  Username"
  21     echo "   -p|--pass  Bitbucket  Password"
  22     echo "   -l|--logfi le logfile "
  23     echo "   -c|--nocol or (for no color)]"
  24     exit 1
  25   }
  26  
  27   # ReadArgs  reads the  command l ine argume nts passed  to it
  28   # and popu lates shel l variable s accordin gly
  29   ReadArgs()  {
  30     LOGTXT " Entered Re adArg"
  31     while [[  $# -gt 0  ]] ; do
  32       key="$ 1"
  33       case $ key in
  34         -c |  --nocolor  )
  35               UseColor= No
  36               CLEAR=""
  37               COL60=""
  38               NORMAL=""
  39               WHITE=""
  40               GREEN=""
  41               RED=""
  42               YELLOW=""
  43               BLUE=""
  44               shift # p ast argume nt
  45               LOGTXT "P rocessing  without co lor"
  46               ;;
  47         -l |  --logfile  )
  48               if [[ $#  -ge 2 ]] ;  then
  49                 LOGFILE ="$2"
  50               else
  51                 DEBUG " $1 argumen t requires  another a rgument af ter it"
  52                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  53                 exit 9
  54               fi
  55               LOGTXT "U sing LogFi le $LOGFIL E instead"
  56               # DEBUG   "Log outpu t redirect ed to $LOG FILE"
  57               shift # p ast argume nt
  58               shift # p ast logfil e entry
  59              ;;
  60         -u |  --user )
  61               if [[ $#  -ge 2 ]] ;  then
  62                 USERNAM E="$2"
  63               else
  64                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  65                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  66                 exit 9
  67               fi
  68               LOGTXT "U SERNAME: $ USERNAME "
  69               # DEBUG   "USERNAME:  $USERNAME  "
  70               shift # p ast argume nt
  71               shift # p ast fqdn e ntry
  72               ;;
  73         -p |  --pass )
  74               if [[ $#  -ge 2 ]] ;  then
  75                 PASSWD= "$2"
  76               else
  77                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  78                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  79                 exit 9
  80               fi
  81               LOGTXT "U sing suppl ied passwo rd "
  82               # DEBUG   "Using sup plied pass word $PASS WD "
  83               shift # p ast argume nt
  84               shift # p ast fqdn e ntry
  85               ;;
  86         -s |  --skiprol es )
  87               skiproles ="true"
  88               LOGTXT "s kiproles:  $skiproles , not coll ecting rol es from mc cf BB repo s"
  89               DEBUG "sk iproles: $ skiproles,  not colle cting role s from mcc f BB repos "
  90               shift # p ast argume nt
  91               ;;
  92         -e |  --env )
  93               if [[ $#  -ge 2 ]] ;  then
  94                 ENV="$2 "
  95               else
  96                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  97                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  98                 exit 9
  99               fi
  100               LOGTXT "E nvironment : $ENV"
  101               # DEBUG   "Environme nt $ENV"
  102               shift # p ast argume nt
  103               shift # p ast fqdn e ntry
  104               ;;
  105         -h |  --hosts )
  106               if [[ $#  -ge 2 ]] ;  then
  107                 HOSTS=" $2"
  108               else
  109                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  110                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  111                 exit 9
  112               fi
  113               LOGTXT "H OSTS: $HOS TS"
  114               # DEBUG   "HOSTS $HO STS"
  115               shift # p ast argume nt
  116               shift # p ast fqdn e ntry
  117               ;;
  118         -n |  --nodenam e )
  119               if [[ $#  -ge 2 ]] ;  then
  120                 node_na me="$2"
  121               else
  122                 DEBUG " argument $ 1 requires  another a rgument af ter it"
  123                 LOGTXT  "Error in  $1 argumen t (no next  argument  provided)"
  124                 exit 9
  125               fi
  126               LOGTXT "n ode_name:  $node_name "
  127               # DEBUG   "node_name  $node_nam e"
  128               shift # p ast argume nt
  129               shift # p ast fqdn e ntry
  130               ;;
  131         * )   DEBUG "$1  is not a  valid argu ment"
  132               LOGTXT "$ 1 is not a  valid arg ument"
  133               exit 9
  134               ;;
  135       esac
  136     done
  137     LOGTXT " Exited Rea dArgs"
  138   }
  139  
  140   #source th e commonfu nctions
  141   . "$script Base/commo nfunctions .sh"
  142  
  143   ReadArgs $ *
  144  
  145   DEBUG "scr iptBase: $ {scriptBas e}"
  146   DEBUG "ROO T_DIR: ${R OOT_DIR}"
  147   DEBUG "log ging to: $ {LOGFILE}"
  148   DEBUG "vau lt pass pa th: ${VAUL TPASS_PATH }"
  149  
  150   DEBUG "Che ck if log  directory  exists and  if not, c reate it"
  151   if [[ ! -d  ${LOG_DIR } ]]; then
  152     mkdir -Z  ${LOG_DIR }
  153   fi
  154  
  155   DEBUG "Ver ify ENV wa s provided "
  156   if [[ -z " ${ENV}" ]] ; then
  157     DEBUG "E NV require d"
  158     usage
  159   else
  160     DEBUG "o perating o n ENV ${EN V}"
  161   fi
  162  
  163   DEBUG "Ver ify HOSTS  was provid ed"
  164   if [[ -z " ${HOSTS}"  ]]; then
  165     DEBUG "H OSTS requi red"
  166     usage
  167   else
  168     DEBUG "o perating o n HOSTS ${ HOSTS}"
  169   fi
  170  
  171   DEBUG "Ver ify node_n ame was pr ovided"
  172   if [[ -z " ${node_nam e}" ]]; th en
  173     DEBUG "n ode_name r equired"
  174     usage
  175   else
  176     DEBUG "i nstalling  on node_na me ${node_ name}"
  177   fi
  178   ansibleExt raVars="va r_hosts=${ HOSTS}, no de_name=${ node_name} "
  179  
  180   if is_true  "$skiprol es" ; then
  181     DEBUG "s kiproles s pecified,  no need to  install r oles"
  182   else
  183     DEBUG "I nstall rol es from ${ REPO_FILE} "
  184     getMCCFR oles ${REP O_FILE}
  185   fi
  186  
  187   DEBUG "Sta rting to p rocess pla ybooks on  ${HOSTS} f or $ENV en vironment  with vars:  ${ansible ExtraVars} "
  188  
  189   for item i n "${playb ooks[@]}"
  190   do
  191     playBook =${item}
  192     LOGTXT " execute pl aybook ${p layBook} f or ${ENV}  ${ansibleE xtraVars}"
  193     runAnsib lePlaybook  ${playBoo k}
  194     rtnCode= $?
  195     DEBUG "r tnCode fro m running  ansible pl aybook is  ${rtnCode} "
  196     if [[ $r tnCode -eq  0 ]]
  197     then
  198       DEBUG  "${playBoo k} complet ed success fully"
  199       LOGTXT  "${playBo ok} comple ted succes sfully for  ${ENV} on  ${HOSTS}"
  200     else
  201       DEBUG  "${playBoo k} failed:  returned:  ${rtnCode }"
  202       LOGTXT  "${playBo ok} failed : returned : ${rtnCod e}"
  203     fi
  204     exit $rt nCode
  205   done
  206  
  207   # CONTACT  INFO
  208   CONTACT="L ee Benhart PII  or  DNS . URL "
  209  
  210   exit