Play with "Argo Workflow" in your local kind cluster.
The following instructions were tested in macOS Catalina (10.15.6), on 6 Sep 2020.
Ensure docker is installed and running.
| FROM ubuntu:20.04 | |
| RUN apt-get update -y | |
| RUN apt-get upgrade -y | |
| RUN apt-get install -y mdadm python3-minimal ca-certificates | |
| RUN mkdir /app | |
| WORKDIR /app | |
| ADD notify.py . |
| [general] | |
| pidfile="burrow.pid" | |
| stdout-logfile="burrow.out" | |
| [logging] | |
| filename="/opt/burrow/logs/burrow.log" | |
| level="info" | |
| maxsize=100 | |
| maxbackups=10 | |
| maxage=10 |
| #!/usr/bin/env python | |
| import json | |
| from jinja2 import Template | |
| # git clone https://github.com/pingcap/tidb-docker-compose | |
| # cd tidb-docker-compose | |
| # git clone https://github.com/tennix/grafonnet-lib -b table | |
| # python dashboard-to-jsonnet.py > pd.jsonnet | |
| # jsonnet -J grafonnet-lib pd.jsonnet > config/dashboards/generated-pd.json | |
| with open('config/dashboards/pd.json', 'r') as f: | |
| data = json.load(f) |
To understand HTTP's Vary behaviour we first must understand how the CDN works in the traditional sense of caching and looking up resources.
Note: at the bottom of this page is a sequence diagram which visually illustrates how Vary works (if you prefer a more visual aid).
The CDN caches requests based on a given pair of Host and Path values. So when the CDN accepts a request, as an example, for the resource https://www.buzzfeed.com/videos the CDN will take the Host (e.g. www.buzzfeed.com) and the Path (e.g. /videos) and generate a hash of those values which will become the 'cache key'. Later when the CDN receives the same request from a different client it'll generate the same hash and lookup the resource in its cache using the hash as the key.
Depending on the client, the origin server that generates response content (which will be cached in the CDN) may well want to serve different content for different clients
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| # Overrides parts of Boto to provide async call/response. Derived from | |
| # SESConnection and boto/connection. | |
| # Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ | |
| # Copyright (c) 2011 Harry Marr http://hmarr.com/ | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a | |
| # copy of this software and associated documentation files (the | |
| # "Software"), to deal in the Software without restriction, including | |
| # without limitation the rights to use, copy, modify, merge, publish, dis- |
| package proxy | |
| import ( | |
| "io" | |
| "log" | |
| "net" | |
| ) | |
| func Proxy(srvConn, cliConn *net.TCPConn) { | |
| // channels to wait on the close event for each connection |
| #!/bin/bash -eu | |
| #apt-get install -y jq | |
| host_ip=$1 | |
| #Check to see if we have a cached session for this machine and if it is still valid | |
| if [ -f ~/.consul_subnet_session ] && [[ -n $(< ~/.consul_subnet_session) ]] && [[ $(curl "http://localhost:8500/v1/session/info/$(< ~/.consul_subnet_session)") != null ]] | |
| then | |
| session=$(< ~/.consul_subnet_session) | |
| else |