Skip to content

Instantly share code, notes, and snippets.

View trumant's full-sized avatar

Travis Truman trumant

View GitHub Profile
@trumant
trumant / launch-openstack-instances-example.sh
Created July 26, 2016 20:10
OpenStack-Ansible OVS instance launch example
ssh man1.oslab
lxc-attach -n `lxc-ls | grep utility`
source demo-openrc
# Get the network ids
openstack network list
# Allow ping access
openstack security group rule create \
--proto icmp default
@trumant
trumant / setup-project-network.sh
Created July 26, 2016 20:09
OpenStack-Ansible OVS project network setup example
ssh man1.oslab
lxc-attach -n `lxc-ls | grep utility`
source demo-openrc
# Create the project network
neutron net-create project
# Create the subnet for the provider net
neutron subnet-create project 192.168.3.0/24 \
--name project-subnet \
@trumant
trumant / setup-provider-network.sh
Created July 26, 2016 20:07
OpenStack-Ansible OVS - provider network setup example
ssh man1.oslab
lxc-attach -n `lxc-ls | grep utility`
source openrc
# Create the provider network
neutron net-create physnet1 --shared \
--provider:physical_network physnet1 \
--provider:network_type vlan \
--provider:segmentation_id 101
@trumant
trumant / run-ovs-setup-playbook.txt
Created July 26, 2016 20:00
OpenStack-Ansible OVS sample how to run ovs-setup.yml playbook
$ sudo su -
# cd /opt/openstack-ansible/playbooks
# openstack-ansible ovs-setup.yml
@trumant
trumant / ovs-setup.yml
Created July 26, 2016 19:59
OpenStack-Ansible OVS bridge setup playbook
---
- name: Setup OVS bridges
hosts: neutron_openvswitch_agent
user: root
tasks:
- name: Setup br-provider
openvswitch_bridge:
bridge: br-provider
state: present
@trumant
trumant / run-lab-playbooks.txt
Last active July 26, 2016 19:56
OpenStack-Ansible OVS sample playbook run
$ sudo su - root
# cd /opt/openstack-ansible/playbooks
# openstack-ansible setup-hosts.yml
# openstack-ansible setup-infrastructure.yml
# openstack-ansible os-keystone-install.yml
# openstack-ansible os-glance-install.yml
# openstack-ansible os-nova-install.yml
# openstack-ansible os-neutron-install.yml
@trumant
trumant / user_variables.yml
Created July 26, 2016 19:52
OpenStack-Ansible OVS sample user_variables.yml
# Ensure the openvswitch kernel module is loaded
openstack_host_specific_kernel_modules:
- name: "openvswitch"
pattern: "CONFIG_OPENVSWITCH="
group: "network_hosts"
### Neutron specific config
neutron_plugin_type: ml2.ovs
neutron_ml2_drivers_type: "flat,vlan"
@trumant
trumant / openstack_user_config.yml
Created July 26, 2016 19:49
OpenStack-Ansible OVS sample openstack_user_config.yml
---
cidr_networks:
container: 192.168.1.0/24
used_ips:
- "192.168.1.0,192.168.1.24" # lab metal hosts
global_overrides:
internal_lb_vip_address: 192.168.1.20 # man1.oslab
external_lb_vip_address: 192.168.1.20 # man1.oslab
@trumant
trumant / br-vlan.cfg
Created July 26, 2016 19:46
Sample OpenStack-Ansible br-vlan.cfg
# OpenStack Networking VLAN bridge
auto br-vlan
iface br-vlan inet manual
bridge_stp off
bridge_waitport 0
bridge_fd 0
bridge_ports eth1
@trumant
trumant / br-mgmt.cfg
Created July 26, 2016 19:45
Sample OpenStack-Ansible /etc/network/interfaces.d/br-mgmt.cfg
# OpenStack Management network bridge
auto br-mgmt
iface br-mgmt inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
bridge_ports eth0
address MANAGEMENT_NETWORK_IP
netmask 255.255.255.0
gateway 192.168.1.1