You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile
in an empty directory with the following content:
#!/usr/bin/env bash | |
scriptName=$(basename "$0") | |
USAGE="Wraps \"helm package\" in order to be able to --set values at package time. | |
Usage: | |
$scriptName \\ | |
--set key1=value1 --set key2=value2 \\ | |
[--app-version 1.2.3] <chart-path>" |
' Disables Vanguard from starting when you boot your computer | |
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas") |
You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile
in an empty directory with the following content:
So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])
8.2.2. TCP log format | |
--------------------- | |
The TCP format is used when "option tcplog" is specified in the frontend, and | |
is the recommended format for pure TCP proxies. It provides a lot of precious | |
information for troubleshooting. Since this format includes timers and byte | |
counts, the log is normally emitted at the end of the session. It can be | |
emitted earlier if "option logasap" is specified, which makes sense in most | |
environments with long sessions such as remote terminals. Sessions which match | |
the "monitor" rules are never logged. It is also possible not to emit logs for |
A more complete example (with rewriting cookie domains/paths) can be found at http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/
We will try something roughly equivalent to the following ProxyPass
directives in Apache2:
ServerName www.example.com
...
ProxyPass /foo/ http://foo.local
ProxyPassReverse /foo/ http://foo.local
In haproxy.cfg
we define a backend, say foo, to reverse-proxy to foo.local
backend server.
#!/usr/bin/env python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |
A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
_complete_hosts () { | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
host_list=`{ | |
for c in /etc/ssh_config /etc/ssh/ssh_config ~/.ssh/config | |
do [ -r $c ] && sed -n -e 's/^Host[[:space:]]//p' -e 's/^[[:space:]]*HostName[[:space:]]//p' $c | |
done | |
for k in /etc/ssh_known_hosts /etc/ssh/ssh_known_hosts ~/.ssh/known_hosts | |
do [ -r $k ] && egrep -v '^[#\[]' $k|cut -f 1 -d ' '|sed -e 's/[,:].*//g' | |
done |