Skip to content

Instantly share code, notes, and snippets.

View WalBeh's full-sized avatar

Walter Behmann WalBeh

  • 10:06 (UTC +02:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am walbeh on github.
  • I am walterb (https://keybase.io/walterb) on keybase.
  • I have a public key ASAbJuaFnwCLzXtmadhFNFJZBdSDukvnAWMDpN2M7_AC5go

To claim this, I am signing this object:

@WalBeh
WalBeh / fio.md
Last active January 3, 2019 11:38

Performance Tests

The purpose of the tests is to get a better understanding of the capabilities of a Azure premium managed disk. Our primary focus are the metrics of a singel disk. As we are using them to claim persistent volumes for our k8s environment.

Typically one would create several disk and "bundle" them together via a "stipe set" to get better results. For k8s env. this is not an option. Unless you use a custom storageclass provider.

fio

@WalBeh
WalBeh / batch_send.py
Last active November 28, 2018 12:29
run it eg. with `./batch_send.py --count 100`, the AEH partition to write to is randomize (32 partitions assumed)
#!/usr/bin/env python
# https://github.com/Azure/azure-event-hubs-python
"""
An example to show batch sending events to an Event Hub.
"""
# pylint: disable=C0111
import sys

cratedb Index/Partitions/Shards

This document aims to give some general understand and guidance on some topics for cratedb in the context of our IoT use-case with timeseries data. Where possible sample numbers from the c-holistic-comparision pitch are added for the purpose of illustration:

  • Indices and how cratedb analises the OBJECT type.
  • Cardinality of the data and why it is important to understand it.
  • Some basic undertanding of paritioning.
  • Sharding Sizes and basic numbers of thumb.
  • At the end there is FAQ with information and links about Lucene indices in general.
  • What todo with the vast amount of data you are probably inserting

k3s

as of 01/06/2021: you have to use ubuntu 18. Seems like ubuntu 20 has an incompatible iptables version. You can verify that after setting up k3s, by running k3s check check-config. Whats the problem? Thou it seems to work, I run into the situation where DNS lookups timed out. To verify that your output should look like this.

kubectl apply -f https://k8s.io/examples/admin/dns/dnsutils.yam
root@ub1:~# kubectl exec -i -t dnsutils -- nslookup kubernetes.default
Server:		10.43.0.10
Address:	10.43.0.10#53

Setup microk8s

Following the instructions from https://microk8s.io/docs

sudo snap install microk8s --classic --channel=1.21

sudo usermod -a -G microk8s $USER  
sudo chown -f -R $USER ~/.kube
import yaml
import boto3
import re
import json
# kubectl get cratedbs -A -o yaml > cratedbs2.yaml  ✔  aks1-westeurope/aa6c3932-424e-4bdd-a4eb-b5d0dd2ae4fa ⎈
# kubectl get projects -o yaml -A > projects2.yaml  ✔  aks1-westeurope/aa6c3932-424e-4bdd-a4eb-b5d0dd2ae4fa ⎈
# croud clusters list -r aks1.westeurope.azure --sudo -o json > croud_cluster_list.json
@WalBeh
WalBeh / 403.md
Created September 19, 2022 14:46
> cd /var/log/nginx
> ag " 403 "

24666:104.156.87.83 - - [18/Sep/2022:20:42:09 +0000] "GET /docs/sql-99/en/latest/c.html HTTP/1.1" 403 4537 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
25238:104.156.83.129 - - [18/Sep/2022:21:10:20 +0000] "GET /docs/crate/tutorials/en/latest/self-hosted/index.html HTTP/1.1" 403 4537 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
25431:167.82.236.22 - - [18/Sep/2022:21:19:31 +0000] "GET /docs/cloud/howtos/en/latest/ HTTP/1.1" 403 4537 "-" "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)"
25910:140.248.77.128 - - [18/Sep/2022:21:42:01 +0000] "GET /docs/crate/howtos/en/latest/ HTTP/1.1" 403 4531 "-" "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.5195.102 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
26120:23.235.43.63 - - [18/Sep/2022:21:52:55 +0000] "GET /docs/crate/tutorials/en/latest/_st
#
# ansible-playbook ./cordon-drain-check.yml --extra-vars "cx=aks2-westeurope np_to_drain=nodepool2"
#
- name: Debug Output
ansible.builtin.debug:
msg: Working on ------ {{ item }}
- name: 1 --- PRE-Flight check cratedbs status {{ item }}
shell: "{{ kubectl }} --context {{ cx }} get cratedbs -A | grep -v NAMESPACE | grep -v GREEN"
register: cratedbs