Skip to content

Commit

Permalink
Updates based on talk dry-run feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
kristenjacobs committed Oct 18, 2018
1 parent 77a1e91 commit 8c0dad5
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 48 deletions.
8 changes: 4 additions & 4 deletions 1-network-namespace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ all: setup test teardown

setup:
rm -rf setup.complete
vagrant ssh container-networking -c 'cd /vagrant ; ./setup.sh > setup.log ; touch setup.complete' &
vagrant ssh 1-network-namespace -c 'cd /vagrant ; ./setup.sh > setup.log ; touch setup.complete' &
until [ -f setup.complete ]; do sleep 1; done

test:
vagrant ssh container-networking -c 'cd /vagrant ; ./test.sh'
vagrant ssh 1-network-namespace -c 'cd /vagrant ; ./test.sh'

teardown:
rm -rf teardown.complete
-vagrant ssh container-networking -c 'cd /vagrant ; ./teardown.sh > teardown.log ; touch teardown.complete' &
-vagrant ssh 1-network-namespace -c 'cd /vagrant ; ./teardown.sh > teardown.log ; touch teardown.complete' &
until [ -f teardown.complete ]; do sleep 1; done

clean:
rm -rf *.log *.complete

ssh:
vagrant ssh container-networking
vagrant ssh 1-network-namespace
9 changes: 5 additions & 4 deletions 1-network-namespace/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

$script = <<SCRIPT
echo "cd /vagrant" >> /home/vagrant/.bashrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":colorscheme delek" >> /home/vagrant/.vimrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":set nowrap" >> /home/vagrant/.vimrc
echo ":colorscheme industry" >> /home/vagrant/.vimrc
SCRIPT

Vagrant.configure(2) do |config|
config.vm.define "container-networking" do |s1|
config.vm.define "1-network-namespace" do |s1|
s1.vm.box = "ubuntu/xenial64"
s1.vm.network :private_network, ip: "10.0.0.10", virtualbox__intnet: "network1"
s1.vm.hostname = "container-networking"
s1.vm.hostname = "1-network-namespace"
s1.vm.provision "shell", inline: $script
end
config.vm.box_check_update = false
Expand Down
Binary file modified 1-network-namespace/diagram.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions 2-single-node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ all: setup test teardown

setup:
rm -rf setup.complete
vagrant ssh container-networking -c 'cd /vagrant ; ./setup.sh > setup.log ; touch setup.complete' &
vagrant ssh 2-single-node -c 'cd /vagrant ; ./setup.sh > setup.log ; touch setup.complete' &
until [ -f setup.complete ]; do sleep 1; done

test:
vagrant ssh container-networking -c 'cd /vagrant ; ./test.sh'
vagrant ssh 2-single-node -c 'cd /vagrant ; ./test.sh'

teardown:
rm -rf teardown.complete
-vagrant ssh container-networking -c 'cd /vagrant ; ./teardown.sh > teardown.log ; touch teardown.complete' &
-vagrant ssh 2-single-node -c 'cd /vagrant ; ./teardown.sh > teardown.log ; touch teardown.complete' &
until [ -f teardown.complete ]; do sleep 1; done

clean:
rm -rf *.log *.complete

ssh:
vagrant ssh container-networking
vagrant ssh 2-single-node
9 changes: 5 additions & 4 deletions 2-single-node/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@

$script = <<SCRIPT
echo "cd /vagrant" >> /home/vagrant/.bashrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":colorscheme delek" >> /home/vagrant/.vimrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":set nowrap" >> /home/vagrant/.vimrc
echo ":colorscheme industry" >> /home/vagrant/.vimrc
SCRIPT

Vagrant.configure(2) do |config|
config.vm.define "container-networking" do |s1|
config.vm.define "2-single-node" do |s1|
s1.vm.box = "ubuntu/xenial64"
s1.vm.network :private_network, ip: "10.0.0.10", virtualbox__intnet: "network2"
s1.vm.hostname = "container-networking"
s1.vm.hostname = "2-single-node"
s1.vm.provision "shell", inline: $script
end
config.vm.box_check_update = false
Expand Down
16 changes: 8 additions & 8 deletions 3-multi-node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ all: setup test teardown

setup:
rm -rf setup-1.complete setup-2.complete
vagrant ssh container-networking-1 -c 'cd /vagrant ; ./setup.sh > setup-1.log ; touch setup-1.complete' &
vagrant ssh container-networking-2 -c 'cd /vagrant ; ./setup.sh > setup-2.log ; touch setup-2.complete' &
vagrant ssh 3-multi-node-1 -c 'cd /vagrant ; ./setup.sh > setup-1.log ; touch setup-1.complete' &
vagrant ssh 3-multi-node-2 -c 'cd /vagrant ; ./setup.sh > setup-2.log ; touch setup-2.complete' &
until [ -f setup-1.complete ] && [ -f setup-2.complete ]; do sleep 1; done

test:
vagrant ssh container-networking-2 -c 'cd /vagrant ; ./test.sh'
vagrant ssh container-networking-1 -c 'cd /vagrant ; ./test.sh'
vagrant ssh 3-multi-node-2 -c 'cd /vagrant ; ./test.sh'
vagrant ssh 3-multi-node-1 -c 'cd /vagrant ; ./test.sh'

teardown:
rm -rf teardown-1.complete teardown-2.complete
-vagrant ssh container-networking-1 -c 'cd /vagrant ; ./teardown.sh > teardown-1.log ; touch teardown-1.complete' &
-vagrant ssh container-networking-2 -c 'cd /vagrant ; ./teardown.sh > teardown-2.log ; touch teardown-2.complete' &
-vagrant ssh 3-multi-node-1 -c 'cd /vagrant ; ./teardown.sh > teardown-1.log ; touch teardown-1.complete' &
-vagrant ssh 3-multi-node-2 -c 'cd /vagrant ; ./teardown.sh > teardown-2.log ; touch teardown-2.complete' &
until [ -f teardown-1.complete ] && [ -f teardown-2.complete ]; do sleep 1; done

clean:
rm -rf *.log *.complete

ssh1:
vagrant ssh container-networking-1
vagrant ssh 3-multi-node-1

ssh2:
vagrant ssh container-networking-2
vagrant ssh 3-multi-node-2
4 changes: 2 additions & 2 deletions 3-multi-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ containers are connected via static routing rules set on each of the nodes.

![Diagram](./diagram.jpg)

Create the 2 VMs (container-networking-1 and container-networking-2):
Create the 2 VMs (3-multi-node-1 and 3-multi-node-2):

