(List (FunctionDef echoOK [] (List (= scope= flags=0 words=[] bindings=[('TC', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('RegB', {[DQ [VarSub TC][LIT_CHARS 0m]]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub 1]]} {[LIT_CHARS -eq]} {[DQ [LIT_CHARS 0]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (= scope= flags=0 words=[] bindings=[('Green', {[DQ [VarSub TC][LIT_CHARS 32m]]})]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "["][VarSub Green][LIT_CHARS OK][VarSub RegB][LIT_CHARS "]"]]} ) ) (ElseTrue) (List (= scope= flags=0 words=[] bindings=[('Red', {[DQ [VarSub TC][LIT_CHARS 31m]]})]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "["][VarSub Red][LIT_CHARS FAIL][VarSub RegB][LIT_CHARS "]"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Check log file."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef usage [] (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Usage options: [--logfile ]"]]} ) ) (= scope= flags=0 words=[] bindings=[('logfile', {[LIT_CHARS /dev/null]})]) (While (DBracket {B2 BINARY_STRING_GREAT {[VarSub #]} {[LIT_CHARS 0]}}) (List (= scope= flags=0 words=[] bindings=[('key', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS shift]} ) (Case to_match={[VarSub key]}, pat_word_list=[[{[LIT_CHARS -l]}, {[LIT_CHARS --logfile]}], [{[LIT_OTHER "*"]}]] (List (= scope= flags=0 words=[] bindings=[('logfile', {[DQ [VarSub 1]]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub logfile]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ ]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS usage]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS shift]} ) ) (List (Com {[LIT_CHARS usage]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})] [LIT_CHARS /../..]})]) (Com {[LIT_CHARS cd]} {[DQ [VarSub KUBE_ROOT]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS All]} {[LIT_CHARS verbose]} {[LIT_CHARS output]} {[LIT_CHARS will]} {[LIT_CHARS be]} {[LIT_CHARS redirected]} {[LIT_CHARS to]} {[VarSub logfile] [LIT_COMMA ","]} {[LIT_CHARS use]} {[LIT_CHARS --logfile]} {[LIT_CHARS option]} {[LIT_CHARS to]} {[LIT_CHARS change.]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Start the cluster with 2 nodes .. "]]} ) (= scope= flags=1 words=[] bindings=[('NUM_NODES', {[LIT_CHARS 2]})]) (= scope= flags=1 words=[] bindings=[('KUBERNETES_PROVIDER', {[LIT_CHARS vagrant]})]) (AndOr OP_OR_IF (Subshell (Com {[LIT_CHARS cluster/kube-up.sh]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (Com {[LIT_CHARS true]} ) ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Check if node-1 can reach kubernetes master .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-1]} {[LIT_CHARS --]} {[LIT_CHARS ping]} {[LIT_CHARS -c]} {[LIT_CHARS 10]} {[LIT_CHARS kubernetes-master]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Check if node-2 can reach kubernetes master .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-2]} {[LIT_CHARS --]} {[LIT_CHARS ping]} {[LIT_CHARS -c]} {[LIT_CHARS 10]} {[LIT_CHARS kubernetes-master]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Pull an image that runs a web server on node-1 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-1]} {[LIT_CHARS --]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Pull an image that runs a web server on node-2 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-2]} {[LIT_CHARS --]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Run the server on node-1 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-1]} {[LIT_CHARS --]} {[LIT_CHARS sudo]} {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS -d]} {[LIT_CHARS kubernetes/serve_hostname]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Run the server on node-2 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-2]} {[LIT_CHARS --]} {[LIT_CHARS sudo]} {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS -d]} {[LIT_CHARS kubernetes/serve_hostname]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Run ping from node-1 to docker bridges and to the containers on both nodes .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-1]} {[LIT_CHARS --]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Same pinch from node-2 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-2]} {[LIT_CHARS --]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "tcp check, curl to both the running webservers from node-1 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-1]} {[LIT_CHARS --]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "tcp check, curl to both the running webservers from node-2 .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS ssh]} {[LIT_CHARS node-2]} {[LIT_CHARS --]} {[SQ ]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "All good, destroy the cluster .. "]]} ) (Com {[LIT_CHARS vagrant]} {[LIT_CHARS destroy]} {[LIT_CHARS -f]} < (FilenameRedirectNode filename={[DQ [VarSub logfile]]} >"> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echoOK]} {[VarSub ?]} ) )