# Built via Makefile
overcloud.yaml
+overcloud-with-block-storage.yaml
+overcloud-with-block-storage-nfs.yaml
undercloud-bm.yaml
undercloud-vm.yaml
undercloud-vm-tuskar.yaml
-generated_templates = \
- overcloud.yaml \
- undercloud-vm.yaml \
- undercloud-bm.yaml \
- undercloud-vm-tuskar.yaml \
+generated_templates = \
+ overcloud.yaml \
+ overcloud-with-block-storage.yaml \
+ overcloud-with-block-storage-nfs.yaml \
+ undercloud-vm.yaml \
+ undercloud-bm.yaml \
+ undercloud-vm-tuskar.yaml \
undercloud-vm-ironic.yaml
# Files included in overcloud-source.yaml via FileInclude
overcloud-with-block-storage.yaml: overcloud-source.yaml nova-compute-instance.yaml swift-source.yaml block-storage.yaml
# $^ won't work here because we want to list nova-compute-instance.yaml as
# a prerequisite but don't want to pass it into merge.py
- python ./tripleo_heat_merge/merge.py overcloud-source.yaml swift-source.yaml block-storage.yaml > $@.tmp
+ python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale BlockStorage=$${CINDERSCALE:-'1'} overcloud-source.yaml swift-source.yaml block-storage.yaml > $@.tmp
+ mv $@.tmp $@
+
+overcloud-with-block-storage-nfs.yaml: overcloud-source.yaml nova-compute-instance.yaml swift-source.yaml nfs-server-source.yaml block-storage-nfs.yaml
+ # $^ won't work here because we want to list nova-compute-instance.yaml as
+ # a prerequisite but don't want to pass it into merge.py
+ python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale BlockStorage=$${CINDERSCALE:-'1'} overcloud-source.yaml swift-source.yaml nfs-server-source.yaml block-storage-nfs.yaml > $@.tmp
mv $@.tmp $@
undercloud-vm.yaml: undercloud-source.yaml undercloud-vm-source.yaml
python ./tripleo_heat_merge/merge.py $^ > $@.tmp
mv $@.tmp $@
+check: test
+
test:
@bash test_merge.bash
clean:
rm -f $(generated_templates)
-.PHONY: clean overcloud.yaml
+.PHONY: clean overcloud.yaml check
--- /dev/null
+HeatTemplateFormatVersion: '2012-12-12'
+Description: 'Common Block Storage Configuration'
+Parameters:
+ BlockStorageImage:
+ Type: String
+ Default: overcloud-cinder-volume
+ OvercloudBlockStorageFlavor:
+ Default: baremetal
+ Description: Flavor for block storage nodes to request when deploying.
+ Type: String
+Resources:
+ BlockStorageAccessPolicy:
+ Type: OS::Heat::AccessPolicy
+ Properties:
+ AllowedResources:
+ - BlockStorage0
+ BlockStorageUser:
+ Type: AWS::IAM::User
+ Properties:
+ Policies: [ { Ref: BlockStorageAccessPolicy } ]
+ BlockStorageKey:
+ Type: AWS::IAM::AccessKey
+ Properties:
+ UserName:
+ Ref: BlockStorageUser
+ BlockStorage0:
+ Type: OS::Nova::Server
+ Properties:
+ image:
+ {Ref: BlockStorageImage}
+ flavor: {Ref: OvercloudBlockStorageFlavor}
+ key_name: {Ref: KeyName}
+ Metadata:
+ os-collect-config:
+ cfn:
+ access_key_id:
+ Ref: BlockStorageKey
+ secret_access_key:
+ Fn::GetAtt: [ BlockStorageKey, SecretAccessKey ]
+ stack_name: {Ref: 'AWS::StackName'}
+ OpenStack::ImageBuilder::Elements: [ cinder ]
+ keystone:
+ host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
+ cinder:
+ db: {"Fn::Join": ['', ['mysql://cinder:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] } , '/cinder']]}
+ volume_size_mb: '5000'
+ service-password:
+ Ref: CinderPassword
+ volume: 'true'
+ include_nfs_backend: 'true'
+ nfs_shares:
+ - {"Fn::Join": ['', [{"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] } , ':/mnt/state/var/lib/nfs_share']]}
+ admin-password: {Ref: AdminPassword}
+ rabbit:
+ host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notCompute0, networks]} ]} ] }
+ username: {Ref: RabbitUserName}
+ password: {Ref: RabbitPassword}
+ interfaces:
+ control: {Ref: NeutronPublicInterface}
Type: String
Default: "guest"
NoEcho: true
+ OvercloudBlockStorageFlavor:
+ Default: baremetal
+ Description: Flavor for block storage nodes to request when deploying.
+ Type: String
Resources:
BlockStorageAccessPolicy:
Type: OS::Heat::AccessPolicy
Properties:
image:
{Ref: BlockStorageImage}
- flavor: {Ref: Flavor}
+ flavor: {Ref: OvercloudBlockStorageFlavor}
key_name: {Ref: KeyName}
Metadata:
os-collect-config:
- NovaCompute0
- show
- local
+ - Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute1
+ - networks
+ - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute1
+ - show
+ - Fn::Join:
+ - .
+ - - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute1
+ - show
+ - local
+ - Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute2
+ - networks
+ - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute2
+ - show
+ - Fn::Join:
+ - .
+ - - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute2
+ - show
+ - local
os-collect-config:
cfn:
access_key_id:
'
- - Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute0
+ - networks
+ - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute0
+ - show
+ - Fn::Join:
+ - .
+ - - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute0
+ - show
+ - local
+ - Fn::Join:
- ' '
- - Fn::Select:
- 0
- NovaCompute1
- show
- local
+ - Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute2
+ - networks
+ - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute2
+ - show
+ - Fn::Join:
+ - .
+ - - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute2
+ - show
+ - local
os-collect-config:
cfn:
access_key_id:
'
- - Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute0
+ - networks
+ - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute0
+ - show
+ - Fn::Join:
+ - .
+ - - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute0
+ - show
+ - local
+ - Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute1
+ - networks
+ - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute1
+ - show
+ - Fn::Join:
+ - .
+ - - Fn::Select:
+ - name
+ - Fn::GetAtt:
+ - NovaCompute1
+ - show
+ - local
+ - Fn::Join:
- ' '
- - Fn::Select:
- 0
--- /dev/null
+Description: 'NFS server share configuration for testing'
+Resources:
+ notCompute0Config:
+ Type: AWS::AutoScaling::LaunchConfiguration
+ Metadata:
+ nfs_server:
+ shares:
+ Merge::Map:
+ NovaCompute0:
+ Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - NovaCompute0
+ - networks
+ BlockStorage0:
+ Fn::Join:
+ - ' '
+ - - Fn::Select:
+ - 0
+ - Fn::Select:
+ - ctlplane
+ - Fn::GetAtt:
+ - BlockStorage0
+ - networks
\ No newline at end of file
Description: Password for connecting to glance database
Type: String
NoEcho: true
+ GlanceNotifierStrategy:
+ Description: Strategy to use for Glance notification queue
+ Type: String
+ Default: noop
+ GlanceLogFile:
+ Description: The filepath of the file to use for logging messages from Glance.
+ Type: String
+ Default: ''
HeatDBPassword:
Description: Password for accessing Heat database.
Type: String
- - 'mysql://glance:'
- {Ref: GlanceDBPassword}
- '@127.0.0.1/glance'
+ notifier-strategy:
+ Ref: GlanceNotifierStrategy
+ log-file:
+ Ref: GlanceLogFile
heat:
db:
Fn::Join:
Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
Type: String
Default: default
- Flavor:
+ OvercloudComputeFlavor:
Description: Use this flavor
Type: String
Default: baremetal
Ref: ComputeUser
NovaCompute0CompletionCondition:
Type: AWS::CloudFormation::WaitCondition
- DependsOn: notCompute0
+ DependsOn: notCompute0Config
Properties:
Handle: {Ref: NovaCompute0CompletionHandle}
Count: '1'
{Ref: NovaImage}
image_update_policy:
Ref: ImageUpdatePolicy
- flavor: {Ref: Flavor}
+ flavor: {Ref: OvercloudComputeFlavor}
key_name: {Ref: KeyName}
Metadata:
os-collect-config:
Description: The password for the cinder service account, used by cinder-api.
Type: String
NoEcho: true
- Flavor:
+ OvercloudControlFlavor:
Default: baremetal
- Description: Flavor to request when deploying.
+ Description: Flavor for control nodes to request when deploying.
+ Type: String
+ OvercloudComputeFlavor:
+ Default: baremetal
+ Description: Flavor for compute nodes to request when deploying.
Type: String
GlancePassword:
Default: unset
Description: The password for the glance service account, used by the glance services.
Type: String
NoEcho: true
+ GlanceNotifierStrategy:
+ Description: Strategy to use for Glance notification queue
+ Type: String
+ Default: noop
+ GlanceLogFile:
+ Description: The filepath of the file to use for logging messages from Glance.
+ Type: String
+ Default: ''
HeatPassword:
Default: unset
Description: The password for the Heat service account, used by the Heat services.
Type: AWS::IAM::AccessKey
notCompute0CompletionCondition:
Type: AWS::CloudFormation::WaitCondition
- DependsOn: notCompute0
+ DependsOn: notCompute0Config
Properties:
Handle: {Ref: notCompute0CompletionHandle}
Count: '1'
swift-store-user: service:glance
swift-store-key:
Ref: GlancePassword
+ notifier-strategy:
+ Ref: GlanceNotifierStrategy
+ log-file:
+ Ref: GlanceLogFile
heat:
admin_password:
Ref: HeatPassword
image_update_policy:
Ref: ImageUpdatePolicy
flavor:
- Ref: Flavor
+ Ref: OvercloudControlFlavor
key_name:
Ref: KeyName
Metadata:
Values are handled via scale_value.
- Keys in dicts are always copied per the scaling rule.
+ Keys in dicts are copied per the scaling rule.
Values are either replaced or copied depending on whether the given
scaling rule is in in_copies.
+
+ in_copies is reset to None when a dict {'Merge::Map': someobject} is
+ encountered.
"""
in_copies = dict(in_copies or {})
# Shouldn't be needed but to avoid unexpected side effects/bugs we short
if not scaling:
return template
if isinstance(template, dict):
+ if 'Merge::Map' in template:
+ in_copies = None
new_template = {}
for key, value in template.items():
for prefix, copy_num, new_key in scale_value(
Description: The password for the glance service account, used by the glance services.
Type: String
NoEcho: true
+ GlanceNotifierStrategy:
+ Description: Strategy to use for Glance notification queue
+ Type: String
+ Default: noop
+ GlanceLogFile:
+ Description: The filepath of the file to use for logging messages from Glance.
+ Type: String
+ Default: ''
KeyName:
Default: default
Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
host: 127.0.0.1
service-password:
Ref: GlancePassword
+ notifier-strategy:
+ Ref: GlanceNotifierStrategy
+ log-file:
+ Ref: GlanceLogFile
heat:
admin_password:
Ref: HeatPassword