In my two node OpenStack setup (RDO on Fedora 20), I often have to create multiple Neutron tenant networks (here you can read a more on what’s a tenant network) for various testing purposes.
To alleviate this manual process, a trivial script that’ll create a new Neutron tenant network after you provide a few positional parameters in an existing OpenStack setup. This assumes there’s a working OpenStack setup with Neutron configured. I tested this on Neutron + OVS + GRE. This should work with any other Neutron plugins, as tenant networks is a Neutron concept (and not specific to plugins).
$ ./create-new-tenant-network.sh \ TENANTNAME USERNAME \ SUBNETSPACE ROUTERNAME \ PRIVNETNAME PRIVSUBNETNAME \
To create a new tenant network with 184.108.40.206/24 subnet:
$ ./create-new-tenant-network.sh \ demoten1 tuser1 \ 220.127.116.11 trouter1 \ priv-net1 priv-subnet1
The script does the below, in that order:
- Creates a Keystone tenant called demoten1.
View original post 424 more words