dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress oflag=sync
loadkeys <your-keymap>
#define KBUILD_MODNAME "xdp_drop_80_8080" | |
#include <uapi/linux/bpf.h> | |
#include <linux/in.h> | |
#include <linux/if_ether.h> | |
#include <linux/if_packet.h> | |
#include <linux/if_vlan.h> | |
#include <linux/ip.h> | |
#include <linux/ipv6.h> | |
BPF_HASH(counter, uint32_t, long); |
The following commands will start a container with Kafka and Zookeeper running on mapped ports 2181 (Zookeeper) and 9092 (Kafka).
docker pull spotify/kafka
docker run -d -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=kafka --env ADVERTISED_PORT=9092 --name kafka spotify/kafka
ADVERTISTED_HOST
was set to kafka
, which will allow other containers to be able to run Producers and Consumers.
I wanted to build an LDAP server that queries a MySQL server to fetch users and check their passwords. It is mainly used for old software that does not work with custom OAuth2 providers. Redmine is an example of this.
Instructions:
insert.sql
- hosts: docker | |
become: yes | |
tasks: | |
- apt: | |
name: | |
- apt-transport-https | |
- ca-certificates | |
- curl | |
- software-properties-common | |
update_cache: yes |
According to this cloudflare blog article "Load Balancing without Load Balancers", we can build a rock-solid load balancer only using a router. All the magic comes from BGP and Equal-Cost Multi-Path routing.
In this howto, I will use bird
as BGP router on linux instance (ie. servers).
I use GNS3 with this architecture :
#!/usr/bin/env bash | |
# https://developer.github.com/v3/repos/releases/#create-a-release | |
repo=$1 | |
tag=$2 | |
name=$3 | |
text=$4 | |
token=$GH_TOKEN |