[Openstack] How to run the HEAT autoscaling YAML
Joe D'Andrea
jdandrea at research.att.com
Mon Nov 3 20:32:56 UTC 2014
Hi Mridhul. Welcome to Heat! :)
On Nov 3, 2014, at 2:17 AM, Mridhul Pax <mridhul at live.com> wrote:
> I'm trying to run the autoscaling heat template under :https://github.com/openstack/heat-templates/blob/master/hot/autoscaling.yaml
>
> Can someone quickly help me how to run this and what all the parameters to pass ? Im a newbie and getting confused with the parameters to be passed.
Sure. First, those parameters. I can understand the confusion. It's not always apparent (especially if you're new) what those really are, even with the descriptions.
You'll want to have your environment set up so that you can run OpenStack clients without authenticating each time. (Exercise for the reader!)
Here are the parameters you'll need to fill-in-the-blanks for:
image: The 'glance' image that will be used to create the servers. Run 'glance image-list' to see which images you have. Normally you'd just make note of the image "Name" you want to use, but you need to be careful here. This template uses yum for installations (see line 46), so you'll need to pick an image that has yum on it. (RHEL, Fedora, and CentOS, or any RPM-based Linux distribution are likely candidates.)
key: The name of the ssh key you wish to use (presuming you've already got one). Run 'nova keypair-list' to see what you've got. If the list is empty, you'll need to use 'nova keypair-add' to make one first (and grab the private key that it generates).
flavor: This refers to the WordPress server size, more or less. 'nova flavor-list' shows these. Pick a flavor. Any flavor. :)
database_flavor: Same as flavor, but for the MySQL (MariaDB) server.
subnet_id: Use 'neutron subnet-list' to see what you have available. For this template, you'll want to use the ID (UUID) of the subnet. If there aren't any, you'll need to create one.
external_network_id: Use 'neutron net-external-list' to see and pick a UUID representing one of these. (Yes, you will need to create one if nothing's listed.)
Once you have all that, you can issue a heat command like so:
$ heat stack-create wp_autoscale -f autoscaling.yaml -p "image=IMAGE_NAME;key=KEY_NAME;..."
Where:
wp_autoscale is the name of your stack. (You could even call it Mridhul.)
-f specifies the YAML (HOT) file.
-p specifies all of those parameter names/values.
In summary, there's some extra legwork needed to gather all of the parameter input, and that isn't always apparent to newcomers. I hope this helps! If you have more specific questions, please ask.
jd
More information about the Openstack
mailing list