Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
ratchet cloud router demo pods
---
apiVersion: v1
kind: Pod
metadata:
name: centosa
labels:
app: centosa
ratchet: "true"
ratchet.pod_name: "centosa"
ratchet.target_pod: "centosa"
ratchet.target_container: "centosa"
ratchet.public_ip: "1.1.1.1"
ratchet.local_ip: "192.168.2.100"
ratchet.local_ifname: "in1"
ratchet.pair_name: "quagga-a"
ratchet.pair_ip: "192.168.2.101"
ratchet.pair_ifname: "in2"
ratchet.primary: "true"
spec:
containers:
- name: centosa
image: dougbtv/centos-network-advanced
env:
- name: "DEFAULT_GW"
value: "192.168.2.101"
- name: "DEFAULT_DEV"
value: "in1"
- name: "WAN_IP"
value: "1.1.1.1"
securityContext:
privileged: true
nodeSelector:
ratchetside: left
---
apiVersion: v1
kind: Pod
metadata:
name: quagga-a
labels:
app: quagga-a
ratchet: "true"
ratchet.pod_name: "quagga-a"
ratchet.target_pod: "quagga-a"
ratchet.target_container: "quagga-a"
ratchet.public_ip: "2.2.2.2"
ratchet.local_ip: "192.168.3.100"
ratchet.local_ifname: "mid1"
ratchet.pair_name: "quagga-b"
ratchet.pair_ip: "192.168.3.101"
ratchet.pair_ifname: "mid2"
ratchet.primary: "true"
spec:
containers:
- name: quagga-a
image: dougbtv/quagga
securityContext:
privileged: true
volumeMounts:
- mountPath: /etc/quagga/
name: config
volumes:
- name: config
configMap:
name: quagga-a-config
items:
- key: ospfd.conf
path: ospfd.conf
- key: daemons
path: daemons
- key: vtysh.conf
path: vtysh.conf
- key: debian.conf
path: debian.conf
- key: zebra.conf
path: zebra.conf
nodeSelector:
ratchetside: left
---
apiVersion: v1
kind: Pod
metadata:
name: quagga-b
labels:
app: quagga-b
ratchet: "true"
ratchet.pod_name: "quagga-b"
ratchet.primary: "false"
spec:
containers:
- name: quagga-b
image: dougbtv/quagga
securityContext:
privileged: true
volumeMounts:
- mountPath: /etc/quagga/
name: config
nodeSelector:
ratchetside: right
volumes:
- name: config
configMap:
name: quagga-b-config
items:
- key: ospfd.conf
path: ospfd.conf
- key: daemons
path: daemons
- key: vtysh.conf
path: vtysh.conf
- key: debian.conf
path: debian.conf
- key: zebra.conf
path: zebra.conf
---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: quagga-a-config
data:
ospfd.conf: |
interface in2
interface mid1
interface lo
router ospf
ospf router-id 2.2.2.2
redistribute static
passive-interface in2
network 192.168.2.0/24 area 0.0.0.0
network 192.168.3.0/24 area 0.0.0.0
network 2.2.2.0/24 area 0.0.0.0
network 3.3.3.0/24 area 0.0.0.0
zebra.conf: |
ip route 1.1.1.1/32 192.168.2.100
daemons: |
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
vtysh.conf: |
debian.conf: |
#
# If this option is set the /etc/init.d/quagga script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/quagga if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
bgpd_options=" --daemon -A 127.0.0.1"
ospfd_options=" --daemon -A 127.0.0.1"
ospf6d_options=" --daemon -A ::1"
ripd_options=" --daemon -A 127.0.0.1"
ripngd_options=" --daemon -A ::1"
isisd_options=" --daemon -A 127.0.0.1"
# The list of daemons to watch is automatically generated by the init script.
watchquagga_enable=yes
watchquagga_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: quagga-b-config
data:
ospfd.conf: |
interface mid2
interface out1
interface lo
router ospf
ospf router-id 3.3.3.3
redistribute static
passive-interface out1
network 192.168.3.0/24 area 0.0.0.0
network 192.168.4.0/24 area 0.0.0.0
network 2.2.2.0/24 area 0.0.0.0
network 3.3.3.0/24 area 0.0.0.0
zebra.conf: |
ip route 4.4.4.4/32 192.168.4.101
daemons: |
zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
vtysh.conf: |
debian.conf: |
#
# If this option is set the /etc/init.d/quagga script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/quagga if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
bgpd_options=" --daemon -A 127.0.0.1"
ospfd_options=" --daemon -A 127.0.0.1"
ospf6d_options=" --daemon -A ::1"
ripd_options=" --daemon -A 127.0.0.1"
ripngd_options=" --daemon -A ::1"
isisd_options=" --daemon -A 127.0.0.1"
# The list of daemons to watch is automatically generated by the init script.
watchquagga_enable=yes
watchquagga_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 30)
---
apiVersion: v1
kind: Pod
metadata:
name: centosb
labels:
app: centosb
ratchet: "true"
ratchet.primary: "true"
ratchet.pod_name: centosb
ratchet.target_pod: "centosb"
ratchet.target_container: "centosb"
ratchet.public_ip: "4.4.4.4"
ratchet.local_ip: "192.168.4.101"
ratchet.local_ifname: "out2"
ratchet.pair_name: "quagga-b"
ratchet.pair_ip: "192.168.4.100"
ratchet.pair_ifname: "out1"
spec:
containers:
- name: centosb
image: dougbtv/centos-network-advanced
env:
- name: "DEFAULT_GW"
value: "192.168.4.100"
- name: "DEFAULT_DEV"
value: "out2"
- name: "WAN_IP"
value: "4.4.4.4"
securityContext:
privileged: true
nodeSelector:
ratchetside: right
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment