mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-04 13:43:19 +01:00
Updating examples
This commit is contained in:
parent
5215d5d54d
commit
44f119b45c
11
Containerfile
Normal file
11
Containerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM docker.io/library/golang:bookworm
|
||||||
|
COPY ./ /wgmesh
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
wireguard \
|
||||||
|
wireguard-tools \
|
||||||
|
iproute2 \
|
||||||
|
iputils-ping \
|
||||||
|
tmux \
|
||||||
|
vim
|
||||||
|
WORKDIR /wgmesh
|
||||||
|
RUN go build -o /usr/local/bin ./...
|
1
Dockerfile
Symbolic link
1
Dockerfile
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
Containerfile
|
95
examples/meshtomesh/docker-compose.yaml
Normal file
95
examples/meshtomesh/docker-compose.yaml
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
version: '3'
|
||||||
|
networks:
|
||||||
|
net-1:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
- subnet: 10.89.0.0/17
|
||||||
|
net-2:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
- subnet: 10.89.155.0/17
|
||||||
|
services:
|
||||||
|
wg-1:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-2:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-3:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-4:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
sysctls:
|
||||||
|
- net.ipv6.conf.all.forwarding=1
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
- net-2
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-5:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-2
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-6:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-2
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-7:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-2
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
14
examples/meshtomesh/shared/configuration.yaml
Normal file
14
examples/meshtomesh/shared/configuration.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
certificatePath: "/wgmesh/cert/cert.pem"
|
||||||
|
privateKeyPath: "/wgmesh/cert/priv.pem"
|
||||||
|
caCertificatePath: "/wgmesh/cert/cacert.pem"
|
||||||
|
skipCertVerification: true
|
||||||
|
timeout: 5
|
||||||
|
gRPCPort: "21906"
|
||||||
|
advertiseRoutes: true
|
||||||
|
clusterSize: 32
|
||||||
|
syncRate: 1
|
||||||
|
interClusterChance: 0.15
|
||||||
|
branchRate: 3
|
||||||
|
infectionCount: 3
|
||||||
|
keepAliveTime: 10
|
||||||
|
pruneTime: 20
|
42
examples/simple/docker-compose.yaml
Normal file
42
examples/simple/docker-compose.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
version: '3'
|
||||||
|
networks:
|
||||||
|
net-1:
|
||||||
|
driver: bridge
|
||||||
|
ipam:
|
||||||
|
driver: default
|
||||||
|
config:
|
||||||
|
- subnet: 10.89.0.0/17
|
||||||
|
services:
|
||||||
|
wg-1:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-2:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
||||||
|
wg-3:
|
||||||
|
image: wg-mesh-base:latest
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN
|
||||||
|
- NET_RAW
|
||||||
|
tty: true
|
||||||
|
networks:
|
||||||
|
- net-1
|
||||||
|
volumes:
|
||||||
|
- ./shared:/shared
|
||||||
|
command: "wgmeshd /shared/configuration.yaml"
|
14
examples/simple/shared/configuration.yaml
Normal file
14
examples/simple/shared/configuration.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
certificatePath: "/wgmesh/cert/cert.pem"
|
||||||
|
privateKeyPath: "/wgmesh/cert/priv.pem"
|
||||||
|
caCertificatePath: "/wgmesh/cert/cacert.pem"
|
||||||
|
skipCertVerification: true
|
||||||
|
timeout: 5
|
||||||
|
gRPCPort: "21906"
|
||||||
|
advertiseRoutes: true
|
||||||
|
clusterSize: 32
|
||||||
|
syncRate: 1
|
||||||
|
interClusterChance: 0.15
|
||||||
|
branchRate: 3
|
||||||
|
infectionCount: 3
|
||||||
|
keepAliveTime: 10
|
||||||
|
pruneTime: 20
|
Loading…
Reference in New Issue
Block a user