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

282.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 installDocker.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 installDocker.sh Wed Apr 17 22:10:37 2019 UTC

282.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 340
Changed 2 6
Inserted 0 0
Removed 0 0

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

282.4 Active regular expressions

No regular expressions were active.

282.5 Comparison detail

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