diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | nagios3.yaml | 235 | ||||
-rw-r--r-- | nova-compute-instance.yaml | 1 | ||||
-rw-r--r-- | overcloud-source.yaml | 51 | ||||
-rw-r--r-- | ssl-source.yaml | 9 | ||||
-rw-r--r-- | swift-deploy.yaml | 22 | ||||
-rw-r--r-- | swift-source.yaml | 1 | ||||
-rw-r--r-- | swift-storage-source.yaml | 66 | ||||
-rw-r--r-- | tuskar-source.yaml | 21 | ||||
-rw-r--r-- | undercloud-bm-nova-config.yaml | 21 | ||||
-rw-r--r-- | undercloud-bm-nova-deploy.yaml | 25 | ||||
-rw-r--r-- | undercloud-bm-source.yaml | 37 | ||||
-rw-r--r-- | undercloud-source.yaml | 333 | ||||
-rw-r--r-- | undercloud-vm-ironic-config.yaml | 25 | ||||
-rw-r--r-- | undercloud-vm-ironic-deploy.yaml | 31 | ||||
-rw-r--r-- | undercloud-vm-ironic-source.yaml | 36 | ||||
-rw-r--r-- | undercloud-vm-nova-config.yaml | 27 | ||||
-rw-r--r-- | undercloud-vm-nova-deploy.yaml | 40 | ||||
-rw-r--r-- | undercloud-vm-source.yaml | 57 |
20 files changed, 597 insertions, 457 deletions
@@ -4,7 +4,6 @@ overcloud-with-block-storage.yaml overcloud-with-block-storage-nfs.yaml undercloud-bm.yaml undercloud-vm.yaml -undercloud-vm-tuskar.yaml undercloud-vm-ironic.yaml *.py[cod] @@ -3,7 +3,6 @@ generated_templates = \ 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 @@ -12,28 +11,24 @@ overcloud_source_deps = nova-compute-instance.yaml all: $(generated_templates) overcloud.yaml: overcloud-source.yaml block-storage.yaml swift-deploy.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml nova-compute-config.yaml $(overcloud_source_deps) - python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale SwiftStorage=$${SWIFTSTORAGESCALE='0'} --scale BlockStorage=$${BLOCKSTORAGESCALE='0'} overcloud-source.yaml block-storage.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml swift-deploy.yaml nova-compute-config.yaml > $@.tmp + python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale controller=$${CONTROLSCALE:-'1'} --scale SwiftStorage=$${SWIFTSTORAGESCALE='0'} --scale BlockStorage=$${BLOCKSTORAGESCALE='0'} overcloud-source.yaml block-storage.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml swift-deploy.yaml nova-compute-config.yaml > $@.tmp mv $@.tmp $@ overcloud-with-block-storage-nfs.yaml: overcloud-source.yaml block-storage-nfs.yaml nfs-server-source.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml $(overcloud_source_deps) # $^ 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 SwiftStorage=$${SWIFTSTORAGESCALE='0'} --scale BlockStorage=$${BLOCKSTORAGESCALE:-'1'} overcloud-source.yaml block-storage-nfs.yaml nfs-server-source.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml > $@.tmp + python ./tripleo_heat_merge/merge.py --scale NovaCompute=$${COMPUTESCALE:-'1'} --scale controller=$${CONTROLSCALE:-'1'} --scale SwiftStorage=$${SWIFTSTORAGESCALE='0'} --scale BlockStorage=$${BLOCKSTORAGESCALE:-'1'} overcloud-source.yaml block-storage-nfs.yaml nfs-server-source.yaml swift-source.yaml swift-storage-source.yaml ssl-source.yaml > $@.tmp mv $@.tmp $@ -undercloud-vm.yaml: undercloud-source.yaml undercloud-vm-source.yaml +undercloud-vm.yaml: undercloud-source.yaml undercloud-vm-nova-config.yaml undercloud-vm-nova-deploy.yaml python ./tripleo_heat_merge/merge.py $^ > $@.tmp mv $@.tmp $@ -undercloud-bm.yaml: undercloud-source.yaml undercloud-bm-source.yaml +undercloud-bm.yaml: undercloud-source.yaml undercloud-bm-nova-config.yaml undercloud-bm-nova-deploy.yaml python ./tripleo_heat_merge/merge.py $^ > $@.tmp mv $@.tmp $@ -undercloud-vm-tuskar.yaml: undercloud-source.yaml undercloud-vm-source.yaml tuskar-source.yaml - python ./tripleo_heat_merge/merge.py $^ > $@.tmp - mv $@.tmp $@ - -undercloud-vm-ironic.yaml: undercloud-source.yaml undercloud-vm-ironic-source.yaml +undercloud-vm-ironic.yaml: undercloud-source.yaml undercloud-vm-ironic-config.yaml undercloud-vm-ironic-deploy.yaml python ./tripleo_heat_merge/merge.py $^ > $@.tmp mv $@.tmp $@ diff --git a/nagios3.yaml b/nagios3.yaml index e60eb559..1e0a4615 100644 --- a/nagios3.yaml +++ b/nagios3.yaml @@ -1,103 +1,132 @@ -HeatTemplateFormatVersion: '2012-12-12' -Description: 'Nagios3' -Parameters: - KeyName: - Description: Name of an existing EC2 KeyPair to enable SSH access to the instance - Type: String - Default: default - AdmWebPasswd: - Description: Password for nagiosadmin web admin user. - Type: String - Default: nagiosadmin - NoEcho: true - NovaHostIp: - Description: nova ip. - Type: String - Default: 192.0.2.1 - NovaOsPassword: - Description: nova OS_PASSWORD. - Type: String - Default: unset - NoEcho: true - NovaOsUsername: - Description: nova OS_USERNAME. - Type: String - Default: admin - NovaOsTenantName: - Description: nova OS_TENANT_NAME. - Type: String - Default: admin - Nagios3ImageId: - Description: Nagios image. - Type: String - Default: nagios3 - InstanceType: - Description: Use this flavor. - Type: String - Default: baremetal - InitialIpSplitKey: - Description: Network name from nova list to get initial ip list from. - Type: String - Default: ctlplane - Apache2SnakeoilPem: - Description: Snakeoil PEM file. - Type: String - NoEcho: true - Default: | - ----- BEGIN PlaceHolder... - Apache2SnakeoilKey: - Description: Snakeoil Key file. - Type: String - NoEcho: true - Default: | - ----- BEGIN PlaceHolder... - PostfixMailHostname: - Description: Hostname for postfix.. - Type: String - Default: nagios3-nagios3 - PostfixMailDomain: - Description: Top level domain for postfix. - Type: String - Default: novalocal - PostfixDelayWarningTime: - Description: Amount of time to Delay warnnings. - Type: String - Default: 4h -Resources: - nagios3: - Metadata: - OpenStack::ImageBuilder::Elements: [ nagios3 ] - apache2: - snakeoil_pem: - Ref: Apache2SnakeoilPem - snakeoil_key: - Ref: Apache2SnakeoilKey - nagios3: - adm_web_passwd: - Ref: AdmWebPasswd - nova_host_ip: - Ref: NovaHostIp - nova_os_password: - Ref: NovaOsPassword - nova_os_username: - Ref: NovaOsUsername - nova_os_tenant_name: - Ref: NovaOsTenantName - initial_network_split_key: - Ref: InitialIpSplitKey - postfix: - mailhostname: - Ref: PostfixMailHostname - maildomain: - Ref: PostfixMailDomain - delay_warning_time: - Ref: PostfixDelayWarningTime - Type: AWS::EC2::Instance - Properties: - KeyName: - Ref: KeyName - ImageId: - Ref: Nagios3ImageId - InstanceType: {Ref: InstanceType} -Outputs: - Nagios3Host: {'Fn::Select': [ 0, {'Fn::Select': [ 'ctlplane', 'Fn::GetAtt': [ 'nagios3' , 'networks' ] ]} ]} +# Copyright 2014 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +heat_template_version: 2013-05-23 +description: Deploy Nagios +parameters: + adm_web_passwd: + type: string + description: Password for initial admin user + hidden: true + nova_os_auth_url: + type: string + default: '' + description: URL for Keystone to access Nova. + nova_os_password: + type: string + hidden: true + description: password to present to nova_host_ip. + default: '' + nova_os_username: + type: string + description: username to present to nova_host_ip. + default: '' + nova_os_tenant_name: + type: string + description: tenant name to present to nova_host_ip. + default: '' + monitor_networks: + type: json + description: Neutron networks to monitor. + default: [] + image: + type: string + description: Image for Nagios. + default: nagios + server_network: + type: string + description: Network id for server. + default: default-net + external_network: + type: string + description: Network to attach floating ips to. + default: ext-net + flavor: + type: string + description: What flavor to use for the nagios server. + default: m1.small + key_name: + type: string + description: What Nova SSH key to use for the nagios server. + default: default +resources: + nagios_config: + type: OS::Heat::StructuredConfig + properties: + config: + nagios3: + adm_web_passwd: { get_input: adm_web_passwd } + os_auth_url: { get_input: nova_os_auth_url } + os_password: { get_input: nova_os_password } + os_username: { get_input: nova_os_username } + os_tenant_name: { get_input: nova_os_tenant_name } + monitor_networks: { get_input: monitor_networks } + completion-signal: { get_input: deploy_signal_id } + nagios_security_group: + type: OS::Neutron::SecurityGroup + properties: + name: monitoring + rules: + - direction: ingress + port_range_max: 22 + port_range_min: 22 + protocol: tcp + - direction: ingress + port_range_max: 80 + port_range_min: 80 + protocol: tcp + - direction: ingress + protocol: icmp + - direction: egress + protocol: tcp + - direction: egress + protocol: udp + - direction: egress + protocol: icmp + nagios_net_port: + type: OS::Neutron::Port + properties: + network_id: { get_param: server_network } + security_groups: [ { get_resource: nagios_security_group } ] + nagios_server: + type: OS::Nova::Server + properties: + flavor: { get_param: flavor } + image: { get_param: image } + key_name: { get_param: key_name } + user_data_format: SOFTWARE_CONFIG + networks: + - network: { get_param: server_network } + port: { get_resource: nagios_net_port } + nagios_floating_ip: + type: OS::Neutron::FloatingIP + properties: + floating_network_id: { get_param: external_network } + port_id: { get_resource: nagios_net_port } + nagios_deploy: + type: OS::Heat::StructuredDeployment + properties: + server: { get_resource: nagios_server } + config: { get_resource: nagios_config } + input_values: + adm_web_passwd: { get_param: adm_web_passwd } + nova_os_auth_url: { get_param: nova_os_auth_url } + nova_os_password: { get_param: nova_os_password } + nova_os_username: { get_param: nova_os_username } + nova_os_tenant_name: { get_param: nova_os_tenant_name } + monitor_networks: { get_param: monitor_networks } +outputs: + nagios_address: + description: Address of Nagios admin interface. + value: { get_attr: [ nagios_floating_ip, floating_ip_address ] } diff --git a/nova-compute-instance.yaml b/nova-compute-instance.yaml index 8cbf7759..a93eda03 100644 --- a/nova-compute-instance.yaml +++ b/nova-compute-instance.yaml @@ -174,6 +174,7 @@ Resources: key_name: {Ref: KeyName} user_data_format: SOFTWARE_CONFIG NovaCompute0Deploy: + DependsOn: [controller0Deployment] Type: OS::Heat::StructuredDeployment Properties: config: {Ref: NovaComputeConfig} diff --git a/overcloud-source.yaml b/overcloud-source.yaml index fc8c8bc4..5e28ac0f 100644 --- a/overcloud-source.yaml +++ b/overcloud-source.yaml @@ -283,14 +283,14 @@ Resources: Path: nova-compute-instance.yaml SubKey: Resources.NovaCompute0Deploy Parameters: - NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } - KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } - RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } - NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } - GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } - NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/nova']]} - CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/ceilometer']]} - NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ]}, '/neutron']]} + NovaApiHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} + KeystoneHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} + RabbitHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} + NeutronHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} + GlanceHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} + NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/nova']]} + CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/ceilometer']]} + NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/neutron']]} NeutronNetworkType: "gre" NeutronEnableTunnelling: "True" NeutronFlatNetworks: @@ -383,6 +383,20 @@ Resources: bootstack: public_interface_ip: Ref: NeutronPublicInterfaceIP + bootstrap_host: + bootstrap_nodeid: + Fn::Select: + - 0 + - Fn::Select: + - 0 + - Merge::Map: + controller0: + - Fn::Select: + - name + - Fn::GetAtt: + - controller0 + - show + nodeid: {get_input: bootstack_nodeid} cinder: db: mysql://cinder:unset@localhost/cinder volume_size_mb: @@ -520,6 +534,12 @@ Resources: config: {Ref: controllerConfig} server: {Ref: controller0} input_values: + bootstack_nodeid: + Fn::Select: + - name + - Fn::GetAtt: + - controller0 + - show controller_host: Fn::Select: - 0 @@ -532,19 +552,19 @@ Resources: Fn::Join: - '' - - 'http://' - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]} + - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} - ':8003' heat.metadata_server_url: Fn::Join: - '' - - 'http://' - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]} + - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} - ':8000' heat.waitcondition_server_url: Fn::Join: - '' - - 'http://' - - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ controller0, networks ]}]]} + - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]} - ':8000/v1/waitcondition' hosts: Fn::Join: @@ -611,6 +631,7 @@ Resources: input_values: ssl_certificate: {Ref: SSLCertificate} ssl_key: {Ref: SSLKey} + ssl_ca_certificate: {Ref: SSLCACertificate} controller0Passthrough: Type: OS::Heat::StructuredDeployment Properties: @@ -627,10 +648,10 @@ Outputs: - '' - - http:// - Fn::Select: - - 0 + - ip_address - Fn::Select: - - ctlplane + - 0 - Fn::GetAtt: - - controller0 - - networks + - ControlVirtualIP + - fixed_ips - :5000/v2.0/ diff --git a/ssl-source.yaml b/ssl-source.yaml index c3edbe75..38d6d7ec 100644 --- a/ssl-source.yaml +++ b/ssl-source.yaml @@ -10,6 +10,10 @@ Parameters: Description: If set, the contents of an SSL certificate .key file for encrypting SSL endpoints. Type: String NoEcho: true + SSLCACertificate: + Default: '' + Description: If set, the contents of an SSL certificate authority file. + Type: String Resources: SSLConfig: Type: OS::Heat::StructuredConfig @@ -21,6 +25,8 @@ Resources: get_input: ssl_certificate key: get_input: ssl_key + cacert: + get_input: ssl_ca_certificate ports: - name: 'ec2' accept: 13773 @@ -43,3 +49,6 @@ Resources: - name: 'cinder' accept: 13776 connect: 8776 + - name: 'ceilometer' + accept: 13777 + connect: 8777 diff --git a/swift-deploy.yaml b/swift-deploy.yaml index 1e96928f..3fe8eced 100644 --- a/swift-deploy.yaml +++ b/swift-deploy.yaml @@ -43,3 +43,25 @@ Resources: - SwiftStorage0 - networks - ':%PORT%/d1' + swift_proxy_memcache: + Fn::Join: + - ', ' + - - Fn::Join: + - '' + - - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } + - ':11211' + - Fn::Join: + - ', ' + - Merge::Map: + SwiftStorage0: + Fn::Join: + - '' + - - Fn::Select: + - 0 + - Fn::Select: + - 'ctlplane' + - Fn::GetAtt: + - SwiftStorage0 + - networks + - ':11211' + diff --git a/swift-source.yaml b/swift-source.yaml index aee81c26..3ca2b1a8 100644 --- a/swift-source.yaml +++ b/swift-source.yaml @@ -8,6 +8,7 @@ Resources: devices: { get_input: swift_devices } hash: { get_input: swift_hash_suffix } part-power: 10 + proxy-memcache: { get_input: swift_proxy_memcache } replicas: 1 service-password: { get_input: swift_password } neutron: diff --git a/swift-storage-source.yaml b/swift-storage-source.yaml index 69236b28..d9df5728 100644 --- a/swift-storage-source.yaml +++ b/swift-storage-source.yaml @@ -18,17 +18,34 @@ Resources: SwiftStorage0: Type: OS::Nova::Server Properties: - image: - {Ref: SwiftStorageImage} + image: {Ref: SwiftStorageImage} flavor: {Ref: OvercloudSwiftStorageFlavor} key_name: {Ref: KeyName} + user_data_format: SOFTWARE_CONFIG + SwiftKeystoneConfig: + Type: OS::Heat::StructuredConfig + Properties: + config: + keystone: + host: {get_input: keystone_host} + SwiftStorage0Keystone: + Type: OS::Heat::StructuredDeployment + Properties: + server: {Ref: SwiftStorage0} + config: {Ref: SwiftKeystoneConfig} + signal_transport: NO_SIGNAL + input_values: + keystone_host: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } SwiftStorage0Deploy: Type: OS::Heat::StructuredDeployment Properties: server: {Ref: SwiftStorage0} config: {Ref: SwiftConfig} + signal_transport: NO_SIGNAL input_values: neutron_local_ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [SwiftStorage0, networks]} ]} ] } + swift_hash_suffix: {Ref: SwiftHashSuffix} + swift_password: {Ref: SwiftPassword} swift_devices: Fn::Join: - ', ' @@ -39,16 +56,37 @@ Resources: - ':%PORT%/d1' - Fn::Join: - ', ' - Merge::Map: - SwiftStorage0: - Fn::Join: - - '' - - - 'r1z1-' - - Fn::Select: - - 0 + - Merge::Map: + SwiftStorage0: + Fn::Join: + - '' + - - 'r1z1-' - Fn::Select: - - 'ctlplane' - - Fn::GetAtt: - - SwiftStorage0 - - networks - - ':%PORT%/d1' + - 0 + - Fn::Select: + - 'ctlplane' + - Fn::GetAtt: + - SwiftStorage0 + - networks + - ':%PORT%/d1' + swift_proxy_memcache: + Fn::Join: + - ', ' + - - Fn::Join: + - '' + - - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] } + - ':11211' + - Fn::Join: + - ', ' + - Merge::Map: + SwiftStorage0: + Fn::Join: + - '' + - - Fn::Select: + - 0 + - Fn::Select: + - 'ctlplane' + - Fn::GetAtt: + - SwiftStorage0 + - networks + - ':11211' diff --git a/tuskar-source.yaml b/tuskar-source.yaml deleted file mode 100644 index 6f84292d..00000000 --- a/tuskar-source.yaml +++ /dev/null @@ -1,21 +0,0 @@ -Parameters: - # NOTE(rpodolyaka): limitation of tuskar-api, see https://bugs.launchpad.net/tuskar/+bug/1235236 - OvercloudAdminPassword: - Default: unset - Description: The password of admin user of the overcloud (required by some services in the under cloud) - Type: String - OvercloudKeystoneHost: - Description: The Overcloud Host running Keystone - Type: String -Resources: - undercloudTuskarVm: - Type: AWS::AutoScaling::LaunchConfiguration - Metadata: - OpenStack::Role: undercloudConfig - tuskar: - db: mysql://tuskar:unset@localhost/tuskar?charset=utf8 - user: admin - tenant_name: admin - password: {Ref: AdminPassword} - overcloud-admin-password: {Ref: OvercloudAdminPassword} - overcloud-keystone-host: {Ref: OvercloudKeystoneHost} diff --git a/undercloud-bm-nova-config.yaml b/undercloud-bm-nova-config.yaml new file mode 100644 index 00000000..1d40121a --- /dev/null +++ b/undercloud-bm-nova-config.yaml @@ -0,0 +1,21 @@ +Resources: + undercloudNovaConfig: + Type: OS::Heat::StructuredConfig + Properties: + config: + nova: + compute_hostname: undercloud + compute_driver: baremetal.driver.BareMetalDriver + db: mysql://nova:unset@localhost/nova + default_ephemeral_format: ext4 + host: 127.0.0.1 + metadata-proxy: false + tuning: + ram_allocation_ratio: 1.0 + reserved_host_memory_mb: 0 + baremetal: + arch: {get_input: nova_arch} + db: mysql://nova:unset@localhost/nova_bm + power_manager: {get_input: power_manager} + pxe_deploy_timeout: {get_input: pxe_deploy_timeout} + service-password: {get_input: nova_service_password} diff --git a/undercloud-bm-nova-deploy.yaml b/undercloud-bm-nova-deploy.yaml new file mode 100644 index 00000000..41cf10a5 --- /dev/null +++ b/undercloud-bm-nova-deploy.yaml @@ -0,0 +1,25 @@ +Parameters: + NeutronPublicInterface: + Default: eth2 + Description: What interface to bridge onto br-ex for network nodes. + Type: String + PowerManager: + Default: nova.virt.baremetal.ipmi.IPMI + Description: Bare metal power manager driver. + Type: String + PxeDeployTimeout: + Default: 2400 + Description: Timeout for PXE deployment of baremetal nodes + Type: Number +Resources: + 01_undercloudNovaDeployment: + Type: OS::Heat::StructuredDeployment + Properties: + config: {Ref: undercloudNovaConfig} + server: {Ref: undercloud} + signal_transport: NO_SIGNAL + input_values: + nova_arch: {Ref: BaremetalArch} + power_manager: {Ref: PowerManager} + pxe_deploy_timeout: {Ref: PxeDeployTimeout} + nova_service_password: {Ref: NovaPassword} diff --git a/undercloud-bm-source.yaml b/undercloud-bm-source.yaml deleted file mode 100644 index a1c0b98a..00000000 --- a/undercloud-bm-source.yaml +++ /dev/null @@ -1,37 +0,0 @@ -Parameters: - NeutronPublicInterface: - Default: eth2 - Description: What interface to bridge onto br-ex for network nodes. - Type: String - PowerManager: - Default: nova.virt.baremetal.ipmi.IPMI - Description: Bare metal power manager driver. - Type: String - PxeDeployTimeout: - Default: 2400 - Description: Timeout for PXE deployment of baremetal nodes - Type: Number -Resources: - undercloudConfig: - Type: AWS::AutoScaling::LaunchConfiguration - Metadata: - nova: - compute_hostname: undercloud - compute_driver: baremetal.driver.BareMetalDriver - db: mysql://nova:unset@localhost/nova - default_ephemeral_format: ext4 - host: 127.0.0.1 - metadata-proxy: false - tuning: - ram_allocation_ratio: 1.0 - reserved_host_memory_mb: 0 - baremetal: - arch: - Ref: BaremetalArch - db: mysql://nova:unset@localhost/nova_bm - power_manager: - Ref: PowerManager - pxe_deploy_timeout: - Ref: PxeDeployTimeout - service-password: - Ref: NovaPassword diff --git a/undercloud-source.yaml b/undercloud-source.yaml index 3cddb262..7206c67c 100644 --- a/undercloud-source.yaml +++ b/undercloud-source.yaml @@ -38,6 +38,44 @@ Parameters: Description: The user password for SNMPd with readonly rights running on all Overcloud nodes Type: String NoEcho: true + ExtraConfig: + Default: {} + Description: | + Additional configuration to inject into the cluster. The JSON should have + the following structure: + {"FILEKEY": + {"config: + [{"section": "SECTIONNAME", + "values": + [{"option": "OPTIONNAME", + "value": "VALUENAME" + } + ] + } + ] + } + } + For instance: + {"nova": + {"config": + [{"section": "default", + "values": + [{"option": "compute_manager", + "value": "ironic.nova.compute.manager.ClusterComputeManager" + } + ] + }, + {"section": "cells", + "values": + [{"option": "driver", + "value": "nova.cells.rpc_driver.CellsRPCDriver" + } + ] + } + ] + } + } + Type: Json Flavor: Default: baremetal Description: Flavor to request when deploying. @@ -117,164 +155,98 @@ Resources: length: 20 salt: Ref: RabbitCookieSalt - AccessPolicy: - Properties: - AllowedResources: - - undercloudConfig - Type: OS::Heat::AccessPolicy - controller0Key: - Properties: - UserName: - Ref: User - Type: AWS::IAM::AccessKey - controller0CompletionCondition: - Type: AWS::CloudFormation::WaitCondition - DependsOn: undercloud - Properties: - Handle: {Ref: controller0CompletionHandle} - Count: '1' - Timeout: '1800' - controller0CompletionHandle: - Type: AWS::CloudFormation::WaitConditionHandle - User: - Properties: - Policies: - - Ref: AccessPolicy - Type: AWS::IAM::User undercloudConfig: - Type: AWS::AutoScaling::LaunchConfiguration + Type: OS::Heat::StructuredConfig Properties: - ImageId: '0' - InstanceType: foo - Metadata: - OpenStack::Role: undercloudConfig - OpenStack::Heat::Stack: {} - OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ] - admin-password: - Ref: AdminPassword - admin-token: - Ref: AdminToken - controller-address: - Fn::Select: - - 0 - - Fn::Select: - - "ctlplane" - - Fn::GetAtt: - - undercloud - - networks - ceilometer: - db: mysql://ceilometer:unset@localhost/ceilometer - metering_secret: {Ref: CeilometerMeteringSecret} - snmpd_readonly_user_name: - Ref: SnmpdReadonlyUserName - snmpd_readonly_user_password: - Ref: SnmpdReadonlyUserPassword - service-password: - Ref: CeilometerPassword - cinder: - db: mysql://cinder:unset@localhost/cinder - volume_size_mb: - Ref: CinderLVMLoopDeviceSize - completion-handle: - Ref: controller0CompletionHandle - db-password: unset - glance: - backend: file - db: mysql://glance:unset@localhost/glance - host: 127.0.0.1 - service-password: - Ref: GlancePassword - notifier-strategy: - Ref: GlanceNotifierStrategy - log-file: - Ref: GlanceLogFile - heat: - admin_password: - Ref: HeatPassword - admin_tenant_name: service - admin_user: heat - auth_encryption_key: unset___________ - db: mysql://heat:unset@localhost/heat - stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword} - watch_server_url: - Fn::Join: - - '' - - - http:// - - Fn::Select: - - 0 - - Fn::Select: - - "ctlplane" - - Fn::GetAtt: - - undercloud - - networks - - ":8003" - metadata_server_url: - Fn::Join: - - '' - - - http:// - - Fn::Select: - - 0 - - Fn::Select: - - "ctlplane" - - Fn::GetAtt: - - undercloud - - networks - - ":8000" - waitcondition_server_url: - Fn::Join: - - '' - - - http:// - - Fn::Select: - - 0 + config: + completion-signal: {get_input: deploy_signal_id} + admin-password: + Ref: AdminPassword + admin-token: + Ref: AdminToken + bootstrap_host: + bootstrap_nodeid: + Fn::Select: + - 0 + - Fn::Select: + - 0 + - Merge::Map: + undercloud: - Fn::Select: - - "ctlplane" + - name - Fn::GetAtt: - undercloud - - networks - - ":8000/v1/waitcondition" - os-collect-config: - cfn: - access_key_id: - Ref: controller0Key - path: undercloudConfig.Metadata - secret_access_key: + - show + nodeid: {get_input: bootstack_nodeid} + controller-address: + get_input: controller_host + ceilometer: + db: mysql://ceilometer:unset@localhost/ceilometer + metering_secret: {Ref: CeilometerMeteringSecret} + snmpd_readonly_user_name: + Ref: SnmpdReadonlyUserName + snmpd_readonly_user_password: + Ref: SnmpdReadonlyUserPassword + service-password: + Ref: CeilometerPassword + db-password: unset + glance: + backend: file + db: mysql://glance:unset@localhost/glance + host: 127.0.0.1 + service-password: + Ref: GlancePassword + notifier-strategy: + Ref: GlanceNotifierStrategy + log-file: + Ref: GlanceLogFile + heat: + admin_password: + Ref: HeatPassword + admin_tenant_name: service + admin_user: heat + auth_encryption_key: unset___________ + db: mysql://heat:unset@localhost/heat + stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword} + watch_server_url: {get_input: heat.watch_server_url} + metadata_server_url: {get_input: heat.metadata_server_url} + waitcondition_server_url: {get_input: heat.waitcondition_server_url} + keystone: + db: mysql://keystone:unset@localhost/keystone + host: 127.0.0.1 + mysql: + innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize} + neutron: + host: 127.0.0.1 + ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8 + ovs: + public_interface: + Ref: NeutronPublicInterface + physical_bridge: br-ctlplane + physical_network: ctlplane + network_vlan_ranges: ctlplane + bridge_mappings: ctlplane:br-ctlplane + tenant_network_type: vlan + enable_tunneling: 'False' + service-password: + Ref: NeutronPassword + rabbit: + host: 127.0.0.1 + username: + Ref: RabbitUserName + password: + Ref: RabbitPassword + cookie: Fn::GetAtt: - - controller0Key - - SecretAccessKey - stack_name: - Ref: AWS::StackName - keystone: - db: mysql://keystone:unset@localhost/keystone - host: 127.0.0.1 - mysql: - innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize} - neutron: - host: 127.0.0.1 - ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8 - ovs: - public_interface: - Ref: NeutronPublicInterface - physical_bridge: br-ctlplane - physical_network: ctlplane - network_vlan_ranges: ctlplane - bridge_mappings: ctlplane:br-ctlplane - tenant_network_type: vlan - enable_tunneling: 'False' - service-password: - Ref: NeutronPassword - ntp: - servers: + - RabbitCookie + - value + ntp: + servers: - {server: {Ref: NtpServer}, fudge: "stratum 0"} - rabbit: - host: 127.0.0.1 - username: - Ref: RabbitUserName - password: - Ref: RabbitPassword - cookie: - Fn::GetAtt: - - RabbitCookie - - value + undercloudPassthroughConfig: + Type: OS::Heat::StructuredConfig + Properties: + config: {get_input: passthrough_config} undercloud: Type: OS::Nova::Server Properties: @@ -286,15 +258,50 @@ Resources: Ref: KeyName image_update_policy: Ref: ImageUpdatePolicy - Metadata: - os-collect-config: - cfn: - access_key_id: - Ref: controller0Key - path: undercloudConfig.Metadata - secret_access_key: - Fn::GetAtt: - - controller0Key - - SecretAccessKey - stack_name: - Ref: AWS::StackName + user_data_format: SOFTWARE_CONFIG + 99_undercloudDeployment: + Type: OS::Heat::StructuredDeployment + Properties: + config: {Ref: undercloudConfig} + server: {Ref: undercloud} + input_values: + bootstack_nodeid: + Fn::Select: + - name + - Fn::GetAtt: + - undercloud + - show + controller_host: + Fn::Select: + - 0 + - Fn::Select: + - ctlplane + - Fn::GetAtt: + - undercloud + - networks + heat.watch_server_url: + Fn::Join: + - '' + - - 'http://' + - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]} + - ':8003' + heat.metadata_server_url: + Fn::Join: + - '' + - - 'http://' + - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]} + - ':8000' + heat.waitcondition_server_url: + Fn::Join: + - '' + - - 'http://' + - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]} + - ':8000/v1/waitcondition' + 00_undercloudPassthroughDeployment: + Type: OS::Heat::StructuredDeployment + Properties: + config: {Ref: undercloudPassthroughConfig} + server: {Ref: undercloud} + signal_transport: NO_SIGNAL + input_values: + passthrough_config: {Ref: ExtraConfig} diff --git a/undercloud-vm-ironic-config.yaml b/undercloud-vm-ironic-config.yaml new file mode 100644 index 00000000..241efa19 --- /dev/null +++ b/undercloud-vm-ironic-config.yaml @@ -0,0 +1,25 @@ +Resources: + undercloudNovaConfig: + Type: OS::Heat::StructuredConfig + Properties: + config: + nova: + compute_hostname: undercloud + compute_driver: ironic.nova.virt.ironic.driver.IronicDriver + compute_manager: ironic.nova.compute.manager.ClusteredComputeManager + db: mysql://nova:unset@localhost/nova + default_ephemeral_format: ext4 + host: 127.0.0.1 + metadata-proxy: false + tuning: + ram_allocation_ratio: 1.0 + reserved_host_memory_mb: 0 + service-password: {get_input: nova_service_password} + undercloudIronicConfig: + Type: OS::Heat::StructuredConfig + Properties: + config: + ironic: + db: mysql://ironic:unset@localhost/ironic + service-password: {get_input: ironic_service_password} + virtual_power_ssh_key: {get_input: virtual_power_ssh_key} diff --git a/undercloud-vm-ironic-deploy.yaml b/undercloud-vm-ironic-deploy.yaml new file mode 100644 index 00000000..10eb44d2 --- /dev/null +++ b/undercloud-vm-ironic-deploy.yaml @@ -0,0 +1,31 @@ +Parameters: + IronicPassword: + Type: String + Description: Ironic password for keystone access + NoEcho: true + NeutronPublicInterface: + Default: eth0 + Description: What interface to bridge onto br-ex for network nodes. + Type: String + PowerSSHPrivateKey: + Description: Private key for using to ssh to a virtual power host. + Type: String + NoEcho: true +Resources: + 01_undercloudNovaDeployment: + Type: OS::Heat::StructuredDeployment + Properties: + config: {Ref: undercloudNovaConfig} + server: {Ref: undercloud} + signal_transport: NO_SIGNAL + input_values: + nova_service_password: {Ref: NovaPassword} + 02_undercloudIronicDeployment: + Type: OS::Heat::StructuredDeployment + Properties: + config: {Ref: undercloudIronicConfig} + server: {Ref: undercloud} + signal_transport: NO_SIGNAL + input_values: + ironic_service_password: {Ref: IronicPassword} + virtual_power_ssh_key: {Ref: PowerSSHPrivateKey} diff --git a/undercloud-vm-ironic-source.yaml b/undercloud-vm-ironic-source.yaml deleted file mode 100644 index 2e9555ae..00000000 --- a/undercloud-vm-ironic-source.yaml +++ /dev/null @@ -1,36 +0,0 @@ -Parameters: - IronicPassword: - Type: String - Description: Ironic password for keystone access - NoEcho: true - NeutronPublicInterface: - Default: eth0 - Description: What interface to bridge onto br-ex for network nodes. - Type: String - PowerSSHPrivateKey: - Description: Private key for using to ssh to a virtual power host. - Type: String - NoEcho: true -Resources: - undercloudConfig: - Type: AWS::AutoScaling::LaunchConfiguration - Metadata: - ironic: - db: mysql://ironic:unset@localhost/ironic - service-password: - Ref: IronicPassword - virtual_power_ssh_key: - Ref: PowerSSHPrivateKey - nova: - compute_hostname: undercloud - compute_driver: ironic.nova.virt.ironic.driver.IronicDriver - compute_manager: ironic.nova.compute.manager.ClusteredComputeManager - db: mysql://nova:unset@localhost/nova - default_ephemeral_format: ext4 - host: 127.0.0.1 - metadata-proxy: false - tuning: - ram_allocation_ratio: 1.0 - reserved_host_memory_mb: 0 - service-password: - Ref: NovaPassword diff --git a/undercloud-vm-nova-config.yaml b/undercloud-vm-nova-config.yaml new file mode 100644 index 00000000..99da8059 --- /dev/null +++ b/undercloud-vm-nova-config.yaml @@ -0,0 +1,27 @@ +Resources: + undercloudNovaConfig: + Type: OS::Heat::StructuredConfig + Properties: + config: + nova: + compute_hostname: undercloud + compute_driver: baremetal.driver.BareMetalDriver + db: mysql://nova:unset@localhost/nova + default_ephemeral_format: ext4 + host: 127.0.0.1 + metadata-proxy: false + tuning: + ram_allocation_ratio: 1.0 + reserved_host_memory_mb: 0 + baremetal: + arch: {get_input: nova_arch} + db: mysql://nova:unset@localhost/nova_bm + power_manager: {get_input: power_manager} + pxe_deploy_timeout: {get_input: pxe_deploy_timeout} + virtual_power: + user: {get_input: user} + ssh_host: {get_input: ssh_host} + ssh_key: {get_input: ssh_key} + type: virsh + service-password: {get_input: nova_service_password} + diff --git a/undercloud-vm-nova-deploy.yaml b/undercloud-vm-nova-deploy.yaml new file mode 100644 index 00000000..16890360 --- /dev/null +++ b/undercloud-vm-nova-deploy.yaml @@ -0,0 +1,40 @@ +Parameters: + NeutronPublicInterface: + Default: eth0 + Description: What interface to bridge onto br-ex for network nodes. + Type: String + PowerManager: + Default: nova.virt.baremetal.virtual_power_driver.VirtualPowerManager + Description: Bare metal power manager driver. + Type: String + PxeDeployTimeout: + Default: 2400 + Description: Timeout for PXE deployment of baremetal nodes + Type: Number + PowerSSHHost: + Default: 192.168.122.1 + Description: SSH host to ssh to for power management operations. + Type: String + PowerSSHPrivateKey: + Description: Private key for using to ssh to a virtual power host. + Type: String + NoEcho: true + PowerUserName: + Default: stack + Description: What username to ssh to the virtual power host with. + Type: String +Resources: + 01_undercloudNovaDeployment: + Type: OS::Heat::StructuredDeployment + Properties: + config: {Ref: undercloudNovaConfig} + server: {Ref: undercloud} + signal_transport: NO_SIGNAL + input_values: + nova_arch: {Ref: BaremetalArch} + power_manager: {Ref: PowerManager} + pxe_deploy_timeout: {Ref: PxeDeployTimeout} + nova_service_password: {Ref: NovaPassword} + user: {Ref: PowerUserName} + ssh_host: {Ref: PowerSSHHost} + ssh_key: {Ref: PowerSSHPrivateKey} diff --git a/undercloud-vm-source.yaml b/undercloud-vm-source.yaml deleted file mode 100644 index 4e076fd3..00000000 --- a/undercloud-vm-source.yaml +++ /dev/null @@ -1,57 +0,0 @@ -Parameters: - NeutronPublicInterface: - Default: eth0 - Description: What interface to bridge onto br-ex for network nodes. - Type: String - PowerManager: - Default: nova.virt.baremetal.virtual_power_driver.VirtualPowerManager - Description: Bare metal power manager driver. - Type: String - PxeDeployTimeout: - Default: 2400 - Description: Timeout for PXE deployment of baremetal nodes - Type: Number - PowerSSHHost: - Default: 192.168.122.1 - Description: SSH host to ssh to for power management operations. - Type: String - PowerSSHPrivateKey: - Description: Private key for using to ssh to a virtual power host. - Type: String - NoEcho: true - PowerUserName: - Default: stack - Description: What username to ssh to the virtual power host with. - Type: String -Resources: - undercloudConfig: - Type: AWS::AutoScaling::LaunchConfiguration - Metadata: - nova: - compute_hostname: undercloud - compute_driver: baremetal.driver.BareMetalDriver - db: mysql://nova:unset@localhost/nova - default_ephemeral_format: ext4 - host: 127.0.0.1 - metadata-proxy: false - tuning: - ram_allocation_ratio: 1.0 - reserved_host_memory_mb: 0 - baremetal: - arch: - Ref: BaremetalArch - db: mysql://nova:unset@localhost/nova_bm - power_manager: - Ref: PowerManager - pxe_deploy_timeout: - Ref: PxeDeployTimeout - virtual_power: - user: - Ref: PowerUserName - ssh_host: - Ref: PowerSSHHost - ssh_key: - Ref: PowerSSHPrivateKey - type: virsh - service-password: - Ref: NovaPassword |