Created
January 22, 2019 12:42
-
-
Save s1061123/db93b6bbd0d2f8ae328a79dc05fef9fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export KUBECONFIG=$(readlink -f auth/kubeconfig) | |
master=$(oc get -o json node | jq '.items| map(select( .metadata.labels["node-role.kubernetes.io/master"] == "" )) | .[0].status.addresses | map(select( .["type"] == "InternalDNS")) | .[0]."address"' -r) | |
master_extdns=$(oc get -o json node $master | jq ' .status.addresses | map(select( .["type"] == "ExternalDNS")) | .[0]."address"' -r) | |
scp -q -i ~/.ssh/libra.pem -o ProxyCommand="ssh -q -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" -r core@${master}:~/data . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export KUBECONFIG=$(readlink -f auth/kubeconfig) | |
master=$(oc get -o json node | jq '.items| map(select( .metadata.labels["node-role.kubernetes.io/master"] == "" )) | .[0].status.addresses | map(select( .["type"] == "InternalDNS")) | .[0]."address"' -r) | |
master_extdns=$(oc get -o json node $master | jq ' .status.addresses | map(select( .["type"] == "ExternalDNS")) | .[0]."address"' -r) | |
worker_nodes=$(oc get -o json node | jq '.items| map(select( .metadata.labels["node-role.kubernetes.io/worker"] == "" )) | .[].status.addresses | map(select( .["type"] == "InternalDNS")) | .[].address ' -r | tr '\n' ' ') | |
for i in $worker_nodes; do | |
ssh -i ~/.ssh/libra.pem -q -o ProxyCommand="ssh -q -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" core@$i \ | |
sudo "sed -e 's/\"$/ --enable-metrics --metrics-port 4242\"/' -i /etc/sysconfig/crio-network" | |
ssh -i ~/.ssh/libra.pem -q -o ProxyCommand="ssh -q -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" core@$i \ | |
sudo systemctl restart crio.service | |
done | |
for i in $worker_nodes; do | |
ssh -i ~/.ssh/libra.pem -q -o ProxyCommand="ssh -q -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" core@$i sudo cat /etc/sysconfig/crio-network | |
done | |
for i in $worker_nodes; do | |
ssh -i ~/.ssh/libra.pem -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -q -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" core@$i ip address show tun0 | grep "inet " | |
done | |
scp -q -i ~/.ssh/libra.pem -o ProxyCommand="ssh -q -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" -r ../prom/ core@${master}:~/ | |
ssh -i ~/.ssh/libra.pem -o ProxyCommand="ssh -A -i ~/.ssh/libra.pem -W %h:%p core@${master_extdns}" core@$master ./prom/prometheus --config.file=prom/prometheus.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export KUBECONFIG=$(readlink -f auth/kubeconfig) | |
region=$(cat metadata.json | jq .aws.region -r) | |
../openshift-tests run kubernetes/conformance --provider "{\"type\":\"aws\",\"zone\":\"${region}\"}" -o teste2e.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment