A short survey of log collection options and why you picked the wrong one. 😜
I'm Steve Coffman and I work at Ithaka. We do JStor (academic journals) and other stuff. How big is it?
Number | what it means |
---|---|
101,332,633 | unique visitors in 2017 |
#!/usr/bin/env bash | |
set -e | |
NAMESPACES=$(kubectl --kubeconfig $1 get -o json namespaces|jq '.items[].metadata.name'|sed "s/\"//g") | |
RESOURCES="configmap secret daemonset deployment service hpa" | |
for ns in ${NAMESPACES};do | |
for resource in ${RESOURCES};do | |
rsrcs=$(kubectl --kubeconfig $1 -n ${ns} get -o json ${resource}|jq '.items[].metadata.name'|sed "s/\"//g") |
#!/bin/bash | |
: "${FORKED:=}" | |
if [ -z "${FORKED}" ]; then | |
echo >&2 'mongod for initdb is going to shutdown' | |
mongod --pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --shutdown | |
echo >&2 'replica set will be initialized later' | |
FORKED=1 "${BASH_SOURCE[0]}" & | |
unset FORKED | |
mongodHackedArgs=(:) # bypass mongod --shutdown in docker-entrypoint.sh |
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
# The initial version | |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi | |
# My favorite from the comments. Thanks @richarddewit & others! | |
set -a && source .env && set +a |
The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.
The correct way of creating a private frok by duplicating the repo is documented here.
For this assignment the commands are:
git clone --bare [email protected]:usi-systems/easytrace.git
There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore
is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules
directory) as well as files that are generated (and regenerated) as artifacts of a build process.
All other files should be in your own global gitignore file:
.gitignore
in your home directory and add any filepath patterns you want to ignore.Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute
.config/git/ignore
for.gitignore
in your home directory, if you prefer.