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
#!/usr/bin/python | |
import os | |
import subprocess | |
import sys | |
vm_num=5 | |
br_num=3 | |
# list of IPs for subnets of tenant - VMs | |
av_ips = [] |
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
sudo docker run -itd --privileged --name=SC1 fw_ubuntu | |
sudo docker run -itd --privileged --name=SC2 fw_ubuntu | |
sudo docker run -itd --privileged --name=LC1 fw_ubuntu | |
sudo docker run -itd --privileged --name=LC2 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS1 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS2 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS3 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS4 fw_ubuntu | |
sudo ip link add sc11 type veth peer name lc11 | |
sudo ip link add sc12 type veth peer name lc22 |
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
sudo apt-get install docker.io | |
sudo docker build -t fw_ubuntu . | |
sudo docker run -itd --privileged --name=SC1 fw_ubuntu | |
sudo docker run -itd --privileged --name=SC2 fw_ubuntu | |
sudo docker run -itd --privileged --name=LC1 fw_ubuntu | |
sudo docker run -itd --privileged --name=LC2 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS1 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS2 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS3 fw_ubuntu | |
sudo docker run -itd --privileged --name=CS4 fw_ubuntu |
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
#!/usr/bin/python | |
import os | |
import subprocess | |
import sys | |
veth_octet=1 | |
br_octet=20 | |
br_num=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
while true ; do ./sample1.sh & sleep 5; done |
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
- hosts: localhost | |
gather_facts: no | |
## Package installations | |
tasks: | |
- name: Check for qemu-kvm | |
apt: | |
name: qemu-kvm | |
state: present | |
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
- hosts: localhost | |
gather_facts: no | |
become: yes | |
# as I created 4 ovs bridges in playbook 1, now I will define L2 networks for all of them and then define each separately | |
tasks: | |
- name: Define a network | |
virt_net: | |
command: define |
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
<network> | |
<name>net3</name> | |
<forward mode='bridge'/> | |
<bridge name='sw3'/> | |
<virtualport type='openvswitch'/> | |
</network> |
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
- hosts: localhost | |
gather_facts: no | |
become: yes | |
## Package installations | |
tasks: | |
- name: Check for qemu-kvm | |
apt: | |
name: qemu-kvm | |
state: present |
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
--- | |
- hosts: localhost | |
become: yes | |
gather_facts: no | |
tasks: | |
- name: install boto | |
command: sudo apt-get -y install python-boto |
NewerOlder