#list all pod Ids
/usr/bin/kubectl get -o json pods |jq --raw-output '.items | .[] |.metadata|.name'
# delete all pods
/usr/bin/kubectl get -o json pods |jq --raw-output '.items | .[] | .metadata | .name' | xargs --no-run-if-empty -I name /usr/bin/kubectl delete pods name
# delete all services
/usr/bin/kubectl get -o json services |jq --raw-output '.items | .[] | .id' | xargs --no-run-if-empty -I name /usr/bin/kubectl delete services name
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
* * * * * hudson /home/hudson/rhq-dir-size.sh |
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 | |
now=`date +%FT%TZ` | |
s=`du -sk /home/hudson/rhq-data | awk '{print $1}'` | |
echo "$now,$s" >> /tmp/rhq-dir-size.txt |
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
#docker | |
ssh -L 2375:10.16.23.108:2375 root@10.16.23.108 | |
#consul | |
ssh -L 8500:10.16.23.108:8500 root@10.16.23.108 | |
#geard | |
ssh -L 43273:10.16.23.108:43273 root@10.16.23.108 |
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
# Generated by iptables-save v1.4.19.1 on Fri Oct 31 12:21:46 2014 | |
*nat | |
:PREROUTING ACCEPT [4:192] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
:KUBE-PROXY - [0:0] | |
-A PREROUTING -j KUBE-PROXY | |
-A OUTPUT -j KUBE-PROXY | |
-A KUBE-PROXY -d 10.254.0.1/32 -p tcp -m comment --comment jon-demo-endpoint -m tcp --dport 56000 -j REDIRECT --to-ports 57405 |
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 | |
iptables -F | |
iptables -X | |
while read type; | |
do | |
iptables -t $type -F | |
iptables -t $type -X | |
done </proc/net/ip_tables_names | |
iptables -P INPUT ACCEPT |
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
# clean up previous containers | |
docker rm -f hawkular hawkular-storage | |
# start storage node | |
docker run -d --name=hawkular-storage abh1nav/cassandra | |
# get cassandra ip | |
storage=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' hawkular-storage) | |
# start hawkular |
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
oc delete rc hawkular-cassandra hawkular-metrics heapster | |
oc delete services hawkular-cassandra hawkular-cassandra-nodes hawkular-metrics heapster | |
oc delete endpoints hawkular-cassandra hawkular-cassandra-nodes hawkular-metrics heapster | |
oc delete sa hawkular |
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
# oc process -f metrics.yaml -v \ | |
HAWKULAR_METRICS_HOSTNAME=hawkular-metrics-metrics.cloud.jonqe.lab.eng.bos.redhat.com,\ | |
IMAGE_PREFIX=hawkularqe/origin-,IMAGE_VERSION=devel,USE_PERSISTENT_STORAGE=false,\ | |
MASTER_URL=https://openshift-master1.bc.jonqe.lab.eng.bos.redhat.com:8443\ | |
| oc create -f - | |
# cleanup | |
oc delete secret metrics-deployer heapster-secrets hawkular-cassandra-secrets hawkular-cassandra-certificate | |
oc delete sa hawkular heapster metrics-deployer |
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
# docker run --name cassandra -d cassandra:2.2 bash -c "sed -i 's/^start_rpc.*$/start_rpc: true/' /etc/cassandra/cassandra.yaml; /docker-entrypoint.sh -f" | |
# docker run --name hawkular --link cassandra -e CASSANDRA_NODES=cassandra -e TEST_MODE=true -dP hawkular/hawkular |
OlderNewer