Skip to content

Instantly share code, notes, and snippets.

View hkwi's full-sized avatar

Hiroaki KAWAI hkwi

View GitHub Profile
@hkwi
hkwi / README.md
Last active June 7, 2019 13:55
docker-ce install
#cloud-config
ssh_pwauth: yes
system_info:
  default_user:
    name: admin
    # Following hash is password "hogehoge" generated by
    #   mkpasswd --method=SHA-512 --rounds=4096
    # See: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
    passwd: $6$rounds=4096$u6DZal0//p$5B7yWkliowzZnxvd5U0MFR1lh.w.elPWzmmrfMPyPP0DEzxkFl9YMs5tavxbrqVunKVJkenf/EpUN/mMmGGfD1
lxc launch ubuntu:bionic hoge -c user.user-data="$(cat config.yml)"
@hkwi
hkwi / httpie_demo.sh
Last active April 10, 2019 04:52
confluent kafka rest-proxy demo script
http POST http://rest-proxy:8082/topics/jsontest content-type:application/vnd.kafka.json.v2+json records:='[{"value":{"name":"testUser"}}]'
http http://rest-proxy:8082/topics/jsontest
http http://rest-proxy:8082/topics
http POST http://rest-proxy:8082/consumers/my_json_consumer content-type:application/vnd.kafka.v2+json accept:application/vnd.kafka.v2+json name=my_consumer_instance format=json auto.offset.reset=earliest
http POST http://rest-proxy:8082/consumers/my_json_consumer/instances/my_consumer_instance/subscription content-type:application/vnd.kafka.v2+json topics:='["jsontest"]'
---
site: https://www.city.moriya.ibaraki.jp/
missing: Cybertrust Japan Extended Validation Server CA
sent:
- Cybertrust Japan EV CA G2
- Cybertrust Global Root
---
site: https://www.city.kurashiki.okayama.jp/
missing: Cybertrust Japan Extended Validation Server CA
@hkwi
hkwi / up.sh
Last active March 6, 2019 11:28
HOSTS="s0 s1 s2"
CLOUD_CFG=$(cat <<"EOF"
#cloud-config
ssh_pwauth: yes
system_info:
default_user:
name: admin
# Following hash is password "hogehoge"
passwd: '$6$rounds=4096$aKbowvLi$V6KFRnvPQ8qKpD7/QwKr.JrE8e9cJ8O4cHwnyMNRAmczwR01jBvrJ9JbkXzli4oEua41qvuBz.YH3Ju8akV8B.'
lock_passwd: false
@hkwi
hkwi / README.md
Last active January 23, 2019 01:26
kafka jmx_exporter instrumentation example
@hkwi
hkwi / README.md
Created December 13, 2018 05:48
BGP/MPLS memo

BGP/MPLS Inter-AS Option B

RFC 4364 10. Multi-AS Backbones に b) として記載されている。ASBR で VRF の経路交換が行われ(cとの差異)、かつ MPLS が使用される(aとの差異)。

 AS65000   AS65001
 +----+    +----+
 | r1 |----| r2 |   ASBR
 +----+ +----+
@hkwi
hkwi / README.md
Last active December 14, 2018 10:12
kubeadm init --pod-network-cidr 10.244.0.0/16
sysctl net.bridge.bridge-nf-call-iptables=1
# disable control plane isolation
kubectl taint nodes --all node-role.kubernetes.io/master-
# flannel
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml