View gist:6b0a990f640fe5bf226d9f73c38fde50
HEALTH DETAILS
curl -XGET http://log:9200/_cluster/health?pretty
WHAT ARE THE CUSTOM SETTINGS?
curl -XGET 'log:9200/_cluster/settings?pretty'
HEALTH DETAILS
curl -XGET http://log:9200/_cluster/health?pretty
View gist:2d0d61442a745e9cd5afb85ef8e45aa8
cat terraform.tfstate | jq -r '.modules[0].resources | map(select(.type == "google_compute_instance")) | map([.primary.id, " ansible_ssh_host=", .primary.attributes["network_interface.0.access_config.0.nat_ip"]] | join("")) | sort | .[]'
View docker-compose.yml
version: '3.2'
services:
bastion:
image: christophermaier/test-probe:0.1.0-20180509175222
command:
- "run"
- "--listen-ctl=0.0.0.0:9632"
- "--permanent-peer"
hostname: bastion
domainname: habitat.dev
View Kafka cheet sheets.md

Kafka

get size for all topics on worker

 for topic in $(find   /opt/cloudera/data/*/kafka/ -maxdepth 1 -mindepth 1 -type d -exec basename {} \;| awk -F '-' '{print $1}'| sort |uniq | grep -v consumer_offsets);do

du -csh /opt/cloudera/data/*/kafka/${topic}*| grep total| awk '{print "topic '$topic' "$1}'
done
View Galera.md

Galera

Restore MYSQL cluster

  1. Kill all mysql process on whole cluster (check via ps aux| grep mysql)
  2. Remove grastate.data and ib_logfiles
    • rm /var/lib/mysql/grastate.data
    • rm /var/lib/mysql/ib_logfile*
  3. Edit this row in /etc/mysql/my.cnf on `"wsrep_cluster_address="gcomm://""``
  4. Start MySql on this node
View Aptly
aptly mirror list -raw | grep -E '*' | xargs -n 1 aptly mirror update
aptly_mirror_update.sh -s -v
aptly-publisher --architectures=amd64 --timeout=1200 publish -v -c /etc/aptly-publisher.yaml --url http://192.168.104.50:8084 --recreate
aptly-publisher --url http://192.168.104.50:8084 promote --source ubuntu-trusty/nightly --target ubuntu-trusty/testing --force-overwrite -d --timeout 600 --recreate
aptly-publisher --url http://192.168.104.50:8084 promote --source ubuntu-xenial/nightly --target ubuntu-xenial/testing --force-overwrite -d --timeout 600 --recreate
nohup aptly api serve --no-lock &
Add repo:
View docker_change_gwbridge.sh
# https://success.docker.com/article/how-do-i-change-the-docker-gwbridge-address
docker network inspect --format '{{range $key, $val := .Containers}} {{$key}}{{end}}' docker_gwbridge | \
xargs -d' ' -I {} -n1 docker ps --format {{.Names}} -f id={}docker network inspect --format
gwbridge_users=$(docker network inspect --format '{{range $key, $val := .Containers}} {{$key}}{{end}}' docker_gwbridge | \
xargs -d' ' -I {} -n1 docker ps --format {{.Names}} -f id={})
echo "$gwbridge_users" | xargs docker stop
View ceph
rbd list -k /etc/ceph/ceph.client.volumes.keyring --user volumes --pool volumes
ceph osd pool ls
ceph auth list
ceph health
ceph -s
View docker-ssh-forward.bash
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash