Skip to content

Instantly share code, notes, and snippets.

@jhershberg
Last active September 20, 2016 01:52
Show Gist options
  • Save jhershberg/0a148b10f964d5cb8ec420ba8749bd42 to your computer and use it in GitHub Desktop.
Save jhershberg/0a148b10f964d5cb8ec420ba8749bd42 to your computer and use it in GitHub Desktop.
for provider post - script to create e/w provider network between two nodes
echo create network
neutron net-create --provider:network_type vlan --provider:physical_network joshnet --provider:segmentation_id 1010 N1
echo create subnet
neutron subnet-create N1 --name S1 --allocation-pool start=192.168.2.100,end=192.168.2.120 192.168.2.0/24
echo create vm_left
nova boot --image cirros-0.3.4-x86_64-uec --nic net-id=$(neutron net-list | awk "/N1/ {print \$2}") --flavor m1.nano vm_left --availability-zone nova:control
echo create vm_right
nova boot --image cirros-0.3.4-x86_64-uec --nic net-id=$(neutron net-list | awk "/N1/ {print \$2}") --flavor m1.nano vm_right --availability-zone nova:compute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment