(List (= scope= flags=0 words=[] bindings=[('KUBE_ROOT', {[ComSub (Com {[LIT_CHARS dirname]} {[DQ [VarSub BASH_SOURCE]]})] [LIT_CHARS /../..]})]) (Com {[LIT_CHARS source]} {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub BASH_SOURCE]})] [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]]} ) (Com {[LIT_CHARS source]} {[DQ [VarSub KUBE_ROOT][LIT_CHARS /cluster/rackspace/authorization.sh]]} ) (FunctionDef verify-prereqs [] (List (For x [{[LIT_CHARS nova]}, {[LIT_CHARS swiftly]}]) (If (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [ComSub (Com {[LIT_CHARS which]} {[VarSub x]})]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ ]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Can't find "][VarSub x][LIT_CHARS " in PATH, please fix and retry."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub OS_AUTH_URL test_op=VS_TEST_HYPHEN {}]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: OS_AUTH_URL not set."]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][LIT_CHARS "export OS_AUTH_URL=https://identity.api.rackspacecloud.com/v2.0/"]]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub OS_USERNAME test_op=VS_TEST_HYPHEN {}]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: OS_USERNAME not set."]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][LIT_CHARS "export OS_USERNAME=myusername"]]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) (If (DBracket {B1 UNARY_STRING_z {[DQ [VarSub OS_PASSWORD test_op=VS_TEST_HYPHEN {}]]}}) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: OS_PASSWORD not set."]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][LIT_CHARS "export OS_PASSWORD=myapikey"]]} ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef rax-ssh-key [] (List (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_OTHER "!"]} {[LIT_CHARS -f]} {[VarSub HOME] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Generating SSH KEY "][VarSub HOME][LIT_CHARS /.ssh/][VarSub SSH_KEY_NAME]]} ) (Com {[LIT_CHARS ssh-keygen]} {[LIT_CHARS -f]} {[VarSub HOME] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[LIT_CHARS -N]} {[SQ ]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), > ) ) ) (If (Pipeline! (Com {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS keypair-list]}) (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1) (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2)]{[LIT_CHARS grep]} {[VarSub SSH_KEY_NAME]}) )]} ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Uploading key to Rackspace:"]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][LIT_CHARS "nova keypair-add "][VarSub SSH_KEY_NAME][LIT_CHARS " --pub-key "][VarSub HOME][LIT_CHARS /.ssh/][VarSub SSH_KEY_NAME][LIT_CHARS .pub]]} ) (Com {[LIT_CHARS nova]} {[LIT_CHARS keypair-add]} {[VarSub SSH_KEY_NAME]} {[LIT_CHARS --pub-key]} {[VarSub HOME] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME] [LIT_CHARS .pub]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: SSH key "][VarSub SSH_KEY_NAME][LIT_CHARS ".pub already uploaded"]]} ) ) ) ) (FunctionDef rackspace-set-vars [] (List (= scope= flags=0 words=[] bindings=[('CLOUDFILES_CONTAINER', {[DQ [LIT_CHARS kubernetes-releases-][VarSub OS_USERNAME]]})]) (= scope= flags=0 words=[] bindings=[('CONTAINER_PREFIX', {[VarSub CONTAINER_PREFIX test_op=VS_TEST_HYPHEN {[LIT_CHARS devel] [LIT_SLASH /]}]})]) (Com {[LIT_CHARS find-release-tars]} ) ) ) (FunctionDef find-object-url [] (List (Com {[LIT_CHARS rackspace-set-vars]} ) (= scope= flags=0 words=[] bindings=[('KUBE_TAR', {[VarSub CLOUDFILES_CONTAINER] [LIT_CHARS /] [VarSub CONTAINER_PREFIX] [LIT_CHARS /kubernetes-server-linux-amd64.tar.gz]})]) (= scope= flags=0 words=[] bindings=[('RELEASE_TMP_URL', {[ComSub (Com {[LIT_CHARS swiftly]} {[LIT_CHARS -A]} {[VarSub OS_AUTH_URL]} {[LIT_CHARS -U]} {[VarSub OS_USERNAME]} {[LIT_CHARS -K]} {[VarSub OS_PASSWORD]} {[LIT_CHARS tempurl]} {[LIT_CHARS GET]} {[VarSub KUBE_TAR]} {[LIT_CHARS 86400]})]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Object temp URL:"]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][VarSub RELEASE_TMP_URL]]} ) ) ) (FunctionDef ensure_dev_container [] (List (= scope= flags=0 words=[] bindings=[('SWIFTLY_CMD', {[DQ [LIT_CHARS "swiftly -A "][VarSub OS_AUTH_URL][LIT_CHARS " -U "][VarSub OS_USERNAME][LIT_CHARS " -K "][VarSub OS_PASSWORD]]})]) (If (Pipeline! (Com {[VarSub SWIFTLY_CMD]} {[LIT_CHARS get]} {[VarSub CLOUDFILES_CONTAINER]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Container doesn't exist. Creating container "][VarSub CLOUDFILES_CONTAINER]]} ) (Com {[VarSub SWIFTLY_CMD]} {[LIT_CHARS put]} {[VarSub CLOUDFILES_CONTAINER]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) ) ) ) (FunctionDef copy_dev_tarballs [] (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Uploading to Cloud Files"]]} ) (Com {[VarSub SWIFTLY_CMD]} {[LIT_CHARS put]} {[LIT_CHARS -i]} {[VarSub SERVER_BINARY_TAR]} {[VarSub CLOUDFILES_CONTAINER] [LIT_CHARS /] [VarSub CONTAINER_PREFIX] [LIT_CHARS /kubernetes-server-linux-amd64.tar.gz]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Release pushed."]]} ) ) ) (FunctionDef prep_known_tokens [] (List (ForExpr {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}}} {A2 AS_OP_LESS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}}) transform_ops=[(#len)]]}}} {A1 AS_OP_DPLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} } (List (Com {[LIT_CHARS generate_kubelet_tokens]} {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})]} ) (Com {[LIT_CHARS cat]} {[VarSub KUBE_TEMP] [LIT_CHARS /] [VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})] [LIT_CHARS _tokens.csv]} < (FilenameRedirectNode filename={[VarSub KUBE_TEMP] [LIT_CHARS /known_tokens.csv]} >"> 1), > ) ) ) (= scope= flags=0 words=[{[LIT_CHARS -r]}] bindings=[('service_accounts', {[Array {[DQ [LIT_CHARS "system:scheduler"]]} {[DQ [LIT_CHARS "system:controller_manager"]]} {[DQ [LIT_CHARS "system:logging"]]} {[DQ [LIT_CHARS "system:monitoring"]]} {[DQ [LIT_CHARS "system:dns"]]}]})]) (For account [{[DQ [VarSub service_accounts bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}})]]}]) (Com {[LIT_CHARS echo]} {[DQ [ComSub (Com {[LIT_CHARS create_token]})][LIT_CHARS ","][VarSub account][LIT_CHARS ","][VarSub account]]} < (FilenameRedirectNode filename={[VarSub KUBE_TEMP] [LIT_CHARS /known_tokens.csv]} >"> 1), > ) ) (Com {[LIT_CHARS generate_admin_token]} ) ) ) (FunctionDef rax-boot-master [] (List (= scope= flags=0 words=[] bindings=[('DISCOVERY_URL', {[ComSub (Com {[LIT_CHARS curl]} {[LIT_CHARS https] [LIT_OTHER ":"] [LIT_CHARS //discovery.etcd.io/new] [LIT_OTHER "?"] [LIT_VAR_LIKE "size="] [LIT_CHARS 1]})]})]) (= scope= flags=0 words=[] bindings=[('DISCOVERY_ID', {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[DQ [VarSub DISCOVERY_URL]]}) (Com {[LIT_CHARS cut]} {[LIT_CHARS -f]} {[LIT_CHARS 4]} {[LIT_CHARS -d]} {[LIT_CHARS /]}) )]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: etcd discovery URL: "][VarSub DISCOVERY_URL]]} ) (Com {[LIT_CHARS sed]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|DISCOVERY_ID|"][VarSub DISCOVERY_ID][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|CLOUD_FILES_URL|"][VarSub RELEASE_TMP_URL transform_ops=[PatSub {[LIT_CHARS "&"]} {[\ LIT_ESCAPED_CHAR "\\\\"] [LIT_CHARS "&"]} do_all]][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBE_USER|"][VarSub KUBE_USER][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBE_PASSWORD|"][VarSub KUBE_PASSWORD][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|SERVICE_CLUSTER_IP_RANGE|"][VarSub SERVICE_CLUSTER_IP_RANGE][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBE_NETWORK|"][VarSub KUBE_NETWORK][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|OS_AUTH_URL|"][VarSub OS_AUTH_URL][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|OS_USERNAME|"][VarSub OS_USERNAME][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|OS_PASSWORD|"][VarSub OS_PASSWORD][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|OS_TENANT_NAME|"][VarSub OS_TENANT_NAME][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|OS_REGION_NAME|"][VarSub OS_REGION_NAME][LIT_CHARS "|"]]} {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub 0]})] [LIT_CHARS /rackspace/cloud-config/master-cloud-config.yaml]} < (FilenameRedirectNode filename={[VarSub KUBE_TEMP] [LIT_CHARS /master-cloud-config.yaml]} "> 1), > ) (= scope= flags=0 words=[] bindings=[('MASTER_BOOT_CMD', {[DQ [LIT_CHARS "nova boot "][LIT_CHARS "--key-name "][VarSub SSH_KEY_NAME][LIT_CHARS " "][LIT_CHARS "--flavor "][VarSub KUBE_MASTER_FLAVOR][LIT_CHARS " "][LIT_CHARS "--image "][VarSub KUBE_IMAGE][LIT_CHARS " "][LIT_CHARS "--meta "][VarSub MASTER_TAG][LIT_CHARS " "][LIT_CHARS "--meta ETCD="][VarSub DISCOVERY_ID][LIT_CHARS " "][LIT_CHARS "--user-data "][VarSub KUBE_TEMP][LIT_CHARS "/master-cloud-config.yaml "][LIT_CHARS "--config-drive true "][LIT_CHARS "--nic net-id="][VarSub NETWORK_UUID][LIT_CHARS " "][VarSub MASTER_NAME]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Booting "][VarSub MASTER_NAME][LIT_CHARS " with following command:"]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][VarSub MASTER_BOOT_CMD]]} ) (Com {[VarSub MASTER_BOOT_CMD]} ) ) ) (FunctionDef rax-boot-nodes [] (List (Com {[LIT_CHARS cp]} {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub 0]})] [LIT_CHARS /rackspace/cloud-config/node-cloud-config.yaml]} {[VarSub KUBE_TEMP] [LIT_CHARS /node-cloud-config.yaml]} ) (ForExpr {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}}} {A2 AS_OP_LESS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}}) transform_ops=[(#len)]]}}} {A1 AS_OP_DPLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} } (List (Com {[LIT_CHARS get_tokens_from_csv]} {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})]} ) (Com {[LIT_CHARS sed]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|DISCOVERY_ID|"][VarSub DISCOVERY_ID][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|CLOUD_FILES_URL|"][VarSub RELEASE_TMP_URL transform_ops=[PatSub {[LIT_CHARS "&"]} {[\ LIT_ESCAPED_CHAR "\\\\"] [LIT_CHARS "&"]} do_all]][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|DNS_SERVER_IP|"][VarSub DNS_SERVER_IP test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|DNS_DOMAIN|"][VarSub DNS_DOMAIN test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|ENABLE_CLUSTER_DNS|"][VarSub ENABLE_CLUSTER_DNS test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS false]}][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|ENABLE_NODE_LOGGING|"][VarSub ENABLE_NODE_LOGGING test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS false]}][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|INDEX|"][ArithSub {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}][LIT_CHARS "|g"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBELET_TOKEN|"][VarSub KUBELET_TOKEN][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBE_NETWORK|"][VarSub KUBE_NETWORK][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBELET_TOKEN|"][VarSub KUBELET_TOKEN][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|KUBE_PROXY_TOKEN|"][VarSub KUBE_PROXY_TOKEN][LIT_CHARS "|"]]} {[LIT_CHARS -e]} {[DQ [LIT_CHARS "s|LOGGING_DESTINATION|"][VarSub LOGGING_DESTINATION test_op=VS_TEST_COLON_HYPHEN {}][LIT_CHARS "|"]]} {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub 0]})] [LIT_CHARS /rackspace/cloud-config/node-cloud-config.yaml]} < (FilenameRedirectNode filename={[VarSub KUBE_TEMP] [LIT_CHARS /node-cloud-config-] [ArithSub {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}] [LIT_CHARS .yaml]} "> 1), > ) (= scope= flags=0 words=[] bindings=[('NODE_BOOT_CMD', {[DQ [LIT_CHARS "nova boot "][LIT_CHARS "--key-name "][VarSub SSH_KEY_NAME][LIT_CHARS " "][LIT_CHARS "--flavor "][VarSub KUBE_NODE_FLAVOR][LIT_CHARS " "][LIT_CHARS "--image "][VarSub KUBE_IMAGE][LIT_CHARS " "][LIT_CHARS "--meta "][VarSub NODE_TAG][LIT_CHARS " "][LIT_CHARS "--user-data "][VarSub KUBE_TEMP][LIT_CHARS /node-cloud-config-][ArithSub {A2 AS_OP_PLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 1]}}}][LIT_CHARS ".yaml "][LIT_CHARS "--config-drive true "][LIT_CHARS "--nic net-id="][VarSub NETWORK_UUID][LIT_CHARS " "][VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Booting "][VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})][LIT_CHARS " with following command:"]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][VarSub NODE_BOOT_CMD]]} ) (Com {[VarSub NODE_BOOT_CMD]} ) ) ) ) ) (FunctionDef rax-nova-network [] (If (Pipeline! (Com {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS network-list]}) (Com redirects=[(FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1) (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2)]{[LIT_CHARS grep]} {[VarSub NOVA_NETWORK_LABEL]}) )]} ) ) (List (= scope= flags=0 words=[] bindings=[('SAFE_CIDR', {[ComSub (Pipeline (Com {[LIT_CHARS echo]} {[VarSub NOVA_NETWORK_CIDR]}) (Com {[LIT_CHARS tr]} {[LIT_CHARS -d]} {[SQ ]}) )]})]) (= scope= flags=0 words=[] bindings=[('NETWORK_CREATE_CMD', {[DQ [LIT_CHARS "nova network-create "][VarSub NOVA_NETWORK_LABEL][LIT_CHARS " "][VarSub SAFE_CIDR]]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Creating cloud network with following command:"]]} ) (Com {[LIT_CHARS echo]} {[LIT_CHARS -e]} {[DQ [\ LIT_ESCAPED_CHAR "\\t"][VarSub NETWORK_CREATE_CMD]]} ) (Com {[VarSub NETWORK_CREATE_CMD]} ) ) (ElseTrue) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Using existing cloud network "][VarSub NOVA_NETWORK_LABEL]]} ) ) ) (FunctionDef detect-nodes [] (List (= scope= flags=0 words=[] bindings=[('KUBE_NODE_IP_ADDRESSES', {[Array ]})]) (ForExpr {A2 AS_OP_EQUAL {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}}} {A2 AS_OP_LESS {A Atom NODE_ARITH_WORD {[VarSub i]}} {A Atom NODE_ARITH_WORD {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {AS_OP_AT "@"}}) transform_ops=[(#len)]]}}} {A1 AS_OP_DPLUS {A Atom NODE_ARITH_WORD {[VarSub i]}} } (List (= scope= flags=0 words=[] bindings=[('node_ip', {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS show]} {[LIT_CHARS --minimal]} {[VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})]}) (Com {[LIT_CHARS grep]} {[LIT_CHARS accessIPv4]}) (Com {[LIT_CHARS awk]} {[SQ ]}) )]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Found "][VarSub NODE_NAMES bracket_op=(Index {A Atom NODE_ARITH_WORD {[VarSub i]}})][LIT_CHARS " at "][VarSub node_ip]]} ) (= scope= flags=0 words=[] bindings=[('KUBE_NODE_IP_ADDRESSES+', {[Array {[DQ [VarSub node_ip]]}]})]) ) ) (If (Com {[LIT_DBRACKET_LIKE "["]} {[LIT_CHARS -z]} {[DQ [VarSub KUBE_NODE_IP_ADDRESSES]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Could not detect Kubernetes node nodes. Make sure you've launched a cluster with 'kube-up.sh'"]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]} ) ) ) ) ) (FunctionDef detect-master [] (List (= scope= flags=0 words=[] bindings=[('KUBE_MASTER', {[VarSub MASTER_NAME]})]) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Waiting for "][VarSub MASTER_NAME][LIT_CHARS " IP Address."]]} ) (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " This will continually check to see if the master node has an IP address."]]} ) (Com {[LIT_CHARS echo]} ) (= scope= flags=0 words=[] bindings=[('KUBE_MASTER_IP', {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS show]} {[VarSub KUBE_MASTER]} {[LIT_CHARS --minimal]}) (Com {[LIT_CHARS grep]} {[LIT_CHARS accessIPv4]}) (Com {[LIT_CHARS awk]} {[SQ ]}) )]})]) (While (Com {[LIT_DBRACKET_LIKE "["]} {[DQ [VarSub KUBE_MASTER_IP test_op=VS_TEST_HYPHEN {[LIT_CHARS "|"]}]]} {[LIT_DBRACKET_LIKE "=="]} {[DQ [LIT_CHARS "|"]]} {[LIT_DBRACKET_LIKE "]"]} ) (List (= scope= flags=0 words=[] bindings=[('KUBE_MASTER_IP', {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS show]} {[VarSub KUBE_MASTER]} {[LIT_CHARS --minimal]}) (Com {[LIT_CHARS grep]} {[LIT_CHARS accessIPv4]}) (Com {[LIT_CHARS awk]} {[SQ ]}) )]})]) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS .]]} ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 2]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [VarSub KUBE_MASTER][LIT_CHARS " IP Address is "][VarSub KUBE_MASTER_IP]]} ) ) ) (FunctionDef detect-master-nova-net [] (List (= scope= flags=0 words=[] bindings=[('KUBE_MASTER', {[VarSub MASTER_NAME]})]) (= scope= flags=0 words=[] bindings=[('MASTER_IP', {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS show]} {[VarSub KUBE_MASTER]} {[LIT_CHARS --minimal]}) (Com {[LIT_CHARS grep]} {[VarSub 1]}) (Com {[LIT_CHARS awk]} {[SQ ]}) )]})]) ) ) (FunctionDef kube-up [] (List (= scope= flags=0 words=[] bindings=[('SCRIPT_DIR', {[ComSub (List (Com more_env=[('CDPATH', {[DQ ]})] {[LIT_CHARS cd]} {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub 0]})]}) (Com {[LIT_CHARS pwd]}) )]})]) (Com {[LIT_CHARS rackspace-set-vars]} ) (Com {[LIT_CHARS ensure_dev_container]} ) (Com {[LIT_CHARS copy_dev_tarballs]} ) (Com {[LIT_CHARS find-object-url]} ) (= scope= flags=0 words=[] bindings=[('KUBE_TEMP', {[ComSub (Com {[LIT_CHARS mktemp]} {[LIT_CHARS -d]} {[LIT_CHARS -t]} {[LIT_CHARS kubernetes.XXXXXX]})]})]) (Com {[LIT_CHARS trap]} {[DQ [LIT_CHARS "rm -rf "][VarSub KUBE_TEMP]]} {[LIT_CHARS EXIT]} ) (Com {[LIT_CHARS load-or-gen-kube-basicauth]} ) (Com {[LIT_CHARS python2.7]} {[ComSub (Com {[LIT_CHARS dirname]} {[VarSub 0]})] [LIT_CHARS /../third_party/htpasswd/htpasswd.py]} {[LIT_CHARS -b]} {[LIT_CHARS -c]} {[VarSub KUBE_TEMP] [LIT_CHARS /htpasswd]} {[VarSub KUBE_USER]} {[VarSub KUBE_PASSWORD]} ) (= scope= flags=0 words=[] bindings=[('HTPASSWD', {[ComSub (Com {[LIT_CHARS cat]} {[VarSub KUBE_TEMP] [LIT_CHARS /htpasswd]})]})]) (Com {[LIT_CHARS rax-nova-network]} ) (= scope= flags=0 words=[] bindings=[('NETWORK_UUID', {[ComSub (Pipeline (Com {[LIT_CHARS nova]} {[LIT_CHARS network-list]}) (Com {[LIT_CHARS grep]} {[LIT_CHARS -i]} {[VarSub NOVA_NETWORK_LABEL]}) (Com {[LIT_CHARS awk]} {[SQ ]}) )]})]) (Com {[LIT_CHARS rax-ssh-key]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "cluster/rackspace/util.sh: Starting Cloud Servers"]]} ) (Com {[LIT_CHARS prep_known_tokens]} ) (Com {[LIT_CHARS rax-boot-master]} ) (Com {[LIT_CHARS rax-boot-nodes]} ) (Com {[LIT_CHARS detect-master]} ) (Com {[ComSub (Com {[LIT_CHARS scp]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "StrictHostKeyChecking="] [LIT_CHARS no] =} {[LIT_CHARS -i]} {[TildeSub ''] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[VarSub KUBE_TEMP] [LIT_CHARS /known_tokens.csv]} {[LIT_CHARS core] [LIT_OTHER "@"] [VarSub KUBE_MASTER_IP] [LIT_OTHER ":"] [LIT_CHARS /home/core/known_tokens.csv]})]} ) (Com {[ComSub (Com {[LIT_CHARS sleep]} {[LIT_CHARS 2]})]} ) (Com {[ComSub (Com {[LIT_CHARS ssh]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "StrictHostKeyChecking="] [LIT_CHARS no] =} {[LIT_CHARS -i]} {[TildeSub ''] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[LIT_CHARS core] [LIT_OTHER "@"] [VarSub KUBE_MASTER_IP]} {[LIT_CHARS sudo]} {[LIT_CHARS /usr/bin/mkdir]} {[LIT_CHARS -p]} {[LIT_CHARS /var/lib/kube-apiserver]})]} ) (Com {[ComSub (Com {[LIT_CHARS ssh]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "StrictHostKeyChecking="] [LIT_CHARS no] =} {[LIT_CHARS -i]} {[TildeSub ''] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[LIT_CHARS core] [LIT_OTHER "@"] [VarSub KUBE_MASTER_IP]} {[LIT_CHARS sudo]} {[LIT_CHARS mv]} {[LIT_CHARS /home/core/known_tokens.csv]} {[LIT_CHARS /var/lib/kube-apiserver/known_tokens.csv]})]} ) (Com {[ComSub (Com {[LIT_CHARS ssh]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "StrictHostKeyChecking="] [LIT_CHARS no] =} {[LIT_CHARS -i]} {[TildeSub ''] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[LIT_CHARS core] [LIT_OTHER "@"] [VarSub KUBE_MASTER_IP]} {[LIT_CHARS sudo]} {[LIT_CHARS chown]} {[LIT_CHARS root.root]} {[LIT_CHARS /var/lib/kube-apiserver/known_tokens.csv]})]} ) (Com {[ComSub (Com {[LIT_CHARS ssh]} {[LIT_CHARS -o]} {[LIT_VAR_LIKE "StrictHostKeyChecking="] [LIT_CHARS no] =} {[LIT_CHARS -i]} {[TildeSub ''] [LIT_CHARS /.ssh/] [VarSub SSH_KEY_NAME]} {[LIT_CHARS core] [LIT_OTHER "@"] [VarSub KUBE_MASTER_IP]} {[LIT_CHARS sudo]} {[LIT_CHARS systemctl]} {[LIT_CHARS restart]} {[LIT_CHARS kube-apiserver]})]} ) (= scope= flags=0 words=[] bindings=[('FAIL', {[LIT_CHARS 0]})]) (For job [{[ComSub (Com {[LIT_CHARS jobs]} {[LIT_CHARS -p]})]}]) (AndOr OP_OR_IF (Com {[LIT_CHARS wait]} {[VarSub job]} ) (Com {[LIT_CHARS let]} {[DQ [LIT_CHARS "FAIL+=1"]]} ) ) ) (If (DParen {A2 AS_OP_NEQUAL {A Atom NODE_ARITH_WORD {[VarSub FAIL]}} {A Atom NODE_ARITH_WORD {[AS_NUM_LITERAL 0]}}}) (List (Com {[LIT_CHARS echo]} {[DQ [VarSub FAIL][LIT_CHARS " commands failed. Exiting."]]} ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 2]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Waiting for cluster initialization."]]} ) (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " This will continually check to see if the API for kubernetes is reachable."]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " This might loop forever if there was some uncaught error during start"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " up."]]} ) (Com {[LIT_CHARS echo]} ) (While (Com {[ComSub (Com {[LIT_CHARS curl]} {[LIT_CHARS --insecure]} {[LIT_CHARS --user]} {[VarSub KUBE_USER] [LIT_OTHER ":"] [VarSub KUBE_PASSWORD]} {[LIT_CHARS --max-time]} {[LIT_CHARS 5]} {[LIT_CHARS --fail]} {[LIT_CHARS --output]} {[LIT_CHARS /dev/null]} {[LIT_CHARS --silent]} {[LIT_CHARS https] [LIT_OTHER ":"] [LIT_CHARS //] [VarSub KUBE_MASTER_IP] [LIT_CHARS /healthz]})]} ) (List (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS .]]} ) (Com {[LIT_CHARS sleep]} {[LIT_CHARS 2]} ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Kubernetes cluster created."]]} ) (= scope= flags=1 words=[] bindings=[('KUBE_CERT', {[DQ ]})]) (= scope= flags=1 words=[] bindings=[('KUBE_KEY', {[DQ ]})]) (= scope= flags=1 words=[] bindings=[('CA_CERT', {[DQ ]})]) (= scope= flags=1 words=[] bindings=[('CONTEXT', {[DQ [LIT_CHARS rackspace_][VarSub INSTANCE_PREFIX]]})]) (Com {[LIT_CHARS create-kubeconfig]} ) (Com {[LIT_CHARS set]} {[LIT_OTHER "+"] [LIT_CHARS e]} ) (Com {[LIT_CHARS detect-nodes]} ) (Com {[LIT_CHARS get-kubeconfig-basicauth]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "All nodes may not be online yet, this is okay."]]} ) (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Kubernetes cluster is running. The master is running at:"]]} ) (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " https://"][VarSub KUBE_MASTER_IP]]} ) (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "The user name and password to use is located in "][VarSub KUBECONFIG test_op=VS_TEST_COLON_HYPHEN {[VarSub DEFAULT_KUBECONFIG]}][LIT_CHARS .]]} ) (Com {[LIT_CHARS echo]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Security note: The server above uses a self signed certificate. This is"]]} ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS " subject to "][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS "Man in the middle"][\ LIT_ESCAPED_CHAR "\\\""][LIT_CHARS " type attacks."]]} ) (Com {[LIT_CHARS echo]} ) ) ) (FunctionDef prepare-e2e [] (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Rackspace doesn't need special preparations for e2e tests"]]} ) ) )