(List (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errexit]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS nounset]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS pipefail]} ) (Com {[LIT_CHARS set]} {[LIT_CHARS -o]} {[LIT_CHARS errtrace]} ) (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[ComSub (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})][LIT_CHARS /../../..]]}) (Com {[LIT_CHARS pwd]}) )]})]) (= scope= flags=0 words=[] bindings=[('provider_root', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/][VarSub KUBERNETES_PROVIDER]]})]) (Com {[LIT_CHARS source]} {[DQ [VarSub provider_root][LIT_CHARS /][VarSub KUBE_CONFIG_FILE test_op=VS_TEST_HYPHEN {[DQ [LIT_CHARS config-default.sh]]}]]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/common.sh]]} ) (FunctionDef cluster::mesos::docker::docker_compose [] (List (= scope= flags=0 words=[] bindings=[('params', {[DQ [VarSub @]]})]) (= scope= flags=0 words=[{[LIT_CHARS -a]}] bindings=[('env_vars', {[Array {OP_NEWLINE "\n"} {[DQ [LIT_CHARS KUBE_KEYGEN_TIMEOUT]]} {OP_NEWLINE "\n"} {[DQ [LIT_CHARS MESOS_DOCKER_ETCD_TIMEOUT]]} {OP_NEWLINE "\n"} {[DQ [LIT_CHARS MESOS_DOCKER_MESOS_TIMEOUT]]} {OP_NEWLINE "\n"} {[DQ [LIT_CHARS MESOS_DOCKER_API_TIMEOUT]]} {OP_NEWLINE "\n"} {[DQ [LIT_CHARS MESOS_DOCKER_ADDON_TIMEOUT]]} {OP_NEWLINE "\n"} {[DQ [LIT_CHARS MESOS_DOCKER_WORK_DIR]]} {OP_NEWLINE "\n"} {[DQ [LIT_CHARS DOCKER_DAEMON_ARGS]]} {OP_NEWLINE "\n"}]})]) (Subshell (List (For var_name [{[DQ [VarSub env_vars bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}]) (= scope= flags=1 words=[{[VarSub var_name] [LIT_DBRACKET_LIKE "="] [DQ [VarSub var_name transform_ops=[(!ref)]]]}] bindings=[]) ) (Com {[LIT_CHARS docker-compose]} {[LIT_CHARS -f]} {[DQ [VarSub provider_root][LIT_CHARS /docker-compose.yml]]} {[VarSub params]} ) ) ) ) ) (FunctionDef cluster::mesos::docker::docker_compose_lazy_pull [] (For img [{[ComSub (Pipeline (Com {[LIT_CHARS grep]} {[SQ ]} {[DQ [VarSub provider_root][LIT_CHARS /docker-compose.yml]]}) (Com {[LIT_CHARS sed]} {[SQ ]}) )]}]) (List (Com {[LIT_CHARS read]} {[LIT_CHARS repo]} {[LIT_CHARS tag]} < (HereWordRedirectNode here_word={[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub img][LIT_CHARS " "]]}) (Com {[LIT_CHARS sed]} {[SQ ]}) )]} 0), > ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub tag]]} {[LIT_DBRACKET_LIKE "]"]} ) (= scope= flags=0 words=[] bindings=[('tag', {[DQ [LIT_CHARS latest]]})]) ) (If (Pipeline! (Com {[LIT_CHARS docker]} {[LIT_CHARS images]} {[DQ [VarSub repo]]} ) (Com {[LIT_CHARS awk]} {[SQ ]} ) (Com {[LIT_CHARS grep]} {[LIT_CHARS -q]} {[DQ [VarSub tag]]} ) ) (Com {[LIT_CHARS docker]} {[LIT_CHARS pull]} {[DQ [VarSub img]]} ) ) ) ) ) (FunctionDef cluster::mesos::docker::run_in_docker_test [] (List (= scope= flags=0 words=[] bindings=[('entrypoint', {[DQ [VarSub 1]]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub entrypoint]]} {[DQ [LIT_CHARS ./]] [LIT_OTHER "*"]}}) (= scope= flags=0 words=[] bindings=[('entrypoint', {[DQ [LIT_CHARS /go/src/github.com/GoogleCloudPlatform/kubernetes/][VarSub entrypoint]]})]) ) (Com {[LIT_CHARS shift]} ) (= scope= flags=0 words=[] bindings=[('args', {[DQ [VarSub @]]})]) (= scope= flags=0 words=[] bindings=[('kube_config_mount', {[DQ ]})]) (If (AndOr OP_AND_IF (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -n]} {[DQ [VarSub KUBECONFIG test_op=VS_TEST_COLON_HYPHEN {}]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -e]} {[DQ [VarSub KUBECONFIG]]} {[LIT_DBRACKET_LIKE "]"]} ) ) (= scope= flags=0 words=[] bindings=[('kube_config_mount', {[DQ [LIT_CHARS "-v "][\ LIT_ESCAPED_CHAR "\\\""][ComSub (Com {[LIT_CHARS dirname]} {[VarSub KUBECONFIG]})][LIT_CHARS ":/root/.kube"][\ LIT_ESCAPED_CHAR "\\\""]]})]) ) (Com {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS --rm]} {[LIT_CHARS -t]} {[ComSub (List (Fork (Com {[LIT_CHARS tty]}) ) (AndOr OP_AND_IF (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1)]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS -i]]}) ) )]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "KUBERNETES_PROVIDER="][VarSub KUBERNETES_PROVIDER]]} {[LIT_CHARS -v]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS ":/go/src/github.com/GoogleCloudPlatform/kubernetes"]]} {[VarSub kube_config_mount]} {[LIT_CHARS -v]} {[DQ [LIT_CHARS "/var/run/docker.sock:/var/run/docker.sock"]]} {[LIT_CHARS --link]} {[LIT_CHARS docker_mesosmaster1_1] [LIT_OTHER ":"] [LIT_CHARS mesosmaster1]} {[LIT_CHARS --link]} {[LIT_CHARS docker_apiserver_1] [LIT_OTHER ":"] [LIT_CHARS apiserver]} {[LIT_CHARS --entrypoint] [LIT_DBRACKET_LIKE "="] [DQ [VarSub entrypoint]]} {[LIT_CHARS mesosphere/kubernetes-mesos-test]} {[VarSub args]} ) (Com {[LIT_CHARS return]} {[DQ [VarSub ?]]} ) ) ) (FunctionDef cluster::mesos::docker::run_in_docker_cagen [] (List (= scope= flags=0 words=[] bindings=[('out_dir', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS --rm]} {[LIT_CHARS -t]} {[ComSub (List (Fork (Com {[LIT_CHARS tty]}) ) (AndOr OP_AND_IF (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1)]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS -i]]}) ) )]} {[LIT_CHARS -v]} {[DQ [VarSub out_dir][LIT_CHARS ":/var/run/kubernetes/auth"]]} {[LIT_CHARS mesosphere/kubernetes-keygen] [LIT_OTHER ":"] [LIT_CHARS v1.0.0]} {[DQ [LIT_CHARS cagen]]} {[DQ [LIT_CHARS /var/run/kubernetes/auth]]} ) (Com {[LIT_CHARS return]} {[DQ [VarSub ?]]} ) ) ) (FunctionDef cluster::mesos::docker::run_in_docker_keygen [] (List (= scope= flags=0 words=[] bindings=[('out_file_path', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('out_dir', {[DQ [ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub out_file_path]]})]]})]) (= scope= flags=0 words=[] bindings=[('out_file', {[DQ [ComSub (Com {[LIT_CHARS basename]} {[DQ [VarSub out_file_path]]})]]})]) (Com {[LIT_CHARS docker]} {[LIT_CHARS run]} {[LIT_CHARS --rm]} {[LIT_CHARS -t]} {[ComSub (List (Fork (Com {[LIT_CHARS tty]}) ) (AndOr OP_AND_IF (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1)]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS -i]]}) ) )]} {[LIT_CHARS -v]} {[DQ [VarSub out_dir][LIT_CHARS ":/var/run/kubernetes/auth"]]} {[LIT_CHARS mesosphere/kubernetes-keygen] [LIT_OTHER ":"] [LIT_CHARS v1.0.0]} {[DQ [LIT_CHARS keygen]]} {[DQ [LIT_CHARS /var/run/kubernetes/auth/][VarSub out_file]]} ) (Com {[LIT_CHARS return]} {[DQ [VarSub ?]]} ) ) ) (FunctionDef create-kubeconfig [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('auth_dir', {[DQ [VarSub MESOS_DOCKER_WORK_DIR][LIT_CHARS /auth]]})]) (= scope= flags=0 words=[] bindings=[('kubectl', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/kubectl.sh]]})]) (= scope= flags=1 words=[] bindings=[('CONTEXT', {[DQ [VarSub KUBERNETES_PROVIDER]]})]) (= scope= flags=1 words=[] bindings=[('KUBECONFIG', {[VarSub KUBECONFIG test_op=VS_TEST_COLON_HYPHEN {[VarSub DEFAULT_KUBECONFIG]}]})]) (If (DBracket {B! {B1 UNARY_FILE_e {[DQ [VarSub KUBECONFIG]]}}}) (List (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub KUBECONFIG]]})]} ) (Com {[LIT_CHARS touch]} {[DQ [VarSub KUBECONFIG]]} ) ) ) (= scope= flags=0 words=[] bindings=[('token', {[DQ [ComSub (Com {[LIT_CHARS cut]} {[LIT_CHARS -d] [LIT_COMMA ","]} {[LIT_CHARS -f1]} {[VarSub auth_dir] [LIT_CHARS /token-users]})]]})]) (Com {[DQ [VarSub kubectl]]} {[LIT_CHARS config]} {[LIT_CHARS set-cluster]} {[DQ [VarSub CONTEXT]]} {[LIT_CHARS --server] [LIT_DBRACKET_LIKE "="] [DQ [VarSub KUBE_SERVER]]} {[LIT_CHARS --certificate-authority] [LIT_DBRACKET_LIKE "="] [DQ [VarSub auth_dir][LIT_CHARS /root-ca.crt]]} ) (Com {[DQ [VarSub kubectl]]} {[LIT_CHARS config]} {[LIT_CHARS set-context]} {[DQ [VarSub CONTEXT]]} {[LIT_CHARS --cluster] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CONTEXT]]} {[LIT_CHARS --user] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS cluster-admin]]} ) (Com {[DQ [VarSub kubectl]]} {[LIT_CHARS config]} {[LIT_CHARS set-credentials]} {[LIT_CHARS cluster-admin]} {[LIT_CHARS --token] [LIT_DBRACKET_LIKE "="] [DQ [VarSub token]]} ) (Com {[DQ [VarSub kubectl]]} {[LIT_CHARS config]} {[LIT_CHARS use-context]} {[DQ [VarSub CONTEXT]]} {[LIT_CHARS --cluster] [LIT_DBRACKET_LIKE "="] [DQ [VarSub CONTEXT]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Wrote config for "][VarSub CONTEXT][LIT_CHARS " to "][VarSub KUBECONFIG]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) ) (FunctionDef prepare-e2e [] (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "TODO: prepare-e2e"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) (FunctionDef test-build-release [] (List (= scope= flags=1 words=[] bindings=[('KUBE_RELEASE_RUN_TESTS', {[LIT_CHARS N]})]) (Com {[DQ [VarSub KUBE_ROOT][LIT_CHARS /build-tools/release.sh]]} ) ) ) (FunctionDef detect-master [] (List (= scope= flags=0 words=[] bindings=[('docker_id', {[ComSub (Com {[LIT_CHARS docker]} {[LIT_CHARS ps]} {[LIT_CHARS --filter] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "name=docker_apiserver"]]} {[LIT_CHARS --quiet]})]})]) (If (DBracket {B2 BINARY_STRING_EQUAL {[DQ [VarSub docker_id]]} {[LIT_OTHER "*"] [SQ ] [LIT_OTHER "*"]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "ERROR: Multiple API Servers running"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) (= scope= flags=0 words=[] bindings=[('master_ip', {[ComSub (Com {[LIT_CHARS docker]} {[LIT_CHARS inspect]} {[LIT_CHARS --format] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "{{.NetworkSettings.IPAddress}}"]]} {[DQ [VarSub docker_id]]})]})]) (= scope= flags=0 words=[] bindings=[('master_port', {[LIT_CHARS 6443]})]) (= scope= flags=0 words=[] bindings=[('KUBE_MASTER_IP', {[DQ [VarSub master_ip][LIT_CHARS ":"][VarSub master_port]]})]) (= scope= flags=0 words=[] bindings=[('KUBE_SERVER', {[DQ [LIT_CHARS "https://"][VarSub KUBE_MASTER_IP]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "KUBE_MASTER_IP: "][VarSub KUBE_MASTER_IP]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) ) (FunctionDef detect-nodes [] (List (= scope= flags=0 words=[] bindings=[('docker_ids', {[ComSub (Com {[LIT_CHARS docker]} {[LIT_CHARS ps]} {[LIT_CHARS --filter] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "name=docker_mesosslave"]]} {[LIT_CHARS --quiet]})]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub docker_ids]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "ERROR: Mesos slave(s) not running"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) (While (Com {[LIT_CHARS read]} {[LIT_CHARS -r]} {[LIT_CHARS docker_id]} ) (List (= scope= flags=0 words=[] bindings=[('minion_ip', {[ComSub (Com {[LIT_CHARS docker]} {[LIT_CHARS inspect]} {[LIT_CHARS --format] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "{{.NetworkSettings.IPAddress}}"]]} {[DQ [VarSub docker_id]]})]})]) (= scope= flags=0 words=[] bindings=[('KUBE_NODE_IP_ADDRESSES+', {[Array {[DQ [VarSub minion_ip]]}]})]) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "KUBE_NODE_IP_ADDRESSES: ["][VarSub KUBE_NODE_IP_ADDRESSES bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_STAR "*"}})][LIT_CHARS "]"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) ) (FunctionDef verify-prereqs [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Verifying required commands"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (AndOr OP_OR_IF (Com {[LIT_CHARS hash]} {[LIT_CHARS docker]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Missing required command: docker"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) (AndOr OP_OR_IF (Com {[LIT_CHARS hash]} {[LIT_CHARS docker]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Missing required command: docker-compose"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef cluster::mesos::docker::init_auth [] (List (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('auth_dir', {[DQ [VarSub MESOS_DOCKER_WORK_DIR][LIT_CHARS /auth]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating Auth Dir: "][VarSub auth_dir]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub auth_dir]]} ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub auth_dir]] [LIT_CHARS /] [LIT_OTHER "*"]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating Certificate Authority"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS buffer_output]} {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS run_in_docker_cagen]} {[DQ [VarSub auth_dir]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Certificate Authority Key: "][VarSub auth_dir][LIT_CHARS /root-ca.key]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Certificate Authority Cert: "][VarSub auth_dir][LIT_CHARS /root-ca.crt]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating Service Account RSA Key"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS buffer_output]} {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS run_in_docker_keygen]} {[DQ [VarSub auth_dir][LIT_CHARS /service-accounts.key]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Service Account Key: "][VarSub auth_dir][LIT_CHARS /service-accounts.key]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating User Accounts"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS create_token_user]} {[DQ [LIT_CHARS cluster-admin]]} < (FilenameRedirectNode filename={[DQ [VarSub auth_dir][LIT_CHARS /token-users]]} "> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Token Users: "][VarSub auth_dir][LIT_CHARS /token-users]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS create_basic_user]} {[DQ [LIT_CHARS admin]]} {[DQ [LIT_CHARS admin]]} < (FilenameRedirectNode filename={[DQ [VarSub auth_dir][LIT_CHARS /basic-users]]} "> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Basic-Auth Users: "][VarSub auth_dir][LIT_CHARS /basic-users]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) ) (FunctionDef kube-up [] (List (= scope= flags=0 words=[] bindings=[('work_dir', {[DQ [VarSub MESOS_DOCKER_WORK_DIR][LIT_CHARS /mesosslave]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Creating Mesos Work Dir: "][VarSub work_dir]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub work_dir]]} ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub work_dir]] [LIT_CHARS /] [LIT_OTHER "*"]} ) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('log_dir', {[DQ [VarSub MESOS_DOCKER_WORK_DIR][LIT_CHARS /log]]})]) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub log_dir]]} ) (Com {[LIT_CHARS rm]} {[LIT_CHARS -rf]} {[DQ [VarSub log_dir]] [LIT_CHARS /] [LIT_OTHER "*"]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Pulling Docker images"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker_compose_lazy_pull]} ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub MESOS_DOCKER_SKIP_BUILD]]} {[LIT_NEQUAL "!="]} {[DQ [LIT_CHARS true]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Building Docker images"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[DQ [VarSub provider_root][LIT_CHARS /km/build.sh]]} ) (Com {[DQ [VarSub provider_root][LIT_CHARS /test/build.sh]]} ) ) ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS init_auth]} ) (Com {[LIT_CHARS trap]} {[DQ [LIT_CHARS "cluster::mesos::docker::dump_logs '"][VarSub log_dir][LIT_CHARS "'"]]} {[LIT_CHARS EXIT]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Starting "][VarSub KUBERNETES_PROVIDER][LIT_CHARS " cluster"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker_compose]} {[LIT_CHARS up]} {[LIT_CHARS -d]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Scaling "][VarSub KUBERNETES_PROVIDER][LIT_CHARS " cluster to "][VarSub NUM_NODES][LIT_CHARS " slaves"]]} ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker_compose]} {[LIT_CHARS scale]} {[LIT_VAR_LIKE "mesosslave="] [VarSub NUM_NODES] =} ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS run_in_docker_test]} {[LIT_CHARS await-health-check]} {[DQ [LIT_CHARS "-t="][VarSub MESOS_DOCKER_API_TIMEOUT]]} {[LIT_CHARS http] [LIT_OTHER ":"] [LIT_CHARS //apiserver] [LIT_OTHER ":"] [LIT_CHARS 8888/healthz]} ) (Com {[LIT_CHARS detect-master]} ) (Com {[LIT_CHARS detect-nodes]} ) (Com {[LIT_CHARS create-kubeconfig]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Deploying Addons"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[DQ [VarSub provider_root][LIT_CHARS /deploy-addons.sh]]} more_env=[('KUBE_SERVER', {[VarSub KUBE_SERVER]})] ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS await_ready]} {[DQ [LIT_CHARS kube-dns]]} {[DQ [VarSub MESOS_DOCKER_ADDON_TIMEOUT]]} ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS await_ready]} {[DQ [LIT_CHARS kubernetes-dashboard]]} {[DQ [VarSub MESOS_DOCKER_ADDON_TIMEOUT]]} ) (Com {[LIT_CHARS trap]} {[LIT_CHARS -]} {[LIT_CHARS EXIT]} ) ) ) (FunctionDef validate-cluster [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Validating "][VarSub KUBERNETES_PROVIDER][LIT_CHARS " cluster"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "KubeDNS: "][ComSub (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS addon_status]} {[SQ ]})]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Kubernetes Dashboard: "][ComSub (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS addon_status]} {[SQ ]})]]} ) ) ) (FunctionDef kube-down [] (List (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub MESOS_DOCKER_DUMP_LOGS]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS true]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS dump_logs]} {[DQ [VarSub MESOS_DOCKER_WORK_DIR][LIT_CHARS /log]]} ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Stopping "][VarSub KUBERNETES_PROVIDER][LIT_CHARS " cluster"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker_compose]} {[LIT_CHARS kill]} ) (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker_compose]} {[LIT_CHARS rm]} {[LIT_CHARS -f]} ) ) ) (FunctionDef test-setup [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS test-setup]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/kube-up.sh]]} ) ) ) (FunctionDef test-teardown [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS test-teardown]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS kube-down]} ) ) ) (FunctionDef ssh-to-node [] (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "TODO: ssh-to-node"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) (FunctionDef cluster::mesos::docker::await_ready [] (List (= scope= flags=0 words=[] bindings=[('pod_name', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('max_attempts', {[DQ [VarSub 2]]})]) (= scope= flags=0 words=[] bindings=[('phase', {[DQ [LIT_CHARS Unknown]]})]) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [VarSub pod_name][LIT_CHARS ": "]]} ) (= scope= flags=0 words=[] bindings=[('n', {[LIT_CHARS 0]})]) (While (Com {[LIT_DBRACKET_LIKE "["]} {[VarSub n]} {[LIT_CHARS -ge]} {[VarSub max_attempts]} {[LIT_DBRACKET_LIKE "]"]} ) (List (= scope= flags=0 words=[] bindings=[('phase', {[ComSub (Com {[LIT_CHARS cluster] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS mesos] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS docker] [LIT_OTHER ":"] [LIT_OTHER ":"] [LIT_CHARS addon_status]} {[DQ [VarSub pod_name]]})]})]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub phase]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS Running]]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS break]} ) ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -n]} {[DQ [LIT_CHARS .]]} ) (= scope= flags=0 words=[] bindings=[('n', {[ArithSub {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub n]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}]})]) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 1]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [VarSub phase]]} ) (Com {[LIT_CHARS return]} {[ComSub (List (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub phase]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS Running]]} {[LIT_DBRACKET_LIKE "]"]}) (Com {[LIT_CHARS echo]} {[VarSub ?]}) )]} ) ) ) (FunctionDef cluster::mesos::docker::addon_status [] (List (= scope= flags=0 words=[] bindings=[('pod_name', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('kubectl', {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/kubectl.sh]]})]) (= scope= flags=0 words=[] bindings=[('phase', {[ComSub (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2)]{[DQ [VarSub kubectl]]} {[LIT_CHARS get]} {[LIT_CHARS pods]} {[LIT_CHARS --namespace] [LIT_DBRACKET_LIKE "="] [LIT_CHARS kube-system]} {[LIT_CHARS -l]} {[LIT_CHARS k8s-app] [LIT_DBRACKET_LIKE "="] [VarSub pod_name]} {[LIT_CHARS -o]} {[LIT_CHARS template]} {[LIT_CHARS --template] [LIT_DBRACKET_LIKE "="] [DQ [LIT_CHARS "{{(index .items 0).status.phase}}"]]})]})]) (= scope= flags=0 words=[] bindings=[('phase', {[DQ [VarSub phase test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS Unknown]}]]})]) (Com {[LIT_CHARS echo]} {[DQ [VarSub phase]]} ) ) ) (FunctionDef cluster::mesos::docker::dump_logs [] (List (= scope= flags=0 words=[] bindings=[('out_dir', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Dumping logs to '"][VarSub out_dir][LIT_CHARS "'"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS mkdir]} {[LIT_CHARS -p]} {[DQ [VarSub out_dir]]} ) (While (Com {[LIT_CHARS read]} {[LIT_CHARS name]} ) (List (Fork (Com {[LIT_CHARS docker]} {[LIT_CHARS logs]} {[DQ [VarSub name]]} ) ) (Com < (FilenameRedirectNode filename={[DQ [VarSub out_dir][LIT_CHARS /][VarSub name][LIT_CHARS .log]]} "> 1), > ) ) ) ) ) (FunctionDef cluster::mesos::docker::create_token_user [] (List (= scope= flags=0 words=[] bindings=[('user_name', {[DQ [VarSub 1]]})]) (Com {[LIT_CHARS echo]} {[DQ [ComSub (Com {[LIT_CHARS openssl]} {[LIT_CHARS rand]} {[LIT_CHARS -hex]} {[LIT_CHARS 32]})][LIT_CHARS ","][VarSub user_name][LIT_CHARS ","][VarSub user_name]]} ) ) ) (FunctionDef cluster::mesos::docker::create_basic_user [] (List (= scope= flags=0 words=[] bindings=[('user_name', {[DQ [VarSub 1]]})]) (= scope= flags=0 words=[] bindings=[('password', {[DQ [VarSub 2]]})]) (Com {[LIT_CHARS echo]} {[DQ [VarSub password][LIT_CHARS ","][VarSub user_name][LIT_CHARS ","][VarSub user_name]]} ) ) ) (FunctionDef cluster::mesos::docker::buffer_output [] (List (= scope= flags=0 words=[] bindings=[('cmd', {[DQ [VarSub @]]})]) (= scope= flags=0 words=[] bindings=[('tempfile', {[DQ [ComSub (Com {[LIT_CHARS mktemp]} {[DQ [VarSub TMPDIR test_op=VS_TEST_COLON_HYPHEN {[LIT_SLASH /] [LIT_CHARS tmp]}][LIT_CHARS /buffer.XXXXXX]]})]]})]) (Com {[LIT_CHARS trap]} {[DQ [LIT_CHARS "kill -TERM "][\ LIT_ESCAPED_CHAR "\\$"][LIT_CHARS "{PID}; rm '"][VarSub tempfile][LIT_CHARS "'"]]} {[LIT_CHARS TERM]} {[LIT_CHARS INT]} ) (Com {[LIT_CHARS set]} {[LIT_OTHER "+"] [LIT_CHARS e]} ) (Fork (Com {[VarSub cmd]} ) ) (Fork (Com < (FilenameRedirectNode filename={[DQ [VarSub tempfile]]} "> 1), > ) ) (= scope= flags=0 words=[] bindings=[('PID', {[VarSub !]})]) (Com {[LIT_CHARS wait]} {[VarSub PID]} ) (Com {[LIT_CHARS trap]} {[LIT_CHARS -]} {[LIT_CHARS TERM]} {[LIT_CHARS INT]} ) (Com {[LIT_CHARS wait]} {[VarSub PID]} ) (= scope= flags=0 words=[] bindings=[('exit_status', {[DQ [VarSub ?]]})]) (Com {[LIT_CHARS set]} {[LIT_CHARS -e]} ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub exit_status]]} {[LIT_NEQUAL "!="]} {[LIT_CHARS 0]} {[LIT_DBRACKET_LIKE "]"]} ) (Com {[LIT_CHARS cat]} {[DQ [VarSub tempfile]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) ) (Com {[LIT_CHARS rm]} {[DQ [VarSub tempfile]]} ) (Com {[LIT_CHARS return]} {[DQ [VarSub exit_status]]} ) ) ) )