Install the OpenSSL on Debian based systems
sudo apt-get install openssl
#!/bin/bash | |
set -e | |
echo "==================================================================================================" | |
echo "NOTE: The script will set the Adminconsole to api-only mode (no indexer), so that" | |
echo " migrations are bypassed and Adminconsole can boot for environment salvage operations." | |
echo " Please run the same script with the cleanup option afterwards." | |
echo "" | |
echo "IMPORTANT: Until the cleanup script is run, adminconsole will not be able to index " | |
echo " changes in the admin cluster, breaking the Deployments dashboard and " |
docker run \ | |
-v $(pwd):/hostpwd -v ~/.found-shell:/elastic_cloud_apps/shell/.found-shell \ | |
--env SHELL_ZK_AUTH=$(docker exec -it frc-directors-director bash -c 'echo -n $FOUND_ZK_READWRITE') $(docker inspect -f '{{ range .HostConfig.ExtraHosts }} --add-host {{.}} {{ end }}' frc-directors-director) --rm -it $(docker inspect -f '{{ .Config.Image }}' frc-directors-director) \ | |
/elastic_cloud_apps/shell/run-shell.sh |
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
Alright! I'd like to apologize for the inactivity for over a year. Very embarrassingly, I totally dropped the good habit. Anyways, today I'd like to share a not so advanced and much shorter walkthrough on how to upgrade Kubernetes with kops.
At Buffer, we host our own k8s (Kubernetes for short) cluster on AWS EC2 instances since we started our journey before AWS EKS. To do this effectively, we use kops. It's an amazing tool that manages pretty much all aspects of cluster management from creation, upgrade, updates and deletions. It never failed us.
Okay, upgrading a cluster always makes people nervous, especially a production cluster. Trust me, I've been there! There is a saying, hope is not a strategy. So instead of hoping things will go smoothly, I always have bias that shit will hit the fan if you skip testing. Plus, good luck explaining to people
This was a huge hassle to figure out, so I wrote up a little guide in hopes that others would find it helpful:
macOS's domain name resolver will only return IPv6 addresses (from AAAA records) when it thinks that you have a valid routable IPv6 address. For physical interfaces like Ethernet or Wi-Fi it's enough to set or be assigned an IPv6 address, but for tunnels (such as those using utun
interfaces) there are some extra annoying steps that need to be taken to convince the system that yes, you indeed have an IPv6 address, and yes, you'd like to get IPv6 addresses back for DNS lookups.
I use wg-quick
to establish a WireGuard tunnel between my laptop and a Linode virtual server. WireGuard uses a utun
user-space tunnel device to make the connection. Here's how that device gets configured:
docker build -t $IMAGE_NAME - << EOF
FROM alpine:latest
...
EXPOSE 80
EOF
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
import requests | |
class HTTPMethod: | |
GET = 1 | |
POST = 2 | |
PUT = 3 | |
DELETE = 4 | |
class NSAPI: | |
""" Class that talks to Service Catalog via NS API """ |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs