This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stats socket /var/run/haproxy.sock mode 600 expose-fd listeners level user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd blog/building_service_mesh | |
docker-compose up -d consul-server | |
# Wait for consul-server to bootstrap itself | |
sleep 10 | |
# Create ACL token that agents use to connect to consul-server | |
docker-compose exec consul-server curl --request PUT --header "X-Consul-Token: mastertoken" --data '{ "ID": "agenttoken", "Name": "Agent Token", "Type": "client", "Rules": "node \"\" { policy = \"write\" } service \"\" { policy = \"write\" }" }' http://localhost:8500/v1/acl/create | |
sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
option http-use-htx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /MyTime/bob HTTP/1.1 | |
Host: mytime.example.local | |
HTTP/1.0 200 OK | |
Server: BaseHTTP/0.6 Python/3.6.7 | |
Date: Tue, 22 Jan 2019 16:38:11 GMT | |
<HTML><BODY>Hello Bob Smith, your IP address is 198.18.0.7 and your local time is 10:38.</BODY></HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend apiservers | |
balance roundrobin | |
server server1 192.168.50.3:80 check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 8 20:51:28 server1 haproxy[4718]: 192.168.50.5 [08/Feb/2019:20:51:28.816] website~ servers/server1 0/0/0/1/1 304 180 - - ---- 1/1/0/1/0 0/0 "GET / HTTP/1.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend myproxy | |
filter spoe [engine <name>] config <spoe-config-file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export AWS_ACCESS_KEY_ID=[YOUR ACCESS KEY] | |
export AWS_SECRET_ACCESS_KEY=[YOUR SECRET ACCESS KEY] | |
terraform init | |
terraform apply -auto-approve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ apt update | |
$ apt install -y unzip | |
$ wget -O ./terraform.zip https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip | |
$ unzip ./terraform.zip -d ./terraform | |
$ cp ./terraform/terraform /usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend fe_mysite | |
bind :443 ssl crt /path/to/cert.pem alpn h2,http/1.1 | |
default_backend be_servers |
OlderNewer