I hereby claim:
- I am pracucci on github.
- I am pracucci (https://keybase.io/pracucci) on keybase.
- I have a public key ASCVBazMo7Xgos06mnl6wk-eV9jJfMEpzDDzwIuQx3vdiwo
To claim this, I am signing this object:
#!/bin/bash | |
LAST_PR=$(hub pr list --state all -L 1 --format '%I') | |
LAST_ISSUE=$(hub issue --format '%I' -L 1) | |
if [ "$LAST_PR" == "" -a "$LAST_ISSUE" == "" ]; then | |
echo "Unable to get last PR and/or Issue number. Is your current working directory a public GitHub repository?" | |
exit 1 | |
elif [ "$LAST_PR" -gt "$LAST_ISSUE" ]; then | |
echo `expr $LAST_PR + 1` |
I hereby claim:
To claim this, I am signing this object:
The halt
command on EC2 Nitro instances doesn't poweroff the instance, so the OS will shutdown but the instance will be in the running state indefinitely (until you force a "stop" or "termination" via EC2 console / API). This is because the hypervisor has changed and the shutdown signaling between OS and the hypervisor behaves differently.
Works (the instance switches to "stopped" or "terminated"):
halt --poweroff
shutdown now
(defaults to --poweroff
)Doesn't work (the instance hungs into a "running" state):
halt
shutdown --halt
#!/bin/bash | |
# | |
# This is the script run on master as bootstrap action. | |
# | |
set -e | |
# Config | |
SJS_VERSION=0.8.0 | |
EMR_VERSION=5.13.0 |
FROM ubuntu:16.04 | |
# Config | |
ARG SBT_VERSION=0.13.12 | |
ARG SJS_VERSION=0.8.0 | |
ARG EMR_VERSION=5.13.0 | |
ARG SPARK_VERSION=2.3.0 | |
# Install JDK 8 and some dependencies | |
RUN apt-get update -qq && apt-get install -y -qq openjdk-8-jdk wget python python-pip |
Web workers can use the Prometheus PHP client to track metrics. Such metrics are stored in memory and also copied to a shared memory from which another process in the same SysV IPC namespace can read. This design allows us to run a micro webserver in a sidecar container from which we can export Prometheus metrics collected in the worker's cli app.
IPC namespace: when deployed on K8S, two containers of the same Pod run in the same IPC namespace, while two different pods on the same host run on a different IPC namespace unless explicitly configured to all share the host's IPC running the pod with hostIPC: true
.
There are three options to export metrics to Prometheus from a cli app:
#!/bin/bash | |
# Init | |
OPT_FROM_FILES= | |
OPT_DEPLOYMENT= | |
OPT_CONTAINER= | |
OPT_SIGNAL= | |
OPT_YES=0 | |
# Helper to print usage |