```
vagrant up
Expand All @@ -15,7 +15,7 @@ vagrant up
SSH to each node (VM) in turn, and run the setup script to create the network namespaces connected via a bridge:

```
vagrant ssh container-networking-[12]
vagrant ssh 3-multi-node-[12]
cd /vagrant
./setup.sh
```
Expand Down
13 changes: 7 additions & 6 deletions 3-multi-node/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@

$script = <<SCRIPT
echo "cd /vagrant" >> /home/vagrant/.bashrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":colorscheme delek" >> /home/vagrant/.vimrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":set nowrap" >> /home/vagrant/.vimrc
echo ":colorscheme industry" >> /home/vagrant/.vimrc
SCRIPT

Vagrant.configure(2) do |config|
config.vm.define "container-networking-1" do |s1|
config.vm.define "3-multi-node-1" do |s1|
s1.vm.box = "ubuntu/xenial64"
s1.vm.network :private_network, ip: "10.0.0.10", virtualbox__intnet: "network3"
s1.vm.hostname = "container-networking-1"
s1.vm.hostname = "3-multi-node-1"
s1.vm.provision "shell", inline: $script
end
config.vm.define "container-networking-2" do |s2|
config.vm.define "3-multi-node-2" do |s2|
s2.vm.box = "ubuntu/xenial64"
s2.vm.network :private_network, ip: "10.0.0.20", virtualbox__intnet: "network3"
s2.vm.hostname = "container-networking-2"
s2.vm.hostname = "3-multi-node-2"
s2.vm.provision "shell", inline: $script
end
config.vm.box_check_update = false
Expand Down
2 changes: 1 addition & 1 deletion 3-multi-node/env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CON1="con1"
CON2="con2"
if [ $(hostname) == "container-networking-1" ]; then
if [ $(hostname) == "3-multi-node-1" ]; then
NODE_IP="10.0.0.10"
BRIDGE_SUBNET="172.16.0.0/24"
BRIDGE_IP="172.16.0.1"
Expand Down
16 changes: 8 additions & 8 deletions 4-overlay-network/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@ all: setup test teardown

setup:
rm -rf setup-1.complete setup-2.complete
vagrant ssh container-networking-1 -c 'cd /vagrant ; ./setup.sh > setup-1.log ; touch setup-1.complete' &
vagrant ssh container-networking-2 -c 'cd /vagrant ; ./setup.sh > setup-2.log ; touch setup-2.complete' &
vagrant ssh 4-overlay-network-1 -c 'cd /vagrant ; ./setup.sh > setup-1.log ; touch setup-1.complete' &
vagrant ssh 4-overlay-network-2 -c 'cd /vagrant ; ./setup.sh > setup-2.log ; touch setup-2.complete' &
until [ -f setup-1.complete ] && [ -f setup-2.complete ]; do sleep 1; done

test:
vagrant ssh container-networking-1 -c 'cd /vagrant ; ./test.sh'
vagrant ssh container-networking-2 -c 'cd /vagrant ; ./test.sh'
vagrant ssh 4-overlay-network-1 -c 'cd /vagrant ; ./test.sh'
vagrant ssh 4-overlay-network-2 -c 'cd /vagrant ; ./test.sh'

teardown:
rm -rf teardown-1.complete teardown-2.complete
-vagrant ssh container-networking-1 -c 'cd /vagrant ; ./teardown.sh > teardown-1.log ; touch teardown-1.complete' &
-vagrant ssh container-networking-2 -c 'cd /vagrant ; ./teardown.sh > teardown-2.log ; touch teardown-2.complete' &
-vagrant ssh 4-overlay-network-1 -c 'cd /vagrant ; ./teardown.sh > teardown-1.log ; touch teardown-1.complete' &
-vagrant ssh 4-overlay-network-2 -c 'cd /vagrant ; ./teardown.sh > teardown-2.log ; touch teardown-2.complete' &
until [ -f teardown-1.complete ] && [ -f teardown-2.complete ]; do sleep 1; done

clean:
rm -rf *.log *.complete

ssh1:
vagrant ssh container-networking-1
vagrant ssh 4-overlay-network-1

ssh2:
vagrant ssh container-networking-2
vagrant ssh 4-overlay-network-2
13 changes: 7 additions & 6 deletions 4-overlay-network/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

$script = <<SCRIPT
echo "cd /vagrant" >> /home/vagrant/.bashrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":colorscheme delek" >> /home/vagrant/.vimrc
echo ":set number" >> /home/vagrant/.vimrc
echo ":set nowrap" >> /home/vagrant/.vimrc
echo ":colorscheme industry" >> /home/vagrant/.vimrc
export DEBIAN_FRONTEND=noninteractive
dpkg -i --force-all /vagrant/pkg/socat_1.7.3.1-1_amd64.deb
dpkg -i --force-all /vagrant/pkg/geoip-database-extra_20160408-1_all.deb
Expand All @@ -28,16 +29,16 @@ dpkg -i --force-all /vagrant/pkg/tshark_2.2.6+g32dac6a-2ubuntu0.16.04_amd64.deb
SCRIPT

Vagrant.configure(2) do |config|
config.vm.define "container-networking-1" do |s1|
config.vm.define "4-overlay-network-1" do |s1|
s1.vm.box = "ubuntu/xenial64"
s1.vm.network :private_network, ip: "10.0.0.10", virtualbox__intnet: "network4"
s1.vm.hostname = "container-networking-1"
s1.vm.hostname = "4-overlay-network-1"
s1.vm.provision "shell", inline: $script
end
config.vm.define "container-networking-2" do |s2|
config.vm.define "4-overlay-network-2" do |s2|
s2.vm.box = "ubuntu/xenial64"
s2.vm.network :private_network, ip: "10.0.0.20", virtualbox__intnet: "network4"
s2.vm.hostname = "container-networking-2"
s2.vm.hostname = "4-overlay-network-2"
s2.vm.provision "shell", inline: $script
end
config.vm.box_check_update = false
Expand Down
2 changes: 1 addition & 1 deletion 4-overlay-network/env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CON1="con1"
CON2="con2"
if [ $(hostname) == "container-networking-1" ]; then
if [ $(hostname) == "4-overlay-network-1" ]; then
NODE_IP="10.0.0.10"
TUNNEL_IP="172.16.0.100"
BRIDGE_IP="172.16.0.1"
Expand Down
Binary file modified slides/201810-voxxeddays/slides.key
Binary file not shown.
Binary file modified slides/201810-voxxeddays/slides.pdf
Binary file not shown.

0 comments on commit 8c0dad5

Please sign in to comment.