Skip to content

Instantly share code, notes, and snippets.

View trumant's full-sized avatar

Travis Truman trumant

View GitHub Profile
@trumant
trumant / gist:302ff73dd17f7e7637dfff1fd37dbca0
Created July 29, 2016 17:06
Sample transport_url value
rabbit://neutron:7a75d07f7db2743019cd584e85d451f6cd00cdf9d909efca267f745@192.168.1.212:5671,neutron:7a75d07f7db2743019cd584e85d451f6cd00cdf9d909efca267f745@192.168.1.109:5671,neutron:7a75d07f7db2743019cd584e85d451f6cd00cdf9d909efca267f745@192.168.1.194:5671//neutron?rabbit_use_ssl=True
@trumant
trumant / user_variables.yml
Created July 27, 2016 16:01
Sample OpenStack-Ansible DVR with OVS configuration
# 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.dvr
neutron_ml2_drivers_type: "flat,vlan"
@trumant
trumant / validate-instance-connectivity-example.sh
Created July 26, 2016 20:13
OpenStack-Ansible OVS validate instance connectivity example
ssh man1.oslab
lxc-attach -n `lxc-ls | grep neutron_agents_`
# ping provider instance from the provider network namespace
ip netns exec `ip netns | grep UUID_OF_PROVIDER_NETWORK` \
ping -c 3 PROVIDER_INSTANCE_IP
# ping project instance from the project network namespace
ip netns exec `ip netns | grep UUID_OF_PROJECT_NETWORK` \
ping -c 3 PROJECT_INSTANCE_IP
@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 / 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