summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/scale1.yaml30
-rw-r--r--examples/scale2.yaml66
-rw-r--r--examples/scale_result.yaml190
-rw-r--r--examples/source2_lib_result.yaml4
-rw-r--r--examples/source_include_subkey_result.yaml4
-rw-r--r--examples/source_lib_result.yaml4
6 files changed, 292 insertions, 6 deletions
diff --git a/examples/scale1.yaml b/examples/scale1.yaml
new file mode 100644
index 00000000..c0a0763d
--- /dev/null
+++ b/examples/scale1.yaml
@@ -0,0 +1,30 @@
+Resources:
+ ComputeUser:
+ Type: AWS::IAM::User
+ Properties:
+ Policies: [ { Ref: ComputeAccessPolicy } ]
+ GlobalAccessPolicy:
+ Type: OS::Heat::AccessPolicy
+ NovaCompute0Key:
+ Type: FileInclude
+ Path: examples/scale2.yaml
+ SubKey: Resources.NovaCompute0Key
+ NovaCompute0CompletionCondition:
+ Type: FileInclude
+ Path: examples/scale2.yaml
+ SubKey: Resources.NovaCompute0CompletionCondition
+ NovaCompute0CompletionHandle:
+ Type: FileInclude
+ Path: examples/scale2.yaml
+ SubKey: Resources.NovaCompute0CompletionHandle
+ NovaCompute0Config:
+ Type: FileInclude
+ Path: examples/scale2.yaml
+ SubKey: Resources.NovaCompute0Config
+ Parameters:
+ ComputeImage: "123"
+ RabbitPassword: "guest"
+ NovaCompute0:
+ Type: FileInclude
+ Path: examples/scale2.yaml
+ SubKey: Resources.NovaCompute0
diff --git a/examples/scale2.yaml b/examples/scale2.yaml
new file mode 100644
index 00000000..d1a81fe5
--- /dev/null
+++ b/examples/scale2.yaml
@@ -0,0 +1,66 @@
+HeatTemplateFormatVersion: '2012-12-12'
+Parameters:
+ ComputeImage:
+ Type: String
+ RabbitPassword:
+ Type: String
+ NoEcho: true
+Resources:
+ ComputeAccessPolicy:
+ Type: OS::Heat::AccessPolicy
+ Properties:
+ AllowedResources: [ NovaCompute0 ]
+ NovaCompute0Key:
+ Type: AWS::IAM::AccessKey
+ Properties:
+ UserName:
+ Ref: ComputeUser
+ NovaCompute0CompletionCondition:
+ Type: AWS::CloudFormation::WaitCondition
+ DependsOn: notcompute
+ Properties:
+ Handle: {Ref: NovaCompute0CompletionHandle}
+ Count: '1'
+ Timeout: '1800'
+ NovaCompute0CompletionHandle:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ NovaCompute0:
+ Type: OS::Nova::Server
+ Properties:
+ image:
+ Ref: ComputeImage
+ Metadata:
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute0Key
+ secret_access_key:
+ Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
+ stack_name: {Ref: 'AWS::StackName'}
+ path: NovaCompute0Config.Metadata
+ NovaCompute0Config:
+ Type: AWS::AutoScaling::LaunchConfiguration
+ Metadata:
+ completion-handle:
+ Ref: NovaCompute0CompletionHandle
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute0Key
+ secret_access_key:
+ Fn::GetAtt: [ NovaCompute0Key, SecretAccessKey ]
+ stack_name: {Ref: 'AWS::StackName'}
+ path: NovaCompute0Config.Metadata
+ neutron:
+ ovs:
+ local_ip:
+ Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute0
+ - networks
+ rabbit:
+ password: {Ref: RabbitPassword}
+
diff --git a/examples/scale_result.yaml b/examples/scale_result.yaml
new file mode 100644
index 00000000..f22d864e
--- /dev/null
+++ b/examples/scale_result.yaml
@@ -0,0 +1,190 @@
+Description: examples/scale1.yaml
+HeatTemplateFormatVersion: '2012-12-12'
+Resources:
+ ComputeUser:
+ Properties:
+ Policies:
+ - Ref: ComputeAccessPolicy
+ Type: AWS::IAM::User
+ GlobalAccessPolicy:
+ Type: OS::Heat::AccessPolicy
+ NovaCompute0:
+ Metadata:
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute0Key
+ path: NovaCompute0Config.Metadata
+ secret_access_key:
+ Fn::GetAtt:
+ - NovaCompute0Key
+ - SecretAccessKey
+ stack_name:
+ Ref: AWS::StackName
+ Properties:
+ image:
+ Ref: ComputeImage
+ Type: OS::Nova::Server
+ NovaCompute0CompletionCondition:
+ DependsOn: notcompute
+ Properties:
+ Count: '1'
+ Handle:
+ Ref: NovaCompute0CompletionHandle
+ Timeout: '1800'
+ Type: AWS::CloudFormation::WaitCondition
+ NovaCompute0CompletionHandle:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ NovaCompute0Config:
+ Metadata:
+ completion-handle:
+ Ref: NovaCompute0CompletionHandle
+ neutron:
+ ovs:
+ local_ip:
+ Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute0
+ - networks
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute0Key
+ path: NovaCompute0Config.Metadata
+ secret_access_key:
+ Fn::GetAtt:
+ - NovaCompute0Key
+ - SecretAccessKey
+ stack_name:
+ Ref: AWS::StackName
+ rabbit:
+ password: guest
+ Type: AWS::AutoScaling::LaunchConfiguration
+ NovaCompute0Key:
+ Properties:
+ UserName:
+ Ref: ComputeUser
+ Type: AWS::IAM::AccessKey
+ NovaCompute1:
+ Metadata:
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute1Key
+ path: NovaCompute1Config.Metadata
+ secret_access_key:
+ Fn::GetAtt:
+ - NovaCompute1Key
+ - SecretAccessKey
+ stack_name:
+ Ref: AWS::StackName
+ Properties:
+ image:
+ Ref: ComputeImage
+ Type: OS::Nova::Server
+ NovaCompute1CompletionCondition:
+ DependsOn: notcompute
+ Properties:
+ Count: '1'
+ Handle:
+ Ref: NovaCompute1CompletionHandle
+ Timeout: '1800'
+ Type: AWS::CloudFormation::WaitCondition
+ NovaCompute1CompletionHandle:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ NovaCompute1Config:
+ Metadata:
+ completion-handle:
+ Ref: NovaCompute1CompletionHandle
+ neutron:
+ ovs:
+ local_ip:
+ Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute1
+ - networks
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute1Key
+ path: NovaCompute1Config.Metadata
+ secret_access_key:
+ Fn::GetAtt:
+ - NovaCompute1Key
+ - SecretAccessKey
+ stack_name:
+ Ref: AWS::StackName
+ rabbit:
+ password: guest
+ Type: AWS::AutoScaling::LaunchConfiguration
+ NovaCompute1Key:
+ Properties:
+ UserName:
+ Ref: ComputeUser
+ Type: AWS::IAM::AccessKey
+ NovaCompute2:
+ Metadata:
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute2Key
+ path: NovaCompute2Config.Metadata
+ secret_access_key:
+ Fn::GetAtt:
+ - NovaCompute2Key
+ - SecretAccessKey
+ stack_name:
+ Ref: AWS::StackName
+ Properties:
+ image:
+ Ref: ComputeImage
+ Type: OS::Nova::Server
+ NovaCompute2CompletionCondition:
+ DependsOn: notcompute
+ Properties:
+ Count: '1'
+ Handle:
+ Ref: NovaCompute2CompletionHandle
+ Timeout: '1800'
+ Type: AWS::CloudFormation::WaitCondition
+ NovaCompute2CompletionHandle:
+ Type: AWS::CloudFormation::WaitConditionHandle
+ NovaCompute2Config:
+ Metadata:
+ completion-handle:
+ Ref: NovaCompute2CompletionHandle
+ neutron:
+ ovs:
+ local_ip:
+ Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute2
+ - networks
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: NovaCompute2Key
+ path: NovaCompute2Config.Metadata
+ secret_access_key:
+ Fn::GetAtt:
+ - NovaCompute2Key
+ - SecretAccessKey
+ stack_name:
+ Ref: AWS::StackName
+ rabbit:
+ password: guest
+ Type: AWS::AutoScaling::LaunchConfiguration
+ NovaCompute2Key:
+ Properties:
+ UserName:
+ Ref: ComputeUser
+ Type: AWS::IAM::AccessKey
diff --git a/examples/source2_lib_result.yaml b/examples/source2_lib_result.yaml
index d4b19768..172dce0f 100644
--- a/examples/source2_lib_result.yaml
+++ b/examples/source2_lib_result.yaml
@@ -1,7 +1,7 @@
Description: examples/source2.yaml
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
- GenericBImage:
+ BImage:
Type: String
ImportantValue:
Default: a_default
@@ -12,5 +12,5 @@ Resources:
my_meta: Foo
Properties:
image:
- Ref: GenericBImage
+ Ref: BImage
Type: OS::Nova::Server
diff --git a/examples/source_include_subkey_result.yaml b/examples/source_include_subkey_result.yaml
index f5ff80ea..641e8148 100644
--- a/examples/source_include_subkey_result.yaml
+++ b/examples/source_include_subkey_result.yaml
@@ -1,7 +1,7 @@
Description: examples/source_include_subkey.yaml
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
- GenericBImage:
+ Foo:
Type: String
Resources:
GenericB:
@@ -10,5 +10,5 @@ Resources:
Ref: ImportantValue
Properties:
image:
- Ref: GenericBImage
+ Ref: Foo
Type: OS::Nova::Server
diff --git a/examples/source_lib_result.yaml b/examples/source_lib_result.yaml
index a165cabf..ceb8a321 100644
--- a/examples/source_lib_result.yaml
+++ b/examples/source_lib_result.yaml
@@ -1,14 +1,14 @@
Description: examples/source.yaml
HeatTemplateFormatVersion: '2012-12-12'
Parameters:
- AImage: null
Default: my_image
+ SourceImage: null
Type: String
Resources:
A:
Properties:
image:
- Ref: AImage
+ Ref: SourceImage
Type: OS::Nova::Server
B:
Metadata: