(List (Com {[LIT_CHARS set]} {[LIT_CHARS -e]} ) (= scope= flags=0 words=[] bindings=[('SSH_OPTS', {[DQ [LIT_CHARS "-oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oLogLevel=ERROR -C"]]})]) (= scope= flags=0 words=[] bindings=[('MASTER', {[DQ ]})]) (= scope= flags=0 words=[] bindings=[('MASTER_IP', {[DQ ]})]) (= scope= flags=0 words=[] bindings=[('NODE_IPS', {[DQ ]})]) (FunctionDef test-build-release [] (Com {[DQ [VarSub KUBE_ROOT][LIT_CHARS /build-tools/release.sh]]} ) ) (FunctionDef setClusterInfo [] (List (= scope= flags=0 words=[] bindings=[('NODE_IPS', {[DQ ]})]) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (= scope= flags=0 words=[] bindings=[('nodeIP', {[VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}) (List (= scope= flags=0 words=[] bindings=[('MASTER_IP', {[VarSub nodeIP]})]) (= scope= flags=0 words=[] bindings=[('MASTER', {[VarSub i]})]) (= scope= flags=0 words=[] bindings=[('NODE_IPS', {[DQ [VarSub nodeIP]]})]) ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}}) (List (= scope= flags=0 words=[] bindings=[('MASTER_IP', {[VarSub nodeIP]})]) (= scope= flags=0 words=[] bindings=[('MASTER', {[VarSub i]})]) ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}}) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub NODE_IPS]]}}) (= scope= flags=0 words=[] bindings=[('NODE_IPS', {[DQ [VarSub nodeIP]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('NODE_IPS', {[DQ [VarSub NODE_IPS][LIT_CHARS ","][VarSub nodeIP]]})]) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i][LIT_CHARS ". Please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) ) ) (FunctionDef check-CNI-config [] (If (AndOr OP_AND_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub CNI_PLUGIN_EXES]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Warning: CNI_PLUGIN_CONF is emtpy but CNI_PLUGIN_EXES is not (it is "][VarSub CNI_PLUGIN_EXES][LIT_CHARS "); Flannel will be used"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (AndOr OP_AND_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_EXES]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (Fork (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Warning: CNI_PLUGIN_EXES is empty but CNI_PLUGIN_CONF is not (it is "][VarSub CNI_PLUGIN_CONF][LIT_CHARS "); Flannel will be used"]]} ) ) (Com {[LIT_CHARS 2]} ) ) (AndOr OP_AND_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub CNI_PLUGIN_EXES]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (= scope= flags=0 words=[] bindings=[('problems', {[LIT_CHARS 0]})]) (If (Pipeline! (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -r]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "ERROR: CNI_PLUGIN_CONF is set to "][VarSub CNI_PLUGIN_CONF][LIT_CHARS " but that is not a readable existing file!"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS let]} {[LIT_VAR_LIKE "problems="] [LIT_CHARS 1] =} ) ) ) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For exe [{[VarSub CNI_PLUGIN_EXES]}]) (List (If (Pipeline! (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -x]} {[DQ [VarSub exe]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "ERROR: CNI_PLUGIN_EXES["][VarSub ii][LIT_CHARS "], which is "][VarSub exe][LIT_CHARS ", is not an existing executable file!"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS let]} {[LIT_VAR_LIKE "problems="] [LIT_CHARS problems] [LIT_OTHER "+"] [LIT_CHARS 1] =} ) ) ) (Com {[LIT_CHARS let]} {[LIT_VAR_LIKE "ii="] [LIT_CHARS ii] [LIT_OTHER "+"] [LIT_CHARS 1] =} ) ) ) (If (DParen {A2 AS_OP_GREAT {A Atom NODE_ARITH_WORD {[VarSub problems]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}}}) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef verify-prereqs [] (List (= scope= flags=0 words=[{[LIT_CHARS rc]}] bindings=[]) (= scope= flags=0 words=[] bindings=[('rc', {[LIT_CHARS 0]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh-add]} {[LIT_CHARS -L]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) (= scope= flags=0 words=[] bindings=[('rc', {[DQ [VarSub ?]]})]) ) (If (DBracket {B2 BINARY_INT_EQ {[DQ [VarSub rc]]} {[LIT_CHARS 2]}}) (List (Com {[LIT_CHARS eval]} {[DQ [ComSub (Com {[LIT_CHARS ssh-agent]})]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) (Com {[LIT_CHARS trap-add]} {[DQ [LIT_CHARS "kill "][VarSub SSH_AGENT_PID]]} {[LIT_CHARS EXIT]} ) ) ) (= scope= flags=0 words=[] bindings=[('rc', {[LIT_CHARS 0]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh-add]} {[LIT_CHARS -L]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) (= scope= flags=0 words=[] bindings=[('rc', {[DQ [VarSub ?]]})]) ) (If (DBracket {B2 BINARY_INT_EQ {[DQ [VarSub rc]]} {[LIT_CHARS 1]}}) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh-add]} ) (Com {[LIT_CHARS true]} ) ) ) (If (Pipeline! (Com {[LIT_CHARS ssh-add]} {[LIT_CHARS -L]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Could not find or add an SSH identity."]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Please start ssh-agent, add your identity, and retry."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef check-tmp-noexec [] (If (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[DQ [VarSub MASTER]]} {[DQ [LIT_CHARS "grep '/tmp' /proc/mounts | grep -q 'noexec'"]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "/tmp is mounted noexec on "][VarSub MASTER_IP][LIT_CHARS ", deploying master failed"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (FunctionDef trap-add [] (List (= scope= flags=0 words=[] bindings=[('handler', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('signal', {[DQ [VarSub 2 test_op=VS_TEST_HYPHEN {[LIT_CHARS EXIT]}]]})]) (= scope= flags=0 words=[{[LIT_CHARS cur]}] bindings=[]) (= scope= flags=0 words=[] bindings=[('cur', {[DQ [ComSub (Com {[LIT_CHARS eval]} {[DQ [LIT_CHARS "sh -c 'echo "][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "3' -- "][ComSub (Com {[LIT_CHARS trap]} {[LIT_CHARS -p]} {[VarSub signal]})]]})]]})]) (If (DBracket {B1 UNARY_STRING_n {[DQ [VarSub cur]]}}) (= scope= flags=0 words=[] bindings=[('handler', {[DQ [VarSub cur][LIT_CHARS "; "][VarSub handler]]})]) ) (Com {[LIT_CHARS trap]} {[DQ [VarSub handler]]} {[VarSub signal]} ) ) ) (FunctionDef verify-cluster [] (List (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS a]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS verify-master]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS i]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS verify-node]} {[DQ [VarSub i]]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS ai]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS verify-master]} ) (Com {[LIT_CHARS verify-node]} {[DQ [VarSub i]]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i][LIT_CHARS ". Please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) ) ) (FunctionDef verify-master [] (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [LIT_CHARS "Validating master"]]} ) (= scope= flags=0 words=[{[LIT_CHARS -a]}] bindings=[('required_daemon', {[Array {[DQ [LIT_CHARS kube-apiserver]]} {[DQ [LIT_CHARS kube-controller-manager]]} {[DQ [LIT_CHARS kube-scheduler]]}]})]) (= scope= flags=0 words=[] bindings=[('validated', {[DQ [LIT_CHARS 1]]})]) (= scope= flags=0 words=[] bindings=[('try_count', {[LIT_CHARS 1]})]) (= scope= flags=0 words=[] bindings=[('max_try_count', {[LIT_CHARS 30]})]) (While (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub validated]]} {[DQ [LIT_CHARS 0]]}}) (List (= scope= flags=0 words=[] bindings=[('validated', {[DQ [LIT_CHARS 0]]})]) (= scope= flags=0 words=[{[LIT_CHARS daemon]}] bindings=[]) (For daemon [{[DQ [VarSub required_daemon bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}]) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[DQ [VarSub MASTER]]} {[DQ [LIT_CHARS "pgrep -f '"][VarSub daemon][LIT_CHARS "'"]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [LIT_CHARS .]]} ) (= scope= flags=0 words=[] bindings=[('validated', {[DQ [LIT_CHARS 1]]})]) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub try_count]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub try_count]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) (If (DBracket {B2 BINARY_INT_GT {[VarSub try_count]} {[VarSub max_try_count]}}) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "Warning: Process '"][VarSub daemon][LIT_CHARS "' failed to run on "][VarSub MASTER][LIT_CHARS ", please check."][\ LIT_ESCAPED_CHAR "\\n"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 2]} ) ) ) ) ) ) (Com {[LIT_CHARS echo]} ) ) ) (FunctionDef verify-node [] (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [LIT_CHARS "Validating "][VarSub 1]]} ) (= scope= flags=0 words=[{[LIT_CHARS -a]}] bindings=[('required_daemon', {[Array {[DQ [LIT_CHARS kube-proxy]]} {[DQ [LIT_CHARS kubelet]]} {[DQ [LIT_CHARS docker]]}]})]) (= scope= flags=0 words=[] bindings=[('validated', {[DQ [LIT_CHARS 1]]})]) (= scope= flags=0 words=[] bindings=[('try_count', {[LIT_CHARS 1]})]) (= scope= flags=0 words=[] bindings=[('max_try_count', {[LIT_CHARS 30]})]) (While (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub validated]]} {[DQ [LIT_CHARS 0]]}}) (List (= scope= flags=0 words=[] bindings=[('validated', {[DQ [LIT_CHARS 0]]})]) (= scope= flags=0 words=[{[LIT_CHARS daemon]}] bindings=[]) (For daemon [{[DQ [VarSub required_daemon bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}]) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[DQ [VarSub 1]]} {[DQ [LIT_CHARS "pgrep -f '"][VarSub daemon][LIT_CHARS "'"]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [LIT_CHARS .]]} ) (= scope= flags=0 words=[] bindings=[('validated', {[DQ [LIT_CHARS 1]]})]) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub try_count]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub try_count]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) (If (DBracket {B2 BINARY_INT_GT {[VarSub try_count]} {[VarSub max_try_count]}}) (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "Warning: Process '"][VarSub daemon][LIT_CHARS "' failed to run on "][VarSub 1][LIT_CHARS ", please check."][\ LIT_ESCAPED_CHAR "\\n"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 2]} ) ) ) ) ) ) (Com {[LIT_CHARS echo]} ) ) ) (FunctionDef create-etcd-opts [] (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "ETCD_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS " -name infra"][LIT_CHARS " -listen-client-urls http://127.0.0.1:4001,http://"][VarSub 1][LIT_CHARS ":4001"][LIT_CHARS " -advertise-client-urls http://"][VarSub 1][LIT_CHARS ":4001"][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/etcd]} "> 1), > ) ) (FunctionDef create-kube-apiserver-opts [] (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "KUBE_APISERVER_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS " --insecure-bind-address=0.0.0.0"][LIT_CHARS " --insecure-port=8080"][LIT_CHARS " --etcd-servers=http://127.0.0.1:4001"][LIT_CHARS " --logtostderr=true"][LIT_CHARS " --service-cluster-ip-range="][VarSub 1][LIT_CHARS " --admission-control="][VarSub 2][LIT_CHARS " --service-node-port-range="][VarSub 3][LIT_CHARS " --advertise-address="][VarSub 4][LIT_CHARS " --allow-privileged="][VarSub 5][LIT_CHARS " --client-ca-file=/srv/kubernetes/ca.crt"][LIT_CHARS " --tls-cert-file=/srv/kubernetes/server.cert"][LIT_CHARS " --tls-private-key-file=/srv/kubernetes/server.key"][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/kube-apiserver]} "> 1), > ) ) (FunctionDef create-kube-controller-manager-opts [] (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "KUBE_CONTROLLER_MANAGER_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS " --master=127.0.0.1:8080"][LIT_CHARS " --root-ca-file=/srv/kubernetes/ca.crt"][LIT_CHARS " --service-account-private-key-file=/srv/kubernetes/server.key"][LIT_CHARS " --logtostderr=true"][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/kube-controller-manager]} "> 1), > ) ) (FunctionDef create-kube-scheduler-opts [] (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "KUBE_SCHEDULER_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS " --logtostderr=true"][LIT_CHARS " --master=127.0.0.1:8080"][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/kube-scheduler]} "> 1), > ) ) (FunctionDef create-kubelet-opts [] (List (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub 7]]} {[LIT_DBRACKET_LIKE "]"]} ) (= scope= flags=0 words=[] bindings=[('cni_opts', {[DQ [LIT_CHARS " --network-plugin=cni --network-plugin-dir=/etc/cni/net.d"]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('cni_opts', {[DQ ]})]) ) (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "KUBELET_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS " --hostname-override="][VarSub 1][LIT_CHARS " "][LIT_CHARS " --api-servers=http://"][VarSub 2][LIT_CHARS ":8080 "][LIT_CHARS " --logtostderr=true "][LIT_CHARS " --cluster-dns="][VarSub 3][LIT_CHARS " "][LIT_CHARS " --cluster-domain="][VarSub 4][LIT_CHARS " "][LIT_CHARS " --config="][VarSub 5][LIT_CHARS " "][LIT_CHARS " --allow-privileged="][VarSub 6][LIT_CHARS "\n"][LIT_CHARS " "][VarSub cni_opts][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/kubelet]} "> 1), > ) ) ) (FunctionDef create-kube-proxy-opts [] (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "KUBE_PROXY_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS " --hostname-override="][VarSub 1][LIT_CHARS " "][LIT_CHARS " --master=http://"][VarSub 2][LIT_CHARS ":8080 "][LIT_CHARS " --logtostderr=true "][LIT_CHARS " "][VarSub 3][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/kube-proxy]} "> 1), > ) ) (FunctionDef create-flanneld-opts [] (Com {[LIT_CHARS cat]} < (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "FLANNEL_OPTS="][RIGHT_D_QUOTE "\""][LIT_CHARS "--etcd-endpoints=http://"][VarSub 1][LIT_CHARS ":4001 "][LIT_CHARS " --ip-masq "][LIT_CHARS " --iface="][VarSub 2][RIGHT_D_QUOTE "\""][LIT_CHARS "\n"]]} 0), (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/default/flanneld]} "> 1), > ) ) (FunctionDef detect-master [] (List (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (Com {[LIT_CHARS setClusterInfo]} ) (= scope= flags=1 words=[] bindings=[('KUBE_MASTER', {[DQ [VarSub MASTER]]})]) (= scope= flags=1 words=[] bindings=[('KUBE_MASTER_IP', {[DQ [VarSub MASTER_IP]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Using master "][VarSub MASTER_IP]]} ) ) ) (FunctionDef detect-nodes [] (List (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (= scope= flags=0 words=[] bindings=[('KUBE_NODE_IP_ADDRESSES', {[Array ]})]) (Com {[LIT_CHARS setClusterInfo]} ) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (AndOr OP_OR_IF (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS i]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS ai]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (= scope= flags=0 words=[] bindings=[('KUBE_NODE_IP_ADDRESSES+', {[Array {[DQ [VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]}]})]) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub KUBE_NODE_IP_ADDRESSES bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Could not detect Kubernetes node nodes."][LIT_CHARS " Make sure you've launched a cluster with 'kube-up.sh'"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef kube-up [] (List (= scope= flags=1 words=[] bindings=[('KUBE_CONFIG_FILE', {[VarSub KUBE_CONFIG_FILE test_op=VS_TEST_COLON_HYPHEN {[VarSub KUBE_ROOT] [LIT_SLASH /] [LIT_CHARS cluster] [LIT_SLASH /] [LIT_CHARS ubuntu] [LIT_SLASH /] [LIT_CHARS config-default.sh]}]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (Com {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/download-release.sh]]} ) (Com {[LIT_CHARS curl]} {[LIT_CHARS -L]} {[LIT_CHARS -O]} {[LIT_CHARS https] [LIT_OTHER ":"] [LIT_CHARS //storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (If (Pipeline! (Com {[LIT_CHARS check-CNI-config]} ) ) (Com {[LIT_CHARS return]} ) ) (Com {[LIT_CHARS setClusterInfo]} ) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS a]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS provision-master]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS ai]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS provision-masterandnode]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS i]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS provision-node]} {[DQ [VarSub i]]} ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i][LIT_CHARS ". Please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) (Com {[LIT_CHARS wait]} ) (= scope= flags=1 words=[] bindings=[('KUBECTL_PATH', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/kubectl]]})]) (Com {[LIT_CHARS verify-cluster]} ) (Com {[LIT_CHARS detect-master]} ) (= scope= flags=1 words=[] bindings=[('CONTEXT', {[DQ [LIT_CHARS ubuntu]]})]) (= scope= flags=1 words=[] bindings=[('KUBE_SERVER', {[DQ [LIT_CHARS "http://"][VarSub KUBE_MASTER_IP][LIT_CHARS ":8080"]]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/common.sh]]} ) (Com {[LIT_CHARS load-or-gen-kube-basicauth]} ) (Com {[LIT_CHARS create-kubeconfig]} ) ) ) (FunctionDef provision-master [] (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "Deploying master on machine "][VarSub MASTER_IP]]} ) (Com {[LIT_CHARS check-tmp-noexec]} ) (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[DQ [VarSub MASTER]]} {[DQ [LIT_CHARS "mkdir -p ~/kube/default"]]} ) (Com {[LIT_CHARS scp]} {[LIT_CHARS -r]} {[VarSub SSH_OPTS]} {[LIT_CHARS saltbase/salt/generate-cert/make-ca-cert.sh]} {[LIT_CHARS easy-rsa.tar.gz]} {[LIT_CHARS ubuntu/reconfDocker.sh]} {[DQ [VarSub KUBE_CONFIG_FILE]]} {[LIT_CHARS ubuntu/util.sh]} {[LIT_CHARS ubuntu/master/] [LIT_OTHER "*"]} {[LIT_CHARS ubuntu/binaries/master/]} {[DQ [VarSub MASTER][LIT_CHARS ":~/kube"]]} ) (If (AndOr OP_OR_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_EXES]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (Com {[LIT_CHARS scp]} {[LIT_CHARS -r]} {[VarSub SSH_OPTS]} {[LIT_CHARS ubuntu/master-flannel/] [LIT_OTHER "*"]} {[DQ [VarSub MASTER][LIT_CHARS ":~/kube"]]} ) (= scope= flags=0 words=[] bindings=[('NEED_RECONFIG_DOCKER', {[LIT_CHARS true]})]) ) (ElseTrue) (= scope= flags=0 words=[] bindings=[('NEED_RECONFIG_DOCKER', {[LIT_CHARS false]})]) ) (= scope= flags=0 words=[] bindings=[('EXTRA_SANS', {[Array {OP_NEWLINE "\n"} {[LIT_CHARS IP] [LIT_OTHER ":"] [VarSub MASTER_IP]} {OP_NEWLINE "\n"} {[LIT_CHARS IP] [LIT_OTHER ":"] [VarSub SERVICE_CLUSTER_IP_RANGE transform_ops=[VS_UNARY_PERCENT {[LIT_CHARS ".*"]}]] [LIT_CHARS .1]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes.default]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes.default.svc]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes.default.svc.cluster.local]} {OP_NEWLINE "\n"}]})]) (= scope= flags=0 words=[] bindings=[('EXTRA_SANS', {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub EXTRA_SANS bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}) (Com {[LIT_CHARS tr]} {[SQ ]} {[LIT_COMMA ","]}) )]})]) (= scope= flags=0 words=[] bindings=[('BASH_DEBUG_FLAGS', {[DQ ]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub DEBUG]]} {[DQ [LIT_CHARS true]]}}) (= scope= flags=0 words=[] bindings=[('BASH_DEBUG_FLAGS', {[DQ [LIT_CHARS "set -x"]]})]) ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub MASTER]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " set +e\n"][LIT_CHARS " "][VarSub BASH_DEBUG_FLAGS][LIT_CHARS "\n"][LIT_CHARS " source ~/kube/util.sh\n"][LIT_CHARS "\n"][LIT_CHARS " setClusterInfo\n"][LIT_CHARS " create-etcd-opts '"][VarSub MASTER_IP][LIT_CHARS "'\n"][LIT_CHARS " create-kube-apiserver-opts "][LIT_CHARS " '"][VarSub SERVICE_CLUSTER_IP_RANGE][LIT_CHARS "' "][LIT_CHARS " '"][VarSub ADMISSION_CONTROL][LIT_CHARS "' "][LIT_CHARS " '"][VarSub SERVICE_NODE_PORT_RANGE][LIT_CHARS "' "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub ALLOW_PRIVILEGED][LIT_CHARS "'\n"][LIT_CHARS " create-kube-controller-manager-opts\n"][LIT_CHARS " create-kube-scheduler-opts\n"][LIT_CHARS " create-flanneld-opts '127.0.0.1' '"][VarSub MASTER_IP][LIT_CHARS "'\n"][LIT_CHARS " FLANNEL_BACKEND='"][VarSub FLANNEL_BACKEND][LIT_CHARS "' FLANNEL_OTHER_NET_CONFIG='"][VarSub FLANNEL_OTHER_NET_CONFIG][LIT_CHARS "' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce '\n"][LIT_CHARS " "][VarSub BASH_DEBUG_FLAGS][LIT_CHARS "\n"][LIT_CHARS "\n"][LIT_CHARS " cp ~/kube/default/* /etc/default/\n"][LIT_CHARS " cp ~/kube/init_conf/* /etc/init/\n"][LIT_CHARS " cp ~/kube/init_scripts/* /etc/init.d/\n"][LIT_CHARS "\n"][LIT_CHARS " groupadd -f -r kube-cert\n"][LIT_CHARS " "][VarSub PROXY_SETTING][LIT_CHARS " DEBUG='"][VarSub DEBUG][LIT_CHARS "' ~/kube/make-ca-cert.sh "][\ LIT_ESCAPED_CHAR "\\\""][VarSub MASTER_IP][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][VarSub EXTRA_SANS][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS " mkdir -p /opt/bin/\n"][LIT_CHARS " cp ~/kube/master/* /opt/bin/\n"][LIT_CHARS " service etcd start\n"][LIT_CHARS " if "][VarSub NEED_RECONFIG_DOCKER][LIT_CHARS "; then FLANNEL_NET="][\ LIT_ESCAPED_CHAR "\\\""][VarSub FLANNEL_NET][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " KUBE_CONFIG_FILE="][\ LIT_ESCAPED_CHAR "\\\""][VarSub KUBE_CONFIG_FILE][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " DOCKER_OPTS="][\ LIT_ESCAPED_CHAR "\\\""][VarSub DOCKER_OPTS][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " DEBUG="][\ LIT_ESCAPED_CHAR "\\\""][VarSub DEBUG][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " ~/kube/reconfDocker.sh a; fi\n"][LIT_CHARS " '"]]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Deploying master on machine "][VarSub MASTER_IP][LIT_CHARS " failed"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef provision-node [] (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "Deploying node on machine "][VarSub 1 transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[VarSub 1]} {[DQ [LIT_CHARS "mkdir -p ~/kube/default"]]} ) (Com {[LIT_CHARS scp]} {[LIT_CHARS -r]} {[VarSub SSH_OPTS]} {[DQ [VarSub KUBE_CONFIG_FILE]]} {[LIT_CHARS ubuntu/util.sh]} {[LIT_CHARS ubuntu/reconfDocker.sh]} {[LIT_CHARS ubuntu/minion/] [LIT_OTHER "*"]} {[LIT_CHARS ubuntu/binaries/minion]} {[DQ [VarSub 1][LIT_CHARS ":~/kube"]]} ) (If (AndOr OP_OR_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_EXES]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (Com {[LIT_CHARS scp]} {[LIT_CHARS -r]} {[VarSub SSH_OPTS]} {[LIT_CHARS ubuntu/minion-flannel/] [LIT_OTHER "*"]} {[DQ [VarSub 1][LIT_CHARS ":~/kube"]]} ) (= scope= flags=0 words=[] bindings=[('SERVICE_STARTS', {[DQ [LIT_CHARS "service flanneld start"]]})]) (= scope= flags=0 words=[] bindings=[('NEED_RECONFIG_DOCKER', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('CNI_PLUGIN_CONF', {[SQ ]})]) ) (ElseTrue) (List (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[DQ [VarSub 1]]} {[DQ [LIT_CHARS "rm -rf tmp-cni; mkdir -p tmp-cni/exes tmp-cni/conf"]]} ) (Com {[LIT_CHARS scp]} {[VarSub SSH_OPTS]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[DQ [VarSub 1][LIT_CHARS ":tmp-cni/conf/"]]} ) (Com {[LIT_CHARS scp]} {[LIT_CHARS -p]} {[VarSub SSH_OPTS]} {[VarSub CNI_PLUGIN_EXES]} {[DQ [VarSub 1][LIT_CHARS ":tmp-cni/exes/"]]} ) (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub 1]]} {[SQ ] [DQ [LIT_CHARS "sed -i.bak -e 's/start on started flanneld/start on started "][VarSub CNI_KUBELET_TRIGGER][LIT_CHARS "/' -e 's/stop on stopping flanneld/stop on stopping "][VarSub CNI_KUBELET_TRIGGER][LIT_CHARS "/' "]] [SQ ] [DQ [LIT_CHARS "sed -i.bak -e 's/start on started flanneld/start on started networking/' -e 's/stop on stopping flanneld/stop on stopping networking/' "]] [SQ ]} ) (= scope= flags=0 words=[] bindings=[('SERVICE_STARTS', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('NEED_RECONFIG_DOCKER', {[LIT_CHARS false]})]) ) ) (= scope= flags=0 words=[] bindings=[('BASH_DEBUG_FLAGS', {[DQ ]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub DEBUG]]} {[DQ [LIT_CHARS true]]}}) (= scope= flags=0 words=[] bindings=[('BASH_DEBUG_FLAGS', {[DQ [LIT_CHARS "set -x"]]})]) ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub 1]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " set +e\n"][LIT_CHARS " "][VarSub BASH_DEBUG_FLAGS][LIT_CHARS "\n"][LIT_CHARS " source ~/kube/util.sh\n"][LIT_CHARS "\n"][LIT_CHARS " setClusterInfo\n"][LIT_CHARS " create-kubelet-opts "][LIT_CHARS " '"][VarSub 1 transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS "' "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub DNS_SERVER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub DNS_DOMAIN][LIT_CHARS "' "][LIT_CHARS " '"][VarSub KUBELET_CONFIG][LIT_CHARS "' "][LIT_CHARS " '"][VarSub ALLOW_PRIVILEGED][LIT_CHARS "' "][LIT_CHARS " '"][VarSub CNI_PLUGIN_CONF][LIT_CHARS "'\n"][LIT_CHARS " create-kube-proxy-opts "][LIT_CHARS " '"][VarSub 1 transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS "' "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub KUBE_PROXY_EXTRA_OPTS][LIT_CHARS "'\n"][LIT_CHARS " create-flanneld-opts '"][VarSub MASTER_IP][LIT_CHARS "' '"][VarSub 1 transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS "'\n"][LIT_CHARS "\n"][LIT_CHARS " sudo -E -p '[sudo] password to start node: ' -- /bin/bash -ce '\n"][LIT_CHARS " "][VarSub BASH_DEBUG_FLAGS][LIT_CHARS "\n"][LIT_CHARS " cp ~/kube/default/* /etc/default/\n"][LIT_CHARS " cp ~/kube/init_conf/* /etc/init/\n"][LIT_CHARS " cp ~/kube/init_scripts/* /etc/init.d/\n"][LIT_CHARS " mkdir -p /opt/bin/\n"][LIT_CHARS " cp ~/kube/minion/* /opt/bin\n"][LIT_CHARS " "][VarSub SERVICE_STARTS][LIT_CHARS "\n"][LIT_CHARS " if "][VarSub NEED_RECONFIG_DOCKER][LIT_CHARS "; then KUBE_CONFIG_FILE="][\ LIT_ESCAPED_CHAR "\\\""][VarSub KUBE_CONFIG_FILE][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " DOCKER_OPTS="][\ LIT_ESCAPED_CHAR "\\\""][VarSub DOCKER_OPTS][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " DEBUG="][\ LIT_ESCAPED_CHAR "\\\""][VarSub DEBUG][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " ~/kube/reconfDocker.sh i; fi\n"][LIT_CHARS " '"]]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Deploying node on machine "][VarSub 1 transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef provision-masterandnode [] (List (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "Deploying master and node on machine "][VarSub MASTER_IP]]} ) (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[VarSub MASTER]} {[DQ [LIT_CHARS "mkdir -p ~/kube/default"]]} ) (Com {[LIT_CHARS scp]} {[LIT_CHARS -r]} {[VarSub SSH_OPTS]} {[LIT_CHARS saltbase/salt/generate-cert/make-ca-cert.sh]} {[LIT_CHARS easy-rsa.tar.gz]} {[DQ [VarSub KUBE_CONFIG_FILE]]} {[LIT_CHARS ubuntu/util.sh]} {[LIT_CHARS ubuntu/minion/] [LIT_OTHER "*"]} {[LIT_CHARS ubuntu/master/] [LIT_OTHER "*"]} {[LIT_CHARS ubuntu/reconfDocker.sh]} {[LIT_CHARS ubuntu/binaries/master/]} {[LIT_CHARS ubuntu/binaries/minion]} {[DQ [VarSub MASTER][LIT_CHARS ":~/kube"]]} ) (If (AndOr OP_OR_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub CNI_PLUGIN_EXES]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (List (Com {[LIT_CHARS scp]} {[LIT_CHARS -r]} {[VarSub SSH_OPTS]} {[LIT_CHARS ubuntu/minion-flannel/] [LIT_OTHER "*"]} {[LIT_CHARS ubuntu/master-flannel/] [LIT_OTHER "*"]} {[DQ [VarSub MASTER][LIT_CHARS ":~/kube"]]} ) (= scope= flags=0 words=[] bindings=[('NEED_RECONFIG_DOCKER', {[LIT_CHARS true]})]) (= scope= flags=0 words=[] bindings=[('CNI_PLUGIN_CONF', {[SQ ]})]) ) (ElseTrue) (List (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[DQ [VarSub MASTER]]} {[DQ [LIT_CHARS "rm -rf tmp-cni; mkdir -p tmp-cni/exes tmp-cni/conf"]]} ) (Com {[LIT_CHARS scp]} {[VarSub SSH_OPTS]} {[DQ [VarSub CNI_PLUGIN_CONF]]} {[DQ [VarSub MASTER][LIT_CHARS ":tmp-cni/conf/"]]} ) (Com {[LIT_CHARS scp]} {[LIT_CHARS -p]} {[VarSub SSH_OPTS]} {[VarSub CNI_PLUGIN_EXES]} {[DQ [VarSub MASTER][LIT_CHARS ":tmp-cni/exes/"]]} ) (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub MASTER]]} {[SQ ] [DQ [LIT_CHARS "sed -i.bak -e 's/start on started flanneld/start on started etcd/' -e 's/stop on stopping flanneld/stop on stopping etcd/' "]] [SQ ]} ) (= scope= flags=0 words=[] bindings=[('NEED_RECONFIG_DOCKER', {[LIT_CHARS false]})]) ) ) (= scope= flags=0 words=[] bindings=[('EXTRA_SANS', {[Array {OP_NEWLINE "\n"} {[LIT_CHARS IP] [LIT_OTHER ":"] [VarSub MASTER_IP]} {OP_NEWLINE "\n"} {[LIT_CHARS IP] [LIT_OTHER ":"] [VarSub SERVICE_CLUSTER_IP_RANGE transform_ops=[VS_UNARY_PERCENT {[LIT_CHARS ".*"]}]] [LIT_CHARS .1]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes.default]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes.default.svc]} {OP_NEWLINE "\n"} {[LIT_CHARS DNS] [LIT_OTHER ":"] [LIT_CHARS kubernetes.default.svc.cluster.local]} {OP_NEWLINE "\n"}]})]) (= scope= flags=0 words=[] bindings=[('EXTRA_SANS', {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub EXTRA_SANS bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}) (Com {[LIT_CHARS tr]} {[SQ ]} {[LIT_COMMA ","]}) )]})]) (= scope= flags=0 words=[] bindings=[('BASH_DEBUG_FLAGS', {[DQ ]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub DEBUG]]} {[DQ [LIT_CHARS true]]}}) (= scope= flags=0 words=[] bindings=[('BASH_DEBUG_FLAGS', {[DQ [LIT_CHARS "set -x"]]})]) ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub MASTER]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " set +e\n"][LIT_CHARS " "][VarSub BASH_DEBUG_FLAGS][LIT_CHARS "\n"][LIT_CHARS " source ~/kube/util.sh\n"][LIT_CHARS "\n"][LIT_CHARS " setClusterInfo\n"][LIT_CHARS " create-etcd-opts '"][VarSub MASTER_IP][LIT_CHARS "'\n"][LIT_CHARS " create-kube-apiserver-opts "][LIT_CHARS " '"][VarSub SERVICE_CLUSTER_IP_RANGE][LIT_CHARS "' "][LIT_CHARS " '"][VarSub ADMISSION_CONTROL][LIT_CHARS "' "][LIT_CHARS " '"][VarSub SERVICE_NODE_PORT_RANGE][LIT_CHARS "' "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub ALLOW_PRIVILEGED][LIT_CHARS "'\n"][LIT_CHARS " create-kube-controller-manager-opts\n"][LIT_CHARS " create-kube-scheduler-opts\n"][LIT_CHARS " create-kubelet-opts "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub DNS_SERVER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub DNS_DOMAIN][LIT_CHARS "' "][LIT_CHARS " '"][VarSub KUBELET_CONFIG][LIT_CHARS "' "][LIT_CHARS " '"][VarSub ALLOW_PRIVILEGED][LIT_CHARS "' "][LIT_CHARS " '"][VarSub CNI_PLUGIN_CONF][LIT_CHARS "'\n"][LIT_CHARS " create-kube-proxy-opts "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub MASTER_IP][LIT_CHARS "' "][LIT_CHARS " '"][VarSub KUBE_PROXY_EXTRA_OPTS][LIT_CHARS "'\n"][LIT_CHARS " create-flanneld-opts '127.0.0.1' '"][VarSub MASTER_IP][LIT_CHARS "'\n"][LIT_CHARS "\n"][LIT_CHARS " FLANNEL_BACKEND='"][VarSub FLANNEL_BACKEND][LIT_CHARS "' FLANNEL_OTHER_NET_CONFIG='"][VarSub FLANNEL_OTHER_NET_CONFIG][LIT_CHARS "' sudo -E -p '[sudo] password to start master: ' -- /bin/bash -ce '\n"][LIT_CHARS " "][VarSub BASH_DEBUG_FLAGS][LIT_CHARS "\n"][LIT_CHARS " cp ~/kube/default/* /etc/default/\n"][LIT_CHARS " cp ~/kube/init_conf/* /etc/init/\n"][LIT_CHARS " cp ~/kube/init_scripts/* /etc/init.d/\n"][LIT_CHARS "\n"][LIT_CHARS " groupadd -f -r kube-cert\n"][LIT_CHARS " "][VarSub PROXY_SETTING][LIT_CHARS " DEBUG='"][VarSub DEBUG][LIT_CHARS "' ~/kube/make-ca-cert.sh "][\ LIT_ESCAPED_CHAR "\\\""][VarSub MASTER_IP][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " "][\ LIT_ESCAPED_CHAR "\\\""][VarSub EXTRA_SANS][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "\n"][LIT_CHARS " mkdir -p /opt/bin/\n"][LIT_CHARS " cp ~/kube/master/* /opt/bin/\n"][LIT_CHARS " cp ~/kube/minion/* /opt/bin/\n"][LIT_CHARS "\n"][LIT_CHARS " service etcd start\n"][LIT_CHARS " if "][VarSub NEED_RECONFIG_DOCKER][LIT_CHARS "; then FLANNEL_NET="][\ LIT_ESCAPED_CHAR "\\\""][VarSub FLANNEL_NET][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " KUBE_CONFIG_FILE="][\ LIT_ESCAPED_CHAR "\\\""][VarSub KUBE_CONFIG_FILE][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " DOCKER_OPTS="][\ LIT_ESCAPED_CHAR "\\\""][VarSub DOCKER_OPTS][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " DEBUG="][\ LIT_ESCAPED_CHAR "\\\""][VarSub DEBUG][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " ~/kube/reconfDocker.sh ai; fi\n"][LIT_CHARS " '"]]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Deploying master and node on machine "][VarSub MASTER_IP][LIT_CHARS " failed"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef check-pods-torn-down [] (List (= scope= flags=0 words=[] bindings=[('kubectl', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/kubectl.sh]]})]) (= scope= flags=0 words=[] bindings=[('attempt', {[LIT_CHARS 0]})]) (While (DBracket {B! {B1 UNARY_STRING_z {[DQ [ComSub (Pipeline (Com {[LIT_CHARS kubectl]} {[LIT_CHARS get]} {[LIT_CHARS pods]} {[LIT_CHARS --show-all]} {[LIT_CHARS --all-namespaces]}) (Com {[LIT_CHARS tail]} {[LIT_CHARS -n]} {[LIT_OTHER "+"] [LIT_CHARS 2]}) )]]}}}) (List (If (DParen {A2 AS_OP_GREAT {A Atom NODE_ARITH_WORD {[VarSub attempt]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 120]}}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "timeout waiting for tearing down pods"]]} < (FilenameRedirectNode filename={[LIT_TILDE "~"] [LIT_CHARS /kube/err.log]} >"> 1), > ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "waiting for tearing down pods"]]} ) (= scope= flags=0 words=[] bindings=[('attempt', {[ArithSub {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub attempt]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}]})]) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 5]} ) ) ) ) ) (FunctionDef kube-down [] (List (= scope= flags=1 words=[] bindings=[('KUBECTL_PATH', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/kubectl]]})]) (= scope= flags=1 words=[] bindings=[('KUBE_CONFIG_FILE', {[VarSub KUBE_CONFIG_FILE test_op=VS_TEST_COLON_HYPHEN {[VarSub KUBE_ROOT] [LIT_SLASH /] [LIT_CHARS cluster] [LIT_SLASH /] [LIT_CHARS ubuntu] [LIT_SLASH /] [LIT_CHARS config-default.sh]}]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/common.sh]]} ) (Com {[LIT_CHARS tear_down_alive_resources]} ) (Com {[LIT_CHARS check-pods-torn-down]} ) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (DBracket {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on master "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " pgrep etcd && "][LIT_CHARS " sudo -p '[sudo] password to stop master: ' -- /bin/bash -c '\n"][LIT_CHARS " service etcd stop\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf "][LIT_CHARS " /opt/bin/etcd* "][LIT_CHARS " /etc/init/etcd.conf "][LIT_CHARS " /etc/init.d/etcd "][LIT_CHARS " /etc/default/etcd\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf /infra*\n"][LIT_CHARS " rm -rf /srv/kubernetes\n"][LIT_CHARS " '\n"][LIT_CHARS " "]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on master "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}) (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "sudo rm -rf /var/lib/kubelet"]]} ) ) ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on node "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " pgrep flanneld && "][LIT_CHARS " sudo -p '[sudo] password to stop node: ' -- /bin/bash -c '\n"][LIT_CHARS " service flanneld stop\n"][LIT_CHARS " rm -rf /var/lib/kubelet\n"][LIT_CHARS " '\n"][LIT_CHARS " "]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on node "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i]]} ) ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "sudo -- /bin/bash -c '\n"][LIT_CHARS " rm -f "][LIT_CHARS " /opt/bin/kube* "][LIT_CHARS " /opt/bin/flanneld "][LIT_CHARS " /etc/init/kube* "][LIT_CHARS " /etc/init/flanneld.conf "][LIT_CHARS " /etc/init.d/kube* "][LIT_CHARS " /etc/init.d/flanneld "][LIT_CHARS " /etc/default/kube* "][LIT_CHARS " /etc/default/flanneld\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf ~/kube\n"][LIT_CHARS " rm -f /run/flannel/subnet.env\n"][LIT_CHARS " '"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cleaning legacy files on "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) ) ) (FunctionDef prepare-push [] (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub KUBE_VERSION]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Use local binaries for kube-push"]]} ) (If (DBracket {B! {B1 UNARY_FILE_d {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "No local binaries.Please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Please make sure all the required local binaries are prepared ahead"]]} ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 3]} ) ) ) ) (ElseTrue) (List (= scope= flags=1 words=[{[LIT_CHARS KUBE_VERSION]}] bindings=[]) (Com {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/download-release.sh]]} ) ) ) ) (FunctionDef push-master [] (List (= scope= flags=1 words=[] bindings=[('KUBE_CONFIG_FILE', {[VarSub KUBE_CONFIG_FILE test_op=VS_TEST_COLON_HYPHEN {[VarSub KUBE_ROOT] [LIT_SLASH /] [LIT_CHARS cluster] [LIT_SLASH /] [LIT_CHARS ubuntu] [LIT_SLASH /] [LIT_CHARS config-default.sh]}]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (If (DBracket {B! {B1 UNARY_FILE_f {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/master/kube-apiserver]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "There is no required release of kubernetes, please check first"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=1 words=[] bindings=[('KUBECTL_PATH', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/kubectl]]})]) (Com {[LIT_CHARS setClusterInfo]} ) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (DBracket {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning master "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " pgrep etcd && sudo -p '[sudo] stop the all process: ' -- /bin/bash -c '\n"][LIT_CHARS " service etcd stop\n"][LIT_CHARS " sleep 3\n"][LIT_CHARS " rm -rf "][LIT_CHARS " /etc/init/etcd.conf "][LIT_CHARS " /etc/init/kube* "][LIT_CHARS " /etc/init/flanneld.conf "][LIT_CHARS " /etc/init.d/etcd "][LIT_CHARS " /etc/init.d/kube* "][LIT_CHARS " /etc/init.d/flanneld "][LIT_CHARS " /etc/default/etcd "][LIT_CHARS " /etc/default/kube* "][LIT_CHARS " /etc/default/flanneld\n"][LIT_CHARS " rm -f "][LIT_CHARS " /opt/bin/etcd* "][LIT_CHARS " /opt/bin/kube* "][LIT_CHARS " /opt/bin/flanneld\n"][LIT_CHARS " rm -f /run/flannel/subnet.env\n"][LIT_CHARS " rm -rf ~/kube\n"][LIT_CHARS " '"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning master "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}}) (Com {[LIT_CHARS provision-master]} ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}) (Com {[LIT_CHARS provision-masterandnode]} ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}}) (List (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) (Com {[LIT_CHARS continue]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i][LIT_CHARS ", please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) (Com {[LIT_CHARS verify-cluster]} ) ) ) (FunctionDef push-node [] (List (= scope= flags=1 words=[] bindings=[('KUBE_CONFIG_FILE', {[VarSub KUBE_CONFIG_FILE test_op=VS_TEST_COLON_HYPHEN {[VarSub KUBE_ROOT] [LIT_SLASH /] [LIT_CHARS cluster] [LIT_SLASH /] [LIT_CHARS ubuntu] [LIT_SLASH /] [LIT_CHARS config-default.sh]}]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (If (DBracket {B! {B1 UNARY_FILE_f {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/minion/kubelet]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "There is no required release of kubernetes, please check first"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=1 words=[] bindings=[('KUBECTL_PATH', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/kubectl]]})]) (Com {[LIT_CHARS setClusterInfo]} ) (= scope= flags=0 words=[] bindings=[('node_ip', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (= scope= flags=0 words=[] bindings=[('existing', {[LIT_CHARS false]})]) (For i [{[VarSub nodes]}]) (List (If (DBracket {B? LOGICAL_BINARY_AND {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}} {B2 BINARY_STRING_EQUAL {[VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]} {[DQ [VarSub node_ip]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning node "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " sudo -p '[sudo] stop the all process: ' -- /bin/bash -c '\n"][LIT_CHARS " service flanneld stop\n"][LIT_CHARS "\n"][LIT_CHARS " rm -f /opt/bin/kube* "][LIT_CHARS " /opt/bin/flanneld\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf "][LIT_CHARS " /etc/init/kube* "][LIT_CHARS " /etc/init/flanneld.conf "][LIT_CHARS " /etc/init.d/kube* "][LIT_CHARS " /etc/init.d/flanneld "][LIT_CHARS " /etc/default/kube* "][LIT_CHARS " /etc/default/flanneld\n"][LIT_CHARS "\n"][LIT_CHARS " rm -f /run/flannel/subnet.env\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf ~/kube\n"][LIT_CHARS " '"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning node "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) (Com {[LIT_CHARS provision-node]} {[DQ [VarSub i]]} ) (= scope= flags=0 words=[] bindings=[('existing', {[LIT_CHARS true]})]) ) (AndOr OP_AND_IF (DBracket {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}}) (DBracket {B2 BINARY_STRING_EQUAL {[VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]} {[DQ [VarSub node_ip]]}}) ) (List (Com {[LIT_CHARS echo]} {[DQ [VarSub i][LIT_CHARS " is master node, please try ./kube-push -m instead"]]} ) (= scope= flags=0 words=[] bindings=[('existing', {[LIT_CHARS true]})]) ) (DBracket {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}} {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}}}) (List (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) (Com {[LIT_CHARS continue]} ) ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i][LIT_CHARS ", please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub existing]]} {[LIT_CHARS false]}}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "node "][VarSub node_ip][LIT_CHARS " does not exist"]]} ) (ElseTrue) (Com {[LIT_CHARS verify-cluster]} ) ) ) ) (FunctionDef kube-push [] (List (Com {[LIT_CHARS prepare-push]} ) (= scope= flags=1 words=[] bindings=[('KUBE_CONFIG_FILE', {[VarSub KUBE_CONFIG_FILE test_op=VS_TEST_COLON_HYPHEN {[VarSub KUBE_ROOT] [LIT_SLASH /] [LIT_CHARS cluster] [LIT_SLASH /] [LIT_CHARS ubuntu] [LIT_SLASH /] [LIT_CHARS config-default.sh]}]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_CONFIG_FILE]]} ) (If (DBracket {B! {B1 UNARY_FILE_f {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/master/kube-apiserver]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "There is no required release of kubernetes, please check first"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=1 words=[] bindings=[('KUBECTL_PATH', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/ubuntu/binaries/kubectl]]})]) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (DBracket {B? LOGICAL_BINARY_OR {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}} {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on master "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " pgrep etcd && "][LIT_CHARS " sudo -p '[sudo] password to stop master: ' -- /bin/bash -c '\n"][LIT_CHARS " service etcd stop\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf "][LIT_CHARS " /opt/bin/etcd* "][LIT_CHARS " /etc/init/etcd.conf "][LIT_CHARS " /etc/init.d/etcd "][LIT_CHARS " /etc/default/etcd\n"][LIT_CHARS " '"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on master "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on node "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]]]} ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[VarSub i]} {[DQ [LIT_CHARS "\n"][LIT_CHARS " pgrep flanneld && "][LIT_CHARS " sudo -p '[sudo] password to stop node: ' -- /bin/bash -c '\n"][LIT_CHARS " service flanneld stop\n"][LIT_CHARS " '"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning on node "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i]]} ) ) (AndOr OP_OR_IF (Com {[LIT_CHARS ssh]} {[VarSub SSH_OPTS]} {[LIT_CHARS -t]} {[DQ [VarSub i]]} {[DQ [LIT_CHARS "sudo -- /bin/bash -c '\n"][LIT_CHARS " rm -f "][LIT_CHARS " /opt/bin/kube* "][LIT_CHARS " /opt/bin/flanneld\n"][LIT_CHARS "\n"][LIT_CHARS " rm -rf "][LIT_CHARS " /etc/init/kube* "][LIT_CHARS " /etc/init/flanneld.conf "][LIT_CHARS " /etc/init.d/kube* "][LIT_CHARS " /etc/init.d/flanneld "][LIT_CHARS " /etc/default/kube* "][LIT_CHARS " /etc/default/flanneld\n"][LIT_CHARS "\n"][LIT_CHARS " rm -f /run/flannel/subnet.env\n"][LIT_CHARS " rm -rf ~/kube\n"][LIT_CHARS " '"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Cleaning legacy files on "][VarSub i transform_ops=[VS_UNARY_POUND {[LIT_CHARS "*@"]}]][LIT_CHARS " failed"]]} ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) (Com {[LIT_CHARS setClusterInfo]} ) (= scope= flags=0 words=[] bindings=[('ii', {[LIT_CHARS 0]})]) (For i [{[VarSub nodes]}]) (List (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS a]]}}) (Com {[LIT_CHARS provision-master]} ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS i]]}}) (Com {[LIT_CHARS provision-node]} {[DQ [VarSub i]]} ) (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub roles_array bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub ii]}})]]} {[DQ [LIT_CHARS ai]]}}) (Com {[LIT_CHARS provision-masterandnode]} ) (ElseTrue) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "unsupported role for "][VarSub i][LIT_CHARS ". Please check"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (DParen {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub ii]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}}) ) ) (Com {[LIT_CHARS verify-cluster]} ) ) ) (FunctionDef prepare-e2e [] (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Ubuntu doesn't need special preparations for e2e tests"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) )