For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
# Note - an NFS server isn't really a Kubernetes | |
# concept. We're just creating it in Kubernetes | |
# for illustration and convenience. In practice, | |
# it might be run in some other system. | |
# Create a service to expose the NFS server | |
# to pods inside the cluster. | |
kind: Service | |
apiVersion: v1 |
For MacOS Catalina, visit Install mysql2 on MacOS Catalina
Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
* Shows a message while asserting like: | |
ok: [host] => { | |
"msg": "disk usage 4.2B of total 20.0GB (21.0%) (should exceed limit 90.0%)" | |
} | |
* Note this only looks at first mount point on current node | |
* Fails if disk is near-full | |
* Last step pushes to a push-based monitoring service, which will alert us if it doesn't get there after some time | |
* Need to setup a variable `disk_limit`, which is the max acceptable usage ratio, e.g. set it to 0.8 if you want to keep disks within 80% of max size |
Hosting multiple websites on a single public IP address on the standard HTTP(S) ports is relatively easy with popular web servers like Apache, Nginx and lighttpd all supporting Virtual Hosts.
For Web Services which bundle their own HTTP server, things get more complicated, unless their HTTP stack can be shared somehow. More often than not, the application's HTTP stack listens directly on a dedicated TCP port.
Hosting multiple services on a single IP then requires using a fronting server listening on the standard HTTP port, and routing to the right backend service based on the host name or the path sent by the client.
Path based routing is cumbersome, usually requiring either the service to be aware of the path prefix, or a rewrite by the HTTP fronting server of all absolute URLs in the requests and responses.
Hostname based routing is more straightforward. The fronting server can just look at the [HTTP/1.1 Host header](https://tools
:80 { | |
root /serve | |
} |
# Example YAML configuration for the sidecar pattern. | |
# It defines a main application container which writes | |
# the current date to a log file every five seconds. | |
# The sidecar container is nginx serving that log file. | |
# (In practice, your sidecar is likely to be a log collection | |
# container that uploads to external storage.) | |
# To run: |
In case there's already a DHCP config for netplan for the private IP address:
File: /etc/netplan/50-cloud-init.yaml
Contents:
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
#!/usr/bin/env bash | |
# Reset Docker to a clean vanilla state. Will destroy all containers, images, networks, volumes, and cache. | |
[ $(docker ps | wc -l) -ne 1 ] && echo "Stopping all containers..." && docker stop $(docker ps | sed -n '1d;p' | awk -F" " '{print $1}') | |
[ $(docker ps -a | wc -l) -ne 1 ] && echo "Deleting all containers..." && docker rm $(docker ps -a | sed -n '1d;p' | awk -F" " '{print $1}') | |
[ $(docker images | wc -l) -ne 1 ] && echo "Deleting all images..." && docker image rm $(docker images | sed -n '1d;p' | awk -F" " '{print $3}') | |
echo "Pruning networks, volumes, and cache..." && docker system prune -a -f --volumes | |
echo "Docker is back to Vanilla... COMPLETE!" |