Jump to: navigation, search

Difference between revisions of "Heat/Environments"

 
Line 5: Line 5:
 
# You define any non-default Providers in the Environment  
 
# You define any non-default Providers in the Environment  
 
# You can define any extra/non-keystone credentials in the Environment
 
# You can define any extra/non-keystone credentials in the Environment
# other arguments passed into the stack and stored (Timeout & rollback)
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 18: Line 17:
 
'''Example'''
 
'''Example'''
  
   options:
+
   parameters:
  #Parameters and other global options
 
 
     InstanceType: m1.xlarge
 
     InstanceType: m1.xlarge
 
     DBUsername: angus
 
     DBUsername: angus
 
     DBPassword: verybadpass
 
     DBPassword: verybadpass
 
     KeyName: heat_key
 
     KeyName: heat_key
    timeout: 36000
 
    disable_rollback: True
 
 
   credentials:
 
   credentials:
     #note the keystone credentials will get inserted here as "keystone"
+
     rackspace_creds:
    rax_angus:
 
 
         username: myusername
 
         username: myusername
 
         api_key: 012345abcdef67890
 
         api_key: 012345abcdef67890
 
   resources:
 
   resources:
  # resource scoped options
+
    provider: rackspace.com
 
     DatabaseServer:
 
     DatabaseServer:
         Provider: RACKSPACE
+
         ImageId: this_image_please
         Credentials: rax_angus
+
         credentials: rackspace_creds
    WebServer:
 
        Provider: RACKSPACE
 
        Credentials: rax_angus
 

Latest revision as of 23:21, 29 May 2013

What is an Environment?

I see an Environment as a container for anything that affects the behavior of the Template (kinda like structured parameters).

  1. So parameters can be written into an environment file or automatically inserted if you pass them on the cli.
  2. You define any non-default Providers in the Environment
  3. You can define any extra/non-keystone credentials in the Environment
Template Static architectural design of your application
Environment Specific details that affect the instantiation of the Template
Stack Template + Environment

Example

 parameters:
   InstanceType: m1.xlarge
   DBUsername: angus
   DBPassword: verybadpass
   KeyName: heat_key
 credentials:
   rackspace_creds:
       username: myusername
       api_key: 012345abcdef67890
 resources:
   provider: rackspace.com
   DatabaseServer:
       ImageId: this_image_please
       credentials: rackspace_creds