Add default flavors during init-runonce

The nova team is removing the default flavors from a standard
deployment.  This is great for operators, who have to delete
the defaults anyways.  This patch adds the original default
flavors back during init-runonce so kolla users can be ready
to launch instances.

Closes-Bug: #1567964
Change-Id: I17daec98997a6e412a99f34d3f8a4324460d8c60
This commit is contained in:
Dave McCowan 2016-04-06 23:31:10 -07:00
parent 928551ba83
commit fda9444ea6

View File

@ -89,3 +89,12 @@ nova quota-update --user $ADMIN_USER_ID --cores 40 $ADMIN_PROJECT_ID
# 96GB ram
nova quota-update --ram 96000 $ADMIN_PROJECT_ID
nova quota-update --user $ADMIN_USER_ID --ram 96000 $ADMIN_PROJECT_ID
# add default flavors, if they don't already exist
if ! openstack flavor list | grep -q m1.tiny; then
openstack flavor create --id 1 --ram 512 --disk 1 --vcpus 1 m1.tiny
openstack flavor create --id 2 --ram 2048 --disk 20 --vcpus 1 m1.small
openstack flavor create --id 3 --ram 4096 --disk 40 --vcpus 2 m1.medium
openstack flavor create --id 4 --ram 8192 --disk 80 --vcpus 4 m1.large
openstack flavor create --id 5 --ram 16384 --disk 160 --vcpus 8 m1.xlarge
fi