- Tested on Raspberry-Pi 4 Model B 2GB RAM
- Docker Version:
19.03.8 - Docker-Compose version:
1.25.5
.| # find merge-request which contains commit in GitLab | |
| # https://gitlab.com/gitlab-org/gitlab-foss/-/issues/28037 | |
| # https://stackoverflow.com/a/17819027/7277090 | |
| git config --add remote.origin.fetch '+refs/merge-requests/*/head:refs/remotes/origin/merge-requests/*' | |
| git fetch origin | |
| git for-each-ref --contains <hash> | grep merge-requests | head -n 10 |
| #!/bin/bash | |
| set -e | |
| fail(){ | |
| echo "error: $*" | |
| echo "usage: ./k3s-new-cert <name> [subject=/O=admin]" | |
| exit 1 | |
| } | |
| nginx.ingress.kubernetes.io/configuration-snippet: | | |
| more_set_headers "Server:SEU_SERVER"; | |
| more_set_headers "cache-Control: no-cache, no-store"; | |
| more_set_headers "pragma: no-cache"; | |
| if ($request_uri ~* \.(?:ico|css|js|gif|jpe?g|png|svg|woff2|woff|ttf|eo|mp3)$) { | |
| more_set_headers "cache-control: public, must-revalidate, proxy-revalidate"; | |
| more_set_headers "pragma: public"; | |
| expires max; | |
| } | |
| rewrite ^/SUB_PATH(/?)(.*)$ /$2 break; |
| function gen_ssl_cert { | |
| local prefix="${1}" | |
| openssl genrsa -des3 -out "${prefix}.lock.key" 1024 | |
| openssl rsa -in "${prefix}.lock.key" -out "${prefix}.key" | |
| rm "${prefix}.lock.key" | |
| openssl req -new -key "${prefix}.key" -out "${prefix}.csr" | |
| openssl x509 -req -days 3650 -in "${prefix}.csr" -signkey "${prefix}.key" -out "${prefix}.crt" | |
| openssl pkcs12 -export -inkey "${prefix}.key" -in "${prefix}.crt" -out "${prefix}.pfx" |
| - etcd | |
| - load balancing | |
| - availability | |
| - auto-scaling | |
| - networking | |
| - roll-back on faulty deployments | |
| - persistent storage | |
| - upgrading nodes | |
| - removing nodes | |
| - adding nodes |
| DOCKER | |
| ====== | |
| ./create_partycrasher_zip.sh | |
| docker build -t partycrasher . | |
| -- docker run gunicorn with local ES | |
| docker run -e ELASTICSEARCH_ALLOW_DELETE_ALL=true -e ELASTICSEARCH_CREATE_INDEXES=true -e ELASTICSEARCH_HOSTS=host.docker.internal -e ELASTICSEARCH_PORT=9200 -e ELASTICSEARCH_REST_HTTP_SCHEME=http -e ELASTICSEARCH_REST_SIGN_REQUESTS_ENABLED=false -e PARTYCRASHER_LOGGER_LEVEL=DEBUG -it --rm -p 8080:8080 --name partycrasher partycrasher |
| # .gitattributes or .git/info/attributes | |
| # https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreattributesFile | |
| *.[jt]s filter=ignoreLogStage | |
| *.[jt]sx filter=ignoreLogStage |
| #!/bin/bash | |
| ################################################################################ | |
| # Generate load for the NGINXs services in ECS | |
| nginxurls=$(ecs-cli ps --desired-status RUNNING | grep nginx | awk '{ split($3, url, "-") ; print(url[1]) }') | |
| while true | |
| do | |
| printf "Hit " | |
| for nginxurl in $nginxurls |