~ubuntu-branches/ubuntu/saucy/heat/saucy

« back to all changes in this revision

Viewing changes to doc/source/template_guide/environment.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2013-09-08 21:51:19 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130908215119-r939tu4aumqgdrkx
Tags: 2013.2~b3-0ubuntu1
[ Chuck Short ]
* New upstream release.
* debian/control: Add python-netaddr as build-dep.
* debian/heat-common.install: Remove heat-boto and associated man-page
* debian/heat-common.install: Remove heat-cfn and associated man-page
* debian/heat-common.install: Remove heat-watch and associated man-page
* debian/patches/fix-sqlalchemy-0.8.patch: Dropped

[ Adam Gandelman ]
* debian/patches/default-kombu.patch: Dropped.
* debian/patches/default-sqlite.patch: Refreshed.
* debian/*.install, rules: Install heat.conf.sample as common
  config file in heat-common. Drop other per-package configs, they
  are no longer used.
* debian/rules: Clean pbr .egg from build dir if it exists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
..
 
2
      Licensed under the Apache License, Version 2.0 (the "License"); you may
 
3
      not use this file except in compliance with the License. You may obtain
 
4
      a copy of the License at
 
5
 
 
6
          http://www.apache.org/licenses/LICENSE-2.0
 
7
 
 
8
      Unless required by applicable law or agreed to in writing, software
 
9
      distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
10
      WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
11
      License for the specific language governing permissions and limitations
 
12
      under the License.
 
13
 
 
14
============
 
15
Environments
 
16
============
 
17
 
 
18
The environment is used to affect the runtime behaviour of the
 
19
template. It provides a way to override the default resource
 
20
implementation and the parameters passed to Heat.
 
21
 
 
22
------
 
23
Format
 
24
------
 
25
It is a yaml text file with two main sections "resource_registry" and "parameters".
 
26
 
 
27
------------------
 
28
Command line usage
 
29
------------------
 
30
::
 
31
 
 
32
  heat stack-create -e my_env.yaml -P "some_parm=bla" -f my_tmpl.yaml
 
33
 
 
34
--------------
 
35
Usage examples
 
36
--------------
 
37
 
 
38
1) Pass parameters into Heat
 
39
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
40
::
 
41
 
 
42
  parameters:
 
43
    KeyName: heat_key
 
44
    InstanceType: m1.micro
 
45
    ImageId: F18-x86_64-cfntools
 
46
 
 
47
 
 
48
2) Deal with the renaming of Quantum to Neutron
 
49
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
50
::
 
51
 
 
52
  resource_registry:
 
53
    "OS::Quantum*": "OS::Neutron*"
 
54
 
 
55
 
 
56
3) Override a resource type with a custom TemplateResource
 
57
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
58
::
 
59
 
 
60
  resource_registry:
 
61
    "AWS::EC2::Instance": file:///home/mine/my_instance_with_better_defaults.yaml
 
62
 
 
63
 
 
64
4) Always map resource type X to Y
 
65
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
66
::
 
67
 
 
68
  resource_registry:
 
69
    "OS::Networking::FloatingIP": "OS::Nova::FloatingIP"
 
70
 
 
71
 
 
72
5) Use default resources except one for a particular resource in the template
 
73
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
74
::
 
75
 
 
76
  resource_registry:
 
77
    resources:
 
78
      my_db_server:
 
79
        "OS::DBInstance": file:///home/mine/all_my_cool_templates/db.yaml