Skip to content

Instantly share code, notes, and snippets.

@alagalah
Created July 24, 2015 16:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alagalah/9e7477247276160ba7dc to your computer and use it in GitHub Desktop.
source openrc admin admin
# create ssh key for each tenant
#
for x in coke pepsi ; do echo "ssh key for ${x}" ; \
rm -f id_rsa_${x}* ; ssh-keygen -t rsa -b 2048 -N '' -f id_rsa_${x} ; done
for x in coke pepsi ; do echo "configuring ${x} tenant" ; \
keystone tenant-create --name ${x}
keystone user-create --name ${x} --tenant ${x} --pass ${x}
keystone user-role-add --user ${x} --role admin --tenant ${x}
done
# Add ssh key and a dedicated router instance to each tenant
#
for x in coke pepsi ; do echo "configuring ${x} tenant key and router" ; \
source openrc ${x} ${x} ; export OS_PASSWORD=${x}
nova keypair-add --pub-key id_rsa_${x}.pub ${x}_key
testmtnet.sh ${x}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment