Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| setup local branch tracking a remote feature branch | |
| ==================================================== | |
| git checkout -b <feature branch name> origin/<feature_branch_name> | |
| create new feature branch | |
| ========================= | |
| git checkout master | |
| git checkout -b <feature branch name> | |
| create a new local branch tracking a remote branch |
| // get journal logs from systemd services | |
| # journalctl -u <service name>.service | |
| # journalctl -u <service name>.service -n 100 --no-pager |
| # run bash in a specific container image | |
| docker run -it <image> /bin/bash | |
| # run bash and mount a local volume into a specific contaimer image | |
| docker run -it -v $(pwd):/pki-tools/pki dprails/pki-tools /bin/bash | |
| # run a x86 docker image on M1 mac | |
| docker run -it --platform linux/amd64 -v $(pwd):/pki-tools/pki dprails/pki-tools /bin/bash | |
| # build on m1 mac |
| # get logs from a pod | |
| $ kubectl logs -f <pod name> --namespace <namespace> | |
| # get logs from a specific container in a pod | |
| $ kubectl logs -f <pod name> -c <container> -n <namespace> | |
| # get logs across several containers | |
| $ kubectl logs -l istio=ingressgateway -n istio-system -c ingress-sds # by using label | |
| # get list of pods and observe their logs |
| $ nc -vz -u 10.100.0.10 53 | |
| Connection to 10.100.0.10 53 port [udp/domain] succeeded! | |
| # nc -vz 10.100.0.10 443 | |
| Connection to 10.100.0.10 443 port [tcp/*] succeeded! |
| #!/bin/bash | |
| apt-get update | |
| apt-get install -y psmisc | |
| i="0" | |
| while [ $i -lt 10 ] | |
| do | |
| if [ $(fuser /var/lib/dpkg/lock) ]; then |
| knife supermarket search openssh | |
| knife supermarket download openssh | |
| tar -xzvf openssh-2.10.3.tar.gz | |
| knife supermarket download iptables | |
| tar -xzvf iptables-8.0.0.tar.gz | |
| knife cookbook upload iptables | |
| knife cookbook upload openssh |
| # get status of a job | |
| $ nomad job status -no-color kafka-broker | |
| ID = kafka-broker | |
| Name = kafka-broker | |
| Submit Date = 2019-07-24T14:03:41-07:00 | |
| Type = service | |
| Priority = 50 | |
| Datacenters = alpha | |
| Status = dead | |
| Periodic = false |
| $ influx -ssl -host <host> -port <port> | |
| # select database | |
| > use <database name> | |
| # set time format | |
| > precision rfc3339 | |
| # show all measurements | |
| > show measurements |