diff options
59 files changed, 1813 insertions, 144 deletions
diff --git a/all-nodes-validation.yaml b/all-nodes-validation.yaml new file mode 100644 index 00000000..a7383375 --- /dev/null +++ b/all-nodes-validation.yaml @@ -0,0 +1,27 @@ +heat_template_version: 2015-04-30 + +description: > + Software Config to drive validations that occur on all nodes. + Note, you need the heat-config-script element built into your + images, due to the script group below. + +parameters: + PingTestIps: + default: '' + description: A string containing a space separated list of IP addresses used to ping test each available network interface. + type: string + +resources: + AllNodesValidationsImpl: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: ping_test_ips + default: {get_param: PingTestIps} + config: {get_file: ./validation-scripts/all-nodes.sh} + +outputs: + OS::stack_id: + description: The ID of the AllNodesValidationsImpl resource. + value: {get_resource: AllNodesValidationsImpl} diff --git a/ceph-cluster-config.yaml b/ceph-cluster-config.yaml index f44e27c1..c3cf8e8a 100644 --- a/ceph-cluster-config.yaml +++ b/ceph-cluster-config.yaml @@ -2,6 +2,18 @@ heat_template_version: 2015-04-30 description: 'Ceph Cluster config data' parameters: + ceph_storage_count: + default: 0 + type: number + description: Number of Ceph storage nodes. Used to enable/disable managed Ceph installation. + ceph_external_mon_ips: + default: '' + type: string + description: List of external Ceph Mon host IPs. + ceph_client_key: + default: '' + type: string + description: Ceph key used to create the 'openstack' user keyring. ceph_fsid: default: '' type: string diff --git a/ceph-storage.yaml b/ceph-storage.yaml index 5f9f5373..0dbcd3e7 100644 --- a/ceph-storage.yaml +++ b/ceph-storage.yaml @@ -85,6 +85,7 @@ resources: NetworkConfig: type: OS::TripleO::CephStorage::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} diff --git a/cinder-storage.yaml b/cinder-storage.yaml index f65d9289..7a686970 100644 --- a/cinder-storage.yaml +++ b/cinder-storage.yaml @@ -165,6 +165,7 @@ resources: NetworkConfig: type: OS::TripleO::BlockStorage::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [BlockStorage, networks, ctlplane, 0]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} diff --git a/compute.yaml b/compute.yaml index 933639ce..dd968e72 100644 --- a/compute.yaml +++ b/compute.yaml @@ -102,7 +102,10 @@ parameters: default: default constraints: - custom_constraint: nova.keypair - KeystoneHost: + KeystoneAdminApiVirtualIP: + type: string + default: '' + KeystonePublicApiVirtualIP: type: string default: '' NeutronBridgeMappings: @@ -129,7 +132,7 @@ parameters: NeutronNetworkType: type: string description: The tenant network type for Neutron, either gre or vxlan. - default: 'gre' + default: 'vxlan' NeutronNetworkVLANRanges: default: 'datacentre' description: > @@ -155,7 +158,7 @@ parameters: description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' - default: 'gre' + default: 'vxlan' NeutronTunnelIdRanges: description: | Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges @@ -312,6 +315,7 @@ resources: NetworkConfig: type: OS::TripleO::Compute::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]} @@ -409,7 +413,7 @@ resources: glance_host: {get_param: GlanceHost} glance_port: {get_param: GlancePort} glance_protocol: {get_param: GlanceProtocol} - keystone_host: {get_param: KeystoneHost} + keystone_host: {get_param: KeystonePublicApiVirtualIP} neutron_flat_networks: {get_param: NeutronFlatNetworks} neutron_host: {get_param: NeutronHost} neutron_local_ip: {get_attr: [NovaCompute, networks, ctlplane, 0]} diff --git a/controller.yaml b/controller.yaml index 7ee837f5..d6438d13 100644 --- a/controller.yaml +++ b/controller.yaml @@ -255,6 +255,16 @@ parameters: description: Keystone key for signing tokens. type: string hidden: true + KeystoneNotificationDriver: + description: Comma-separated list of Oslo notification drivers used by Keystone + default: ['messaging'] + type: comma_delimited_list + KeystoneNotificationFormat: + description: The Keystone notification format + default: 'basic' + type: string + constraints: + - allowed_values: [ 'basic', 'cadf' ] MysqlClusterUniquePart: description: A unique identifier of the MySQL cluster the controller is in. type: string @@ -333,7 +343,7 @@ parameters: default: 'datacentre' description: If set, flat networks to configure in neutron plugins. NeutronNetworkType: - default: 'gre' + default: 'vxlan' description: The tenant network type for Neutron, either gre or vxlan. type: string NeutronNetworkVLANRanges: @@ -375,7 +385,7 @@ parameters: description: If set, the public interface is a vlan with this device as the raw device. type: string NeutronTunnelTypes: - default: 'gre' + default: 'vxlan' description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' @@ -505,6 +515,9 @@ parameters: MysqlVirtualIP: type: string default: '' + KeystoneAdminApiVirtualIP: + type: string + default: '' KeystonePublicApiVirtualIP: type: string default: '' @@ -572,6 +585,7 @@ resources: NetworkConfig: type: OS::TripleO::Controller::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]} ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} diff --git a/deprecated/nova-compute-instance.yaml b/deprecated/nova-compute-instance.yaml index e68c61f9..811c0fc3 100644 --- a/deprecated/nova-compute-instance.yaml +++ b/deprecated/nova-compute-instance.yaml @@ -100,7 +100,7 @@ parameters: NeutronHost: type: string NeutronNetworkType: - default: 'gre' + default: 'vxlan' description: The tenant network type for Neutron, either gre or vxlan. type: string NeutronNetworkVLANRanges: @@ -114,7 +114,7 @@ parameters: description: A port to add to the NeutronPhysicalBridge. type: string NeutronTunnelTypes: - default: 'gre' + default: 'vxlan' description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' diff --git a/deprecated/overcloud-source.yaml b/deprecated/overcloud-source.yaml index d355c4df..0729b338 100644 --- a/deprecated/overcloud-source.yaml +++ b/deprecated/overcloud-source.yaml @@ -221,7 +221,7 @@ parameters: If set, flat networks to configure in neutron plugins. Defaults to 'datacentre' to permit external network creation. NeutronNetworkType: - default: 'gre' + default: 'vxlan' description: The tenant network type for Neutron, either gre or vxlan. type: string NeutronNetworkVLANRanges: @@ -279,7 +279,7 @@ parameters: description: Shared secret to prevent spoofing type: string NeutronTunnelTypes: - default: 'gre' + default: 'vxlan' description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' diff --git a/environments/neutron-ml2-bigswitch.yaml b/environments/neutron-ml2-bigswitch.yaml new file mode 100644 index 00000000..69c91326 --- /dev/null +++ b/environments/neutron-ml2-bigswitch.yaml @@ -0,0 +1,17 @@ +# A Heat environment file which can be used to enable Big Switch +# extensions, configured via puppet +resource_registry: + OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml + +parameter_defaults: + # Required to fill in: + NeutronBigswitchRestproxyServers: + NeutronBigswitchRestproxyServerAuth: + + # Optional: + # NeutronBigswitchRestproxyAutoSyncOnFailure: + # NeutronBigswitchRestproxyConsistencyInterval: + # NeutronBigswitchRestproxyNeutronId: + # NeutronBigswitchRestproxyServerSsl: + # NeutronBigswitchRestproxySslCertDirectory: + diff --git a/environments/neutron-ml2-cisco-nexus-ucsm.yaml b/environments/neutron-ml2-cisco-nexus-ucsm.yaml new file mode 100644 index 00000000..5a1a32a3 --- /dev/null +++ b/environments/neutron-ml2-cisco-nexus-ucsm.yaml @@ -0,0 +1,25 @@ +# A Heat environment file which can be used to enable a +# a Cisco Neutron plugin. +resource_registry: + OS::TripleO::AllNodesExtraConfig: ../puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml + +parameter_defaults: + NetworkUCSMIp: '127.0.0.1' + NetworkUCSMUsername: 'admin' + NetworkUCSMPassword: 'password' + NetworkUCSMHostList: '12:34:56:78:9a:bc:profile1, 12:34:56:78:9a:de:profile2' + NetworkUCSMSupportedPciDevs: '' + NetworkNexusConfig: {} + NetworkNexusManagedPhysicalNetwork: '' + NetworkNexusVlanNamePrefix: 'q-' + NetworkNexusSviRoundRobin: 'false' + NetworkNexusProviderVlanNamePrefix: 'p-' + NetworkNexusPersistentSwitchConfig: 'false' + NetworkNexusSwitchHeartbeatTime: 0 + NetworkNexusSwitchReplayCount: 3 + NetworkNexusProviderVlanAutoCreate: 'true' + NetworkNexusProviderVlanAutoTrunk: 'true' + NetworkNexusVxlanGlobalConfig: 'true' + NetworkNexusHostKeyChecks: 'false' + NetworkNexusVxlanVniRanges: '0:0' + NetworkNexusVxlanMcastRanges: '0.0.0.0:0.0.0.0' diff --git a/environments/puppet-ceph-external.yaml b/environments/puppet-ceph-external.yaml new file mode 100644 index 00000000..3c7901cc --- /dev/null +++ b/environments/puppet-ceph-external.yaml @@ -0,0 +1,18 @@ +# A Heat environment file which can be used to enable the +# use of an externally managed Ceph cluster. +resource_registry: + OS::TripleO::CephClusterConfig::SoftwareConfig: ../puppet/extraconfig/ceph/ceph-external-config.yaml + +parameters: + # NOTE: These example parameters are required when using Ceph External + #CephClusterFSID: '4b5c8c0a-ff60-454b-a1b4-9747aa737d19' + #CephClientKey: 'AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ==' + #CephExternalMonHost: '172.16.1.7, 172.16.1.8' + + # the following parameters enable Ceph backends for Cinder, Glance, and Nova + NovaEnableRbdBackend: true + CinderEnableRbdBackend: true + GlanceBackend: rbd + + # finally we disable the Cinder LVM backend + CinderEnableIscsiBackend: false diff --git a/extraconfig/all_nodes/default.yaml b/extraconfig/all_nodes/default.yaml new file mode 100644 index 00000000..68f9eadd --- /dev/null +++ b/extraconfig/all_nodes/default.yaml @@ -0,0 +1,27 @@ +heat_template_version: 2014-10-16 + +description: > + Noop extra config for allnodes extra cluster config + +# Parameters passed from the parent template - note if you maintain +# out-of-tree templates they may require additional parameters if the +# in-tree templates add a new role. +parameters: + controller_servers: + type: json + compute_servers: + type: json + blockstorage_servers: + type: json + objectstorage_servers: + type: json + cephstorage_servers: + type: json +# Note extra parameters can be defined, then passed data via the +# environment parameter_defaults, without modifying the parent template + +outputs: + # This value should change if the configuration data has changed + # It is used to e.g re-apply puppet after hieradata values change. + config_identifier: + value: none diff --git a/extraconfig/all_nodes/mac_hostname.yaml b/extraconfig/all_nodes/mac_hostname.yaml new file mode 100644 index 00000000..739cbf0a --- /dev/null +++ b/extraconfig/all_nodes/mac_hostname.yaml @@ -0,0 +1,116 @@ +heat_template_version: 2014-10-16 + +description: > + Example extra config for cluster config + this example collects the hostname and MAC addresses for each node in + the deployment, then distributes that info to all Controller nodes. + +# Parameters passed from the parent template - note if you maintain +# out-of-tree templates they may require additional parameters if the +# in-tree templates add a new role. +parameters: + controller_servers: + type: json + compute_servers: + type: json + blockstorage_servers: + type: json + objectstorage_servers: + type: json + cephstorage_servers: + type: json +# Note extra parameters can be defined, then passed data via the +# environment parameter_defaults, without modifying the parent template + +resources: + + CollectMacConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/sh + MACS=$(ifconfig | grep ether | awk '{print $2}' | tr "\n" " ") + HOSTNAME=$(hostname -s) + echo "$HOSTNAME $MACS" + + # FIXME(shardy): Long term it'd be better if Heat SoftwareDeployments accepted + # list instead of a map, then we could join the lists of servers into one + # deployment instead of requiring one deployment per-role. + CollectMacDeploymentsController: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: controller_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsCompute: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: compute_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsBlockStorage: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: blockstorage_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsObjectStorage: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: objectstorage_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsCephStorage: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: cephstorage_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + # Now we distribute all-the-macs to all nodes + DistributeMacConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: controller_mappings + - name: compute_mappings + - name: blockstorage_mappings + - name: objectstorage_mappings + - name: cephstorage_mappings + config: | + #!/bin/sh + echo $controller_mappings > /root/controller_mappings + echo $compute_mappings > /root/compute_mappings + echo $blockstorage_mappings > /root/blockstorage_mappings + echo $objectstorage_mappings > /root/objectstorage_mappings + echo $cephstorage_mappings > /root/cephstorage_mappings + echo "mappings = $(cat /root/*_mappings)" + + DistributeMacDeploymentsController: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: controller_servers} + config: {get_resource: DistributeMacConfig} + input_values: + # FIXME(shardy): It'd be more convenient if we could join these + # items together but because the returned format is a map (not a list) + # we can't use list_join or str_replace. Possible Heat TODO. + controller_mappings: {get_attr: [CollectMacDeploymentsController, deploy_stdouts]} + compute_mappings: {get_attr: [CollectMacDeploymentsCompute, deploy_stdouts]} + blockstorage_mappings: {get_attr: [CollectMacDeploymentsBlockStorage, deploy_stdouts]} + objectstorage_mappings: {get_attr: [CollectMacDeploymentsObjectStorage, deploy_stdouts]} + cephstorage_mappings: {get_attr: [CollectMacDeploymentsCephStorage, deploy_stdouts]} + actions: ['CREATE'] # Only do this on CREATE + +outputs: + # This value should change if the configuration data has changed + # It is used to e.g re-apply puppet after hieradata values change. + config_identifier: + value: {get_attr: [DistributeMacDeploymentsController, deploy_stdouts]} + diff --git a/extraconfig/all_nodes/random_string.yaml b/extraconfig/all_nodes/random_string.yaml new file mode 100644 index 00000000..b4b30274 --- /dev/null +++ b/extraconfig/all_nodes/random_string.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2014-10-16 + +description: > + Example extra config for cluster config + this example deploys a random string to all controller and compute + nodes, showing how data may be shared amongst nodes, vs the + other ExtraConfig interfaces which act only on individual nodes. + +# Parameters passed from the parent template - note if you maintain +# out-of-tree templates they may require additional parameters if the +# in-tree templates add a new role. +parameters: + controller_servers: + type: json + compute_servers: + type: json + blockstorage_servers: + type: json + objectstorage_servers: + type: json + cephstorage_servers: + type: json +# Note extra parameters can be defined, then passed data via the +# environment parameter_defaults, without modifying the parent template + +resources: + + Random: + type: OS::Heat::RandomString + + RandomConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: random_value + config: | + #!/bin/sh + echo $random_value > /root/random_value + + RandomDeploymentsController: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: controller_servers} + config: {get_resource: RandomConfig} + actions: ['CREATE'] # Only do this on CREATE + input_values: + random_value: {get_attr: [Random, value]} + + RandomDeploymentsCompute: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: compute_servers} + config: {get_resource: RandomConfig} + actions: ['CREATE'] # Only do this on CREATE + input_values: + random_value: {get_attr: [Random, value]} + +outputs: + # This value should change if the configuration data has changed + # It is used to e.g re-apply puppet after hieradata values change. + config_identifier: + value: {get_attr: [Random, value]} diff --git a/firstboot/userdata_heat_admin.yaml b/firstboot/userdata_heat_admin.yaml new file mode 100644 index 00000000..73481c63 --- /dev/null +++ b/firstboot/userdata_heat_admin.yaml @@ -0,0 +1,29 @@ +heat_template_version: 2014-10-16 + +parameters: + # Can be overriden via parameter_defaults in the environment + node_admin_username: + type: string + default: heat-admin + +description: > + Uses cloud-init to create an additional user with a known name, in addition + to the distro-default user created by the cloud-init default. + +resources: + userdata: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: user_config} + + # Note this requires cloud-init >= 0.7.2 ref bug #1100920 + user_config: + type: OS::Heat::CloudConfig + properties: + cloud_config: + user: {get_param: node_admin_username} + +outputs: + OS::stack_id: + value: {get_resource: userdata} diff --git a/net-config-bond.yaml b/net-config-bond.yaml index d74fc0bc..797df4bf 100644 --- a/net-config-bond.yaml +++ b/net-config-bond.yaml @@ -4,6 +4,10 @@ description: > Software Config to drive os-net-config with 2 bonded nics on a bridge. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network diff --git a/net-config-bridge.yaml b/net-config-bridge.yaml index c3416e02..ad16ef0b 100644 --- a/net-config-bridge.yaml +++ b/net-config-bridge.yaml @@ -4,6 +4,10 @@ description: > Software Config to drive os-net-config for a simple bridge. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network diff --git a/net-config-noop.yaml b/net-config-noop.yaml index 3d88dd9c..30de5846 100644 --- a/net-config-noop.yaml +++ b/net-config-noop.yaml @@ -5,6 +5,10 @@ description: > to use the parameter driven (init-neutron-ovs) configuration instead. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network diff --git a/net-config-static-bridge.yaml b/net-config-static-bridge.yaml new file mode 100644 index 00000000..38b483bd --- /dev/null +++ b/net-config-static-bridge.yaml @@ -0,0 +1,79 @@ +heat_template_version: 2015-04-30 + +description: > + Software Config to drive os-net-config for a simple bridge configured + with a static IP address for the ctlplane network. + +parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string + ExternalIpSubnet: + default: '' + description: IP address/subnet on the external network + type: string + InternalApiIpSubnet: + default: '' + description: IP address/subnet on the internal API network + type: string + StorageIpSubnet: + default: '' + description: IP address/subnet on the storage network + type: string + StorageMgmtIpSubnet: + default: '' + description: IP address/subnet on the storage mgmt network + type: string + TenantIpSubnet: + default: '' + description: IP address/subnet on the tenant network + type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string + +resources: + OsNetConfigImpl: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + os_net_config: + network_config: + - + type: ovs_bridge + name: {get_input: bridge_name} + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + members: + - + type: interface + name: {get_input: interface_name} + # force the MAC address of the bridge to this interface + primary: true + +outputs: + OS::stack_id: + description: The OsNetConfigImpl resource. + value: {get_resource: OsNetConfigImpl} diff --git a/network/config/bond-with-vlans/ceph-storage.yaml b/network/config/bond-with-vlans/ceph-storage.yaml index cd70cbef..cffc06f4 100644 --- a/network/config/bond-with-vlans/ceph-storage.yaml +++ b/network/config/bond-with-vlans/ceph-storage.yaml @@ -5,6 +5,10 @@ description: > with VLANs attached for the ceph storage role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -38,7 +42,16 @@ parameters: default: 40 description: Vlan ID for the storage mgmt network traffic. type: number - + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -49,6 +62,24 @@ resources: os_net_config: network_config: - + type: interface + name: nic1 + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + - type: ovs_bridge name: br-bond members: @@ -69,15 +100,15 @@ resources: device: bond1 vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} outputs: OS::stack_id: diff --git a/network/config/bond-with-vlans/cinder-storage.yaml b/network/config/bond-with-vlans/cinder-storage.yaml index 866112cb..894d5982 100644 --- a/network/config/bond-with-vlans/cinder-storage.yaml +++ b/network/config/bond-with-vlans/cinder-storage.yaml @@ -5,6 +5,10 @@ description: > with VLANs attached for the cinder storage role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -42,6 +46,16 @@ parameters: default: 40 description: Vlan ID for the storage mgmt network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -52,6 +66,24 @@ resources: os_net_config: network_config: - + type: interface + name: nic1 + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + - type: ovs_bridge name: br-bond members: @@ -72,22 +104,22 @@ resources: device: bond1 vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} outputs: OS::stack_id: diff --git a/network/config/bond-with-vlans/compute.yaml b/network/config/bond-with-vlans/compute.yaml index 3a46a48d..7c79cd1a 100644 --- a/network/config/bond-with-vlans/compute.yaml +++ b/network/config/bond-with-vlans/compute.yaml @@ -5,6 +5,10 @@ description: > with VLANs attached for the compute role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -42,6 +46,16 @@ parameters: default: 50 description: Vlan ID for the tenant network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -52,6 +66,24 @@ resources: os_net_config: network_config: - + type: interface + name: nic1 + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + - type: ovs_bridge name: {get_input: bridge_name} members: @@ -72,22 +104,22 @@ resources: device: bond1 vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: TenantNetworkVlanID} addresses: - - - ip_netmask: {get_param: TenantIpSubnet} + - + ip_netmask: {get_param: TenantIpSubnet} outputs: OS::stack_id: diff --git a/network/config/bond-with-vlans/controller.yaml b/network/config/bond-with-vlans/controller.yaml index 3c19f515..cd1961ad 100644 --- a/network/config/bond-with-vlans/controller.yaml +++ b/network/config/bond-with-vlans/controller.yaml @@ -5,6 +5,10 @@ description: > with VLANs attached for the controller role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -55,6 +59,13 @@ parameters: default: '10.0.0.1' description: default route for the external network type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -65,6 +76,21 @@ resources: os_net_config: network_config: - + type: interface + name: nic1 + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - type: ovs_bridge name: {get_input: bridge_name} members: @@ -96,29 +122,29 @@ resources: device: bond1 vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: TenantNetworkVlanID} addresses: - - - ip_netmask: {get_param: TenantIpSubnet} + - + ip_netmask: {get_param: TenantIpSubnet} outputs: OS::stack_id: diff --git a/network/config/bond-with-vlans/swift-storage.yaml b/network/config/bond-with-vlans/swift-storage.yaml index f31ed0e7..f182baef 100644 --- a/network/config/bond-with-vlans/swift-storage.yaml +++ b/network/config/bond-with-vlans/swift-storage.yaml @@ -5,6 +5,10 @@ description: > with VLANs attached for the swift storage role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -42,6 +46,16 @@ parameters: default: 40 description: Vlan ID for the storage mgmt network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -52,6 +66,24 @@ resources: os_net_config: network_config: - + type: interface + name: nic1 + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} + - type: ovs_bridge name: br-bond members: @@ -72,22 +104,22 @@ resources: device: bond1 vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan device: bond1 vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} outputs: OS::stack_id: diff --git a/network/config/single-nic-vlans/ceph-storage.yaml b/network/config/single-nic-vlans/ceph-storage.yaml index 4a25f763..ddb41633 100644 --- a/network/config/single-nic-vlans/ceph-storage.yaml +++ b/network/config/single-nic-vlans/ceph-storage.yaml @@ -5,6 +5,10 @@ description: > ceph storage role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -33,6 +37,16 @@ parameters: default: 40 description: Vlan ID for the storage mgmt network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -45,7 +59,21 @@ resources: - type: ovs_bridge name: br-storage - use_dhcp: true + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} members: - type: interface @@ -56,14 +84,14 @@ resources: type: vlan vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} outputs: OS::stack_id: diff --git a/network/config/single-nic-vlans/cinder-storage.yaml b/network/config/single-nic-vlans/cinder-storage.yaml index 397b1ecd..4b2a5753 100644 --- a/network/config/single-nic-vlans/cinder-storage.yaml +++ b/network/config/single-nic-vlans/cinder-storage.yaml @@ -5,6 +5,10 @@ description: > cinder storage role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -37,6 +41,16 @@ parameters: default: 40 description: Vlan ID for the storage mgmt network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -49,7 +63,21 @@ resources: - type: ovs_bridge name: br-storage - use_dhcp: true + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} members: - type: interface @@ -60,20 +88,20 @@ resources: type: vlan vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} outputs: OS::stack_id: diff --git a/network/config/single-nic-vlans/compute.yaml b/network/config/single-nic-vlans/compute.yaml index c73aed5e..dc8d6851 100644 --- a/network/config/single-nic-vlans/compute.yaml +++ b/network/config/single-nic-vlans/compute.yaml @@ -5,6 +5,10 @@ description: > compute role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -37,6 +41,16 @@ parameters: default: 50 description: Vlan ID for the tenant network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -49,7 +63,21 @@ resources: - type: ovs_bridge name: {get_input: bridge_name} - use_dhcp: true + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} members: - type: interface @@ -60,20 +88,20 @@ resources: type: vlan vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan vlan_id: {get_param: TenantNetworkVlanID} addresses: - - - ip_netmask: {get_param: TenantIpSubnet} + - + ip_netmask: {get_param: TenantIpSubnet} outputs: OS::stack_id: diff --git a/network/config/single-nic-vlans/controller.yaml b/network/config/single-nic-vlans/controller.yaml index 4cfa1317..c0f4132b 100644 --- a/network/config/single-nic-vlans/controller.yaml +++ b/network/config/single-nic-vlans/controller.yaml @@ -5,6 +5,10 @@ description: > controller role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -49,6 +53,13 @@ parameters: default: '10.0.0.1' description: default route for the external network type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -61,7 +72,18 @@ resources: - type: ovs_bridge name: {get_input: bridge_name} - use_dhcp: true + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} members: - type: interface @@ -82,26 +104,26 @@ resources: type: vlan vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} - type: vlan vlan_id: {get_param: TenantNetworkVlanID} addresses: - - - ip_netmask: {get_param: TenantIpSubnet} + - + ip_netmask: {get_param: TenantIpSubnet} outputs: OS::stack_id: diff --git a/network/config/single-nic-vlans/swift-storage.yaml b/network/config/single-nic-vlans/swift-storage.yaml index f033ced7..5a308df0 100644 --- a/network/config/single-nic-vlans/swift-storage.yaml +++ b/network/config/single-nic-vlans/swift-storage.yaml @@ -5,6 +5,10 @@ description: > swift storage role. parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string ExternalIpSubnet: default: '' description: IP address/subnet on the external network @@ -37,6 +41,16 @@ parameters: default: 40 description: Vlan ID for the storage mgmt network traffic. type: number + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneDefaultRoute: # Override this via parameter_defaults + description: The default route of the control plane network. + type: string + EC2MetadataIp: # Override this via parameter_defaults + description: The IP address of the EC2 metadata server. + type: string resources: OsNetConfigImpl: @@ -49,7 +63,21 @@ resources: - type: ovs_bridge name: br-storage - use_dhcp: true + use_dhcp: false + addresses: + - + ip_netmask: + list_join: + - '/' + - - {get_param: ControlPlaneIp} + - {get_param: ControlPlaneSubnetCidr} + routes: + - + ip_netmask: 169.254.169.254/32 + next_hop: {get_param: EC2MetadataIp} + - + default: true + next_hop: {get_param: ControlPlaneDefaultRoute} members: - type: interface @@ -60,20 +88,20 @@ resources: type: vlan vlan_id: {get_param: InternalApiNetworkVlanID} addresses: - - - ip_netmask: {get_param: InternalApiIpSubnet} + - + ip_netmask: {get_param: InternalApiIpSubnet} - type: vlan vlan_id: {get_param: StorageNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageIpSubnet} + - + ip_netmask: {get_param: StorageIpSubnet} - type: vlan vlan_id: {get_param: StorageMgmtNetworkVlanID} addresses: - - - ip_netmask: {get_param: StorageMgmtIpSubnet} + - + ip_netmask: {get_param: StorageMgmtIpSubnet} outputs: OS::stack_id: diff --git a/network/external.yaml b/network/external.yaml index bf4bdfe7..e8f92a5e 100644 --- a/network/external.yaml +++ b/network/external.yaml @@ -12,7 +12,7 @@ parameters: ExternalNetValueSpecs: default: {'provider:physical_network': 'external', 'provider:network_type': 'flat'} description: Value specs for the external network. - type: string + type: json ExternalNetAdminStateUp: default: false description: This admin state of of the network. diff --git a/network/internal_api.yaml b/network/internal_api.yaml index c7e822e9..69154bef 100644 --- a/network/internal_api.yaml +++ b/network/internal_api.yaml @@ -12,7 +12,7 @@ parameters: InternalApiNetValueSpecs: default: {'provider:physical_network': 'internal_api', 'provider:network_type': 'flat'} description: Value specs for the internal API network. - type: string + type: json InternalApiNetAdminStateUp: default: false description: This admin state of of the network. diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml index 54614ead..257d3f9b 100644 --- a/network/ports/net_ip_list_map.yaml +++ b/network/ports/net_ip_list_map.yaml @@ -1,6 +1,9 @@ heat_template_version: 2015-04-30 parameters: + ControlPlaneIpList: + default: [] + type: comma_delimited_list ExternalIpList: default: [] type: comma_delimited_list @@ -23,6 +26,7 @@ outputs: A Hash containing a mapping of network names to assigned lists of IP addresses. value: + ctlplane: {get_param: ControlPlaneIpList} external: {get_param: ExternalIpList} internal_api: {get_param: InternalApiIpList} storage: {get_param: StorageIpList} diff --git a/network/ports/net_ip_map.yaml b/network/ports/net_ip_map.yaml index edc4060f..7aaed160 100644 --- a/network/ports/net_ip_map.yaml +++ b/network/ports/net_ip_map.yaml @@ -1,6 +1,9 @@ heat_template_version: 2015-04-30 parameters: + ControlPlaneIp: + default: '' + type: string ExternalIp: default: '' type: string @@ -23,6 +26,7 @@ outputs: A Hash containing a mapping of network names to assigned IPs for a specific machine. value: + ctlplane: {get_param: ControlPlaneIp} external: {get_param: ExternalIp} internal_api: {get_param: InternalApiIp} storage: {get_param: StorageIp} diff --git a/network/ports/net_ip_subnet_map.yaml b/network/ports/net_ip_subnet_map.yaml new file mode 100644 index 00000000..cf59adb3 --- /dev/null +++ b/network/ports/net_ip_subnet_map.yaml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 + +parameters: + ControlPlaneIp: + default: '' + type: string + ExternalIpSubnet: + default: '' + type: string + InternalApiIpSubnet: + default: '' + type: string + StorageIpSubnet: + default: '' + type: string + StorageMgmtIpSubnet: + default: '' + type: string + TenantIpSubnet: + default: '' + type: string + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + +outputs: + net_ip_subnet_map: + description: > + A Hash containing a mapping of network names to assigned + IP/subnet mappings. + value: + ctlplane: + list_join: + - '' + - - {get_param: ControlPlaneIp} + - '/' + - {get_param: ControlPlaneSubnetCidr} + external: {get_param: ExternalIpSubnet} + internal_api: {get_param: InternalApiIpSubnet} + storage: {get_param: StorageIpSubnet} + storage_mgmt: {get_param: StorageMgmtIpSubnet} + tenant: {get_param: TenantIpSubnet} diff --git a/network/storage.yaml b/network/storage.yaml index d403f9e5..60b779e0 100644 --- a/network/storage.yaml +++ b/network/storage.yaml @@ -12,7 +12,7 @@ parameters: StorageNetValueSpecs: default: {'provider:physical_network': 'storage', 'provider:network_type': 'flat'} description: Value specs for the storage network. - type: string + type: json StorageNetAdminStateUp: default: false description: This admin state of of the network. diff --git a/network/storage_mgmt.yaml b/network/storage_mgmt.yaml index d0c919b5..043bc87b 100644 --- a/network/storage_mgmt.yaml +++ b/network/storage_mgmt.yaml @@ -12,7 +12,7 @@ parameters: StorageMgmtNetValueSpecs: default: {'provider:physical_network': 'storage_mgmt', 'provider:network_type': 'flat'} description: Value specs for the storage_mgmt network. - type: string + type: json StorageMgmtNetAdminStateUp: default: false description: This admin state of of the network. diff --git a/network/tenant.yaml b/network/tenant.yaml index 055b87b8..daf5cb75 100644 --- a/network/tenant.yaml +++ b/network/tenant.yaml @@ -12,7 +12,7 @@ parameters: TenantNetValueSpecs: default: {'provider:physical_network': 'tenant', 'provider:network_type': 'flat'} description: Value specs for the tenant network. - type: string + type: json TenantNetAdminStateUp: default: false description: This admin state of of the network. diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 523e4477..cdf626ea 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -23,6 +23,10 @@ resource_registry: OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml + # This creates the "heat-admin" user for all OS images by default + # To disable, replace with firstboot/userdata_default.yaml + OS::TripleO::NodeAdminUserData: firstboot/userdata_heat_admin.yaml + # Hooks for operator extra config # NodeUserData == Cloud-init additional user-data, e.g cloud-config # ControllerExtraConfigPre == Controller configuration pre service deployment @@ -32,6 +36,12 @@ resource_registry: OS::TripleO::ComputeExtraConfigPre: puppet/extraconfig/pre_deploy/default.yaml OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml + # "AllNodes" Extra cluster config, runs on all nodes prior to the post_deploy + # phase, e.g when puppet is applied, but after the pre_deploy phase. Useful when + # configuration with knowledge of all nodes in the cluster is required vs single + # node configuration in the pre_deploy step. + OS::TripleO::AllNodesExtraConfig: extraconfig/all_nodes/default.yaml + # TripleO overcloud networks OS::TripleO::Network: network/networks.yaml OS::TripleO::VipConfig: puppet/vip-config.yaml @@ -44,6 +54,7 @@ resource_registry: OS::TripleO::Network::Tenant: network/noop.yaml OS::TripleO::Network::Ports::NetIpMap: network/ports/net_ip_map.yaml + OS::TripleO::Network::Ports::NetIpSubnetMap: network/ports/net_ip_subnet_map.yaml OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml # Port assignments for the controller role @@ -75,5 +86,8 @@ resource_registry: # Port assignments for service virtual IPs for the controller role OS::TripleO::Controller::Ports::RedisVipPort: network/ports/ctlplane_vip.yaml + # validation resources + OS::TripleO::AllNodes::Validation: all-nodes-validation.yaml + parameter_defaults: EnablePackageInstall: false diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml index 78607b51..dd7e1a1c 100644 --- a/overcloud-resource-registry.yaml +++ b/overcloud-resource-registry.yaml @@ -23,6 +23,12 @@ resource_registry: OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml + # "AllNodes" Extra cluster config, runs on all nodes prior to the post_deploy + # phase, e.g when puppet is applied, but after the pre_deploy phase. Useful when + # configuration with knowledge of all nodes in the cluster is required vs single + # node configuration in the pre_deploy step. + OS::TripleO::AllNodesExtraConfig: extraconfig/all_nodes/default.yaml + # TripleO overcloud networks OS::TripleO::Network: network/networks.yaml OS::TripleO::VipConfig: vip-config.yaml @@ -34,6 +40,7 @@ resource_registry: OS::TripleO::Network::Tenant: network/noop.yaml OS::TripleO::Network::Ports::NetIpMap: network/ports/net_ip_map.yaml + OS::TripleO::Network::Ports::NetIpSubnetMap: network/ports/net_ip_subnet_map.yaml OS::TripleO::Network::Ports::NetIpListMap: network/ports/net_ip_list_map.yaml # Port assignments for the controller role @@ -64,3 +71,6 @@ resource_registry: # Port assignments for service virtual IPs for the controller role OS::TripleO::Controller::Ports::RedisVipPort: network/ports/noop.yaml + + # validation resources + OS::TripleO::AllNodes::Validation: all-nodes-validation.yaml diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml index fd31c54d..e7c4dfc7 100644 --- a/overcloud-without-mergepy.yaml +++ b/overcloud-without-mergepy.yaml @@ -46,6 +46,14 @@ parameters: default: false description: Whether to enable or not the NFS backend for Cinder type: boolean + CephClientKey: + default: '' + description: The Ceph client key. Can be created with ceph-authtool --gen-print-key. Currently only used for external Ceph deployments to create the openstack user keyring. + type: string + CephExternalMonHost: + default: '' + type: string + description: List of externally managed Ceph Mon Host IPs. Only used for external Ceph deployments. CinderEnableIscsiBackend: default: true description: Whether to enable or not the Iscsi backend for Cinder @@ -108,7 +116,7 @@ parameters: If set, flat networks to configure in neutron plugins. Defaults to 'datacentre' to permit external network creation. NeutronNetworkType: - default: 'gre' + default: 'vxlan' description: The tenant network type for Neutron, either gre or vxlan. type: string NeutronPassword: @@ -147,7 +155,7 @@ parameters: description: Shared secret to prevent spoofing type: string NeutronTunnelTypes: - default: 'gre' + default: 'vxlan' description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' @@ -399,6 +407,16 @@ parameters: description: Keystone key for signing tokens. type: string hidden: true + KeystoneNotificationDriver: + description: Comma-separated list of Oslo notification drivers used by Keystone + default: ['messaging'] + type: comma_delimited_list + KeystoneNotificationFormat: + description: The Keystone notification format + default: 'basic' + type: string + constraints: + - allowed_values: [ 'basic', 'cadf' ] MysqlInnodbBufferPoolSize: description: > Specifies the size of the buffer pool in megabytes. Setting to @@ -536,7 +554,7 @@ parameters: CinderIscsiNetwork: storage GlanceApiNetwork: storage GlanceRegistryNetwork: internal_api - KeystoneAdminApiNetwork: internal_api + KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints KeystonePublicApiNetwork: internal_api NeutronApiNetwork: internal_api HeatApiNetwork: internal_api @@ -754,6 +772,8 @@ resources: KeystoneSigningKey: {get_param: KeystoneSigningKey} KeystoneSSLCertificate: {get_param: KeystoneSSLCertificate} KeystoneSSLCertificateKey: {get_param: KeystoneSSLCertificateKey} + KeystoneNotificationDriver: {get_param: KeystoneNotificationDriver} + KeystoneNotificationFormat: {get_param: KeystoneNotificationFormat} MysqlClusterUniquePart: {get_attr: [MysqlClusterUniquePart, value]} MysqlInnodbBufferPoolSize: {get_param: MysqlInnodbBufferPoolSize} MysqlMaxConnections: {get_param: MysqlMaxConnections} @@ -806,6 +826,7 @@ resources: HeatApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]} GlanceApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]} MysqlVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} + KeystoneAdminApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]} KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} NeutronApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]} UpdateIdentifier: {get_param: UpdateIdentifier} @@ -838,7 +859,8 @@ resources: Image: {get_param: NovaImage} ImageUpdatePolicy: {get_param: ImageUpdatePolicy} KeyName: {get_param: KeyName} - KeystoneHost: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} + KeystoneAdminApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]} + KeystonePublicApiVirtualIP: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]} NeutronBridgeMappings: {get_param: NeutronBridgeMappings} NeutronEnableTunnelling: {get_param: NeutronEnableTunnelling} NeutronFlatNetworks: {get_param: NeutronFlatNetworks} @@ -972,6 +994,7 @@ resources: ControllerIpListMap: type: OS::TripleO::Network::Ports::NetIpListMap properties: + ControlPlaneIpList: {get_attr: [Controller, ip_address]} ExternalIpList: {get_attr: [Controller, external_ip_address]} InternalApiIpList: {get_attr: [Controller, internal_api_ip_address]} StorageIpList: {get_attr: [Controller, storage_ip_address]} @@ -1078,6 +1101,7 @@ resources: VipMap: type: OS::TripleO::Network::Ports::NetIpMap properties: + ControlPlaneIp: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} ExternalIp: {get_attr: [PublicVirtualIP, ip_address]} InternalApiIp: {get_attr: [InternalApiVirtualIP, ip_address]} StorageIp: {get_attr: [StorageVirtualIP, ip_address]} @@ -1168,9 +1192,12 @@ resources: CephClusterConfig: type: OS::TripleO::CephClusterConfig::SoftwareConfig properties: + ceph_storage_count: {get_param: CephStorageCount} ceph_fsid: {get_param: CephClusterFSID} ceph_mon_key: {get_param: CephMonKey} ceph_admin_key: {get_param: CephAdminKey} + ceph_client_key: {get_param: CephClientKey} + ceph_external_mon_ips: {get_param: CephExternalMonHost} ceph_mon_names: {get_attr: [Controller, hostname]} ceph_mon_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]} @@ -1226,42 +1253,110 @@ resources: config: {get_attr: [allNodesConfig, config_id]} servers: {get_attr: [CephStorage, attributes, nova_server_resource]} + # All Nodes Validations + AllNodesValidationConfig: + type: OS::TripleO::AllNodes::Validation + properties: + PingTestIps: + list_join: + - ' ' + - - {get_attr: [Controller, resource.0.external_ip_address]} + - {get_attr: [Controller, resource.0.internal_api_ip_address]} + - {get_attr: [Controller, resource.0.storage_ip_address]} + - {get_attr: [Controller, resource.0.storage_mgmt_ip_address]} + - {get_attr: [Controller, resource.0.tenant_ip_address]} + + ControllerAllNodesValidationDeployment: + type: OS::Heat::StructuredDeployments + depends_on: ControllerAllNodesDeployment + properties: + config: {get_resource: AllNodesValidationConfig} + servers: {get_attr: [Controller, attributes, nova_server_resource]} + + ComputeAllNodesValidationDeployment: + type: OS::Heat::StructuredDeployments + depends_on: ComputeAllNodesDeployment + properties: + config: {get_resource: AllNodesValidationConfig} + servers: {get_attr: [Compute, attributes, nova_server_resource]} + + BlockStorageAllNodesValidationDeployment: + type: OS::Heat::StructuredDeployments + depends_on: BlockStorageAllNodesDeployment + properties: + config: {get_resource: AllNodesValidationConfig} + servers: {get_attr: [BlockStorage, attributes, nova_server_resource]} + + ObjectStorageAllNodesValidationDeployment: + type: OS::Heat::StructuredDeployments + depends_on: ObjectStorageAllNodesDeployment + properties: + config: {get_resource: AllNodesValidationConfig} + servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]} + + CephStorageAllNodesValidationDeployment: + type: OS::Heat::StructuredDeployments + depends_on: CephStorageAllNodesDeployment + properties: + config: {get_resource: AllNodesValidationConfig} + servers: {get_attr: [CephStorage, attributes, nova_server_resource]} + + # Optional ExtraConfig for all nodes - all roles are passed in here, but + # the nested template may configure each role differently (or not at all) + AllNodesExtraConfig: + type: OS::TripleO::AllNodesExtraConfig + properties: + controller_servers: {get_attr: [Controller, attributes, nova_server_resource]} + compute_servers: {get_attr: [Compute, attributes, nova_server_resource]} + blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]} + objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]} + cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]} + # Nested stack deployment runs after all other controller deployments ControllerNodesPostDeployment: type: OS::TripleO::ControllerPostDeployment depends_on: [ControllerBootstrapNodeDeployment, ControllerAllNodesDeployment, ControllerSwiftDeployment, ControllerCephDeployment] properties: servers: {get_attr: [Controller, attributes, nova_server_resource]} - NodeConfigIdentifiers: {get_attr: [Controller, attributes, config_identifier]} + NodeConfigIdentifiers: + allnodes_extra: {get_attr: [AllNodesExtraConfig, config_identifier]} + controller_config: {get_attr: [Controller, attributes, config_identifier]} ComputeNodesPostDeployment: type: OS::TripleO::ComputePostDeployment depends_on: [ComputeAllNodesDeployment, ComputeCephDeployment] properties: servers: {get_attr: [Compute, attributes, nova_server_resource]} - NodeConfigIdentifiers: {get_attr: [Compute, attributes, config_identifier]} + NodeConfigIdentifiers: + allnodes_extra: {get_attr: [AllNodesExtraConfig, config_identifier]} + compute_config: {get_attr: [Compute, attributes, config_identifier]} ObjectStorageNodesPostDeployment: type: OS::TripleO::ObjectStoragePostDeployment depends_on: [ObjectStorageSwiftDeployment, ObjectStorageAllNodesDeployment] properties: servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]} - NodeConfigIdentifiers: {get_attr: [ObjectStorage, attributes, config_identifier]} - + NodeConfigIdentifiers: + allnodes_extra: {get_attr: [AllNodesExtraConfig, config_identifier]} + objectstorage_config: {get_attr: [ObjectStorage, attributes, config_identifier]} BlockStorageNodesPostDeployment: type: OS::TripleO::BlockStoragePostDeployment depends_on: [ControllerNodesPostDeployment, BlockStorageAllNodesDeployment] properties: servers: {get_attr: [BlockStorage, attributes, nova_server_resource]} - NodeConfigIdentifiers: {get_attr: [BlockStorage, attributes, config_identifier]} + NodeConfigIdentifiers: + allnodes_extra: {get_attr: [AllNodesExtraConfig, config_identifier]} + blockstorage_config: {get_attr: [BlockStorage, attributes, config_identifier]} CephStorageNodesPostDeployment: type: OS::TripleO::CephStoragePostDeployment depends_on: [ControllerNodesPostDeployment, CephStorageCephDeployment, CephStorageAllNodesDeployment] properties: servers: {get_attr: [CephStorage, attributes, nova_server_resource]} - NodeConfigIdentifiers: {get_attr: [CephStorage, attributes, config_identifier]} + NodeConfigIdentifiers: + allnodes_extra: {get_attr: [AllNodesExtraConfig, config_identifier]} + cephstorage_config: {get_attr: [CephStorage, attributes, config_identifier]} outputs: KeystoneURL: @@ -1272,6 +1367,9 @@ outputs: - - http:// - {get_attr: [PublicVirtualIP, ip_address]} - :5000/v2.0/ + KeystoneAdminVip: + description: Keystone Admin VIP endpoint + value: {get_attr: [VipMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]} PublicVip: description: Controller VIP for public API endpoints value: {get_attr: [PublicVirtualIP, ip_address]} diff --git a/puppet/all-nodes-config.yaml b/puppet/all-nodes-config.yaml index 060f4c81..2bc519bb 100644 --- a/puppet/all-nodes-config.yaml +++ b/puppet/all-nodes-config.yaml @@ -238,6 +238,7 @@ resources: heat::rabbit_hosts: *rabbit_nodes_array neutron::rabbit_hosts: *rabbit_nodes_array nova::rabbit_hosts: *rabbit_nodes_array + keystone::rabbit_hosts: *rabbit_nodes_array outputs: config_id: diff --git a/puppet/ceph-cluster-config.yaml b/puppet/ceph-cluster-config.yaml index 33b18574..99265493 100644 --- a/puppet/ceph-cluster-config.yaml +++ b/puppet/ceph-cluster-config.yaml @@ -2,6 +2,18 @@ heat_template_version: 2015-04-30 description: 'Ceph Cluster config data for Puppet' parameters: + ceph_storage_count: + default: 0 + type: number + description: Number of Ceph storage nodes. Used to enable/disable managed Ceph installation. + ceph_external_mon_ips: + default: '' + type: string + description: List of external Ceph Mon host IPs. + ceph_client_key: + default: '' + type: string + description: Ceph key used to create the 'openstack' user keyring. ceph_fsid: default: '' type: string @@ -26,6 +38,7 @@ resources: datafiles: ceph_cluster: mapped_data: + ceph_storage_count: {get_param: ceph_storage_count} ceph_mon_initial_members: list_join: - ',' diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index fcf4259f..4b4c76fc 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -66,9 +66,26 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG - user_data: {get_resource: NodeUserData} + user_data: {get_resource: UserData} name: {get_param: Hostname} + # Combine the NodeAdminUserData and NodeUserData mime archives + UserData: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: NodeAdminUserData} + type: multipart + - config: {get_resource: NodeUserData} + type: multipart + + # Creates the "heat-admin" user if configured via the environment + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + NodeAdminUserData: + type: OS::TripleO::NodeAdminUserData + + # For optional operator additional userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id NodeUserData: type: OS::TripleO::NodeUserData @@ -85,20 +102,23 @@ resources: NetworkConfig: type: OS::TripleO::CephStorage::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} NetIpMap: type: OS::TripleO::Network::Ports::NetIpMap properties: + ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]} StorageIp: {get_attr: [StoragePort, ip_address]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} NetIpSubnetMap: - type: OS::TripleO::Network::Ports::NetIpMap + type: OS::TripleO::Network::Ports::NetIpSubnetMap properties: - StorageIp: {get_attr: [StoragePort, ip_subnet]} - StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_subnet]} + ControlPlaneIp: {get_attr: [CephStorage, networks, ctlplane, 0]} + StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} + StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -119,8 +139,8 @@ resources: params: server: {get_param: NtpServer} enable_package_install: {get_param: EnablePackageInstall} - ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]} - ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]} + ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]} + ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]} CephStorageConfig: type: OS::Heat::StructuredConfig diff --git a/puppet/cinder-storage-puppet.yaml b/puppet/cinder-storage-puppet.yaml index 091d1f1b..f597512a 100644 --- a/puppet/cinder-storage-puppet.yaml +++ b/puppet/cinder-storage-puppet.yaml @@ -120,9 +120,26 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG - user_data: {get_resource: NodeUserData} + user_data: {get_resource: UserData} name: {get_param: Hostname} + # Combine the NodeAdminUserData and NodeUserData mime archives + UserData: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: NodeAdminUserData} + type: multipart + - config: {get_resource: NodeUserData} + type: multipart + + # Creates the "heat-admin" user if configured via the environment + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + NodeAdminUserData: + type: OS::TripleO::NodeAdminUserData + + # For optional operator additional userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id NodeUserData: type: OS::TripleO::NodeUserData @@ -144,6 +161,7 @@ resources: NetworkConfig: type: OS::TripleO::BlockStorage::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [BlockStorage, networks, ctlplane, 0]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} @@ -151,6 +169,7 @@ resources: NetIpMap: type: OS::TripleO::Network::Ports::NetIpMap properties: + ControlPlaneIp: {get_attr: [BlockStorage, networks, ctlplane, 0]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} StorageIp: {get_attr: [StoragePort, ip_address]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} diff --git a/puppet/compute-puppet.yaml b/puppet/compute-puppet.yaml index 7966fd48..3f730994 100644 --- a/puppet/compute-puppet.yaml +++ b/puppet/compute-puppet.yaml @@ -70,9 +70,12 @@ parameters: default: default constraints: - custom_constraint: nova.keypair - KeystoneHost: + KeystoneAdminApiVirtualIP: type: string default: '' + KeystonePublicApiVirtualIP: + type: string + default: '' NeutronBridgeMappings: description: > The OVS logical->physical bridge mappings to use. See the Neutron @@ -97,7 +100,7 @@ parameters: NeutronNetworkType: type: string description: The tenant network type for Neutron, either gre or vxlan. - default: 'gre' + default: 'vxlan' NeutronNetworkVLANRanges: default: 'datacentre' description: > @@ -123,7 +126,7 @@ parameters: description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' - default: 'gre' + default: 'vxlan' NeutronTunnelIdRanges: description: | Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges @@ -260,9 +263,26 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG - user_data: {get_resource: NodeUserData} + user_data: {get_resource: UserData} name: {get_param: Hostname} + # Combine the NodeAdminUserData and NodeUserData mime archives + UserData: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: NodeAdminUserData} + type: multipart + - config: {get_resource: NodeUserData} + type: multipart + + # Creates the "heat-admin" user if configured via the environment + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + NodeAdminUserData: + type: OS::TripleO::NodeAdminUserData + + # For optional operator additional userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id NodeUserData: type: OS::TripleO::NodeUserData @@ -284,6 +304,7 @@ resources: NetIpMap: type: OS::TripleO::Network::Ports::NetIpMap properties: + ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} StorageIp: {get_attr: [StoragePort, ip_address]} TenantIp: {get_attr: [TenantPort, ip_address]} @@ -291,6 +312,7 @@ resources: NetworkConfig: type: OS::TripleO::Compute::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]} @@ -410,7 +432,7 @@ resources: list_join: - '' - - 'http://' - - {get_param: KeystoneHost} + - {get_param: KeystonePublicApiVirtualIP} - ':5000/v2.0' snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName} snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword} @@ -471,7 +493,7 @@ resources: list_join: - '' - - 'http://' - - {get_param: NeutronHost} + - {get_param: KeystoneAdminApiVirtualIP} - ':35357/v2.0' admin_password: {get_param: AdminPassword} rabbit_username: {get_param: RabbitUserName} diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml index 291dc6e3..084fe3d1 100644 --- a/puppet/controller-puppet.yaml +++ b/puppet/controller-puppet.yaml @@ -227,6 +227,16 @@ parameters: description: Keystone key for signing tokens. type: string hidden: true + KeystoneNotificationDriver: + description: Comma-separated list of Oslo notification drivers used by Keystone + default: ['messaging'] + type: comma_delimited_list + KeystoneNotificationFormat: + description: The Keystone notification format + default: 'basic' + type: string + constraints: + - allowed_values: [ 'basic', 'cadf' ] MysqlClusterUniquePart: description: A unique identifier of the MySQL cluster the controller is in. type: string @@ -309,7 +319,7 @@ parameters: description: Whether to enable l3-agent HA type: string NeutronNetworkType: - default: 'gre' + default: 'vxlan' description: The tenant network type for Neutron, either gre or vxlan. type: string NeutronNetworkVLANRanges: @@ -351,7 +361,7 @@ parameters: description: If set, the public interface is a vlan with this device as the raw device. type: string NeutronTunnelTypes: - default: 'gre' + default: 'vxlan' description: | The tunnel types for the Neutron tenant network. To specify multiple values, use a comma separated string, like so: 'gre,vxlan' @@ -481,6 +491,9 @@ parameters: MysqlVirtualIP: type: string default: '' + KeystoneAdminApiVirtualIP: + type: string + default: '' KeystonePublicApiVirtualIP: type: string default: '' @@ -518,9 +531,26 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG - user_data: {get_resource: NodeUserData} + user_data: {get_resource: UserData} name: {get_param: Hostname} + # Combine the NodeAdminUserData and NodeUserData mime archives + UserData: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: NodeAdminUserData} + type: multipart + - config: {get_resource: NodeUserData} + type: multipart + + # Creates the "heat-admin" user if configured via the environment + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + NodeAdminUserData: + type: OS::TripleO::NodeAdminUserData + + # For optional operator additional userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id NodeUserData: type: OS::TripleO::NodeUserData @@ -552,6 +582,7 @@ resources: NetIpMap: type: OS::TripleO::Network::Ports::NetIpMap properties: + ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]} ExternalIp: {get_attr: [ExternalPort, ip_address]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} StorageIp: {get_attr: [StoragePort, ip_address]} @@ -559,17 +590,19 @@ resources: TenantIp: {get_attr: [TenantPort, ip_address]} NetIpSubnetMap: - type: OS::TripleO::Network::Ports::NetIpMap + type: OS::TripleO::Network::Ports::NetIpSubnetMap properties: - ExternalIp: {get_attr: [ExternalPort, ip_subnet]} - InternalApiIp: {get_attr: [InternalApiPort, ip_subnet]} - StorageIp: {get_attr: [StoragePort, ip_subnet]} - StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_subnet]} - TenantIp: {get_attr: [TenantPort, ip_subnet]} + ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]} + ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]} + InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} + StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} + StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} + TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]} NetworkConfig: type: OS::TripleO::Controller::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]} ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} @@ -671,6 +704,8 @@ resources: keystone_signing_certificate: {get_param: KeystoneSigningCertificate} keystone_ssl_certificate: {get_param: KeystoneSSLCertificate} keystone_ssl_certificate_key: {get_param: KeystoneSSLCertificateKey} + keystone_notification_driver: {get_param: KeystoneNotificationDriver} + keystone_notification_format: {get_param: KeystoneNotificationFormat} keystone_dsn: list_join: - '' @@ -683,7 +718,7 @@ resources: list_join: - '' - - 'http://' - - {get_param: KeystonePublicApiVirtualIP} + - {get_param: KeystoneAdminApiVirtualIP} - ':35357/' keystone_auth_uri: list_join: @@ -769,7 +804,7 @@ resources: list_join: - '' - - 'http://' - - {get_param: KeystonePublicApiVirtualIP} + - {get_param: KeystoneAdminApiVirtualIP} - ':35357/v2.0' ceilometer_backend: {get_param: CeilometerBackend} ceilometer_metering_secret: {get_param: CeilometerMeteringSecret} @@ -849,8 +884,8 @@ resources: memcached_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]} mysql_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]} mysql_virtual_ip: {get_param: MysqlVirtualIP} - ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]} - ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]} + ceph_cluster_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephClusterNetwork]}]} + ceph_public_network: {get_attr: [NetIpSubnetMap, net_ip_subnet_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]} ceph_public_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]} # Map heat metadata into hiera datafiles @@ -876,6 +911,8 @@ resources: - '"%{::osfamily}"' - common - cinder_netapp_data # Optionally provided by ControllerExtraConfigPre + - neutron_bigswitch_data # Optionally provided by ControllerExtraConfigPre + - neutron_cisco_data # Optionally provided by ControllerExtraConfigPre datafiles: controller_extraconfig: mapped_data: {get_param: ControllerExtraConfig} @@ -999,6 +1036,12 @@ resources: keystone::admin_bind_host: {get_input: keystone_admin_api_network} keystone::debug: {get_input: debug} keystone::db::mysql::password: {get_input: admin_token} + keystone::rabbit_userid: {get_input: rabbit_username} + keystone::rabbit_password: {get_input: rabbit_password} + keystone::rabbit_use_ssl: {get_input: rabbit_client_use_ssl} + keystone::rabbit_port: {get_input: rabbit_client_port} + keystone::notification_driver: {get_input: keystone_notification_driver} + keystone::notification_format: {get_input: keystone_notification_format} # MongoDB mongodb::server::bind_ip: {get_input: mongo_db_network} mongodb::server::nojournal: {get_input: mongodb_no_journal} diff --git a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml new file mode 100644 index 00000000..277b0747 --- /dev/null +++ b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml @@ -0,0 +1,325 @@ +heat_template_version: 2015-04-30 + +description: Configure hieradata for Network Cisco configuration + +parameters: + # Parameters passed from the parent template + controller_servers: + type: json + compute_servers: + type: json + blockstorage_servers: + type: json + objectstorage_servers: + type: json + cephstorage_servers: + type: json + + # extra parameters passed via parameter_defaults + NetworkUCSMIp: + type: string + description: Cisco UCSM IP + default: 127.0.0.1 + NetworkUCSMUsername: + type: string + description: Cisco UCSM username + default: admin + NetworkUCSMPassword: + type: string + description: Cisco UCSM password + default: password + NetworkUCSMHostList: + type: string + description: > + Mac address to service profile mapping for UCSM-controlled hosts + The format is + '<host1-mac>:<profile>, <host2-mac>:<profile>, ...' + default: '' + NetworkUCSMSupportedPciDevs: + type: string + description: Cisco UCSM SR-IOV and VM-FEX vendors supported + default: '' + NetworkNexusConfig: + type: json + description: Nexus switch configuration + default: {} + NetworkNexusManagedPhysicalNetwork: + type: string + description: The name of the physical_network + default: '' + NetworkNexusVlanNamePrefix: + type: string + description: A short prefix to prepend to the VLAN name + default: 'q-' + NetworkNexusSviRoundRobin: + type: boolean + description: A flag to enable round robin scheduling + default: false + NetworkNexusProviderVlanNamePrefix: + type: string + description: A short prefix to prepend to the VLAN name + default: 'p-' + NetworkNexusPersistentSwitchConfig: + type: string + description: To make Nexus device persistent + default: false + NetworkNexusSwitchHeartbeatTime: + type: number + description: Time interval to check the state of the Nexus device + default: 0 + NetworkNexusSwitchReplayCount: + type: number + description: Number of times to attempt config replay + default: 3 + NetworkNexusProviderVlanAutoCreate: + type: boolean + description: A flag whether to manage the creation and removal of VLANs + default: true + NetworkNexusProviderVlanAutoTrunk: + type: boolean + description: A flag whether to manage the trunk ports on the Nexus + default: true + NetworkNexusVxlanGlobalConfig: + type: boolean + description: A flag whether to manage the VXLAN global settings + default: true + NetworkNexusHostKeyChecks: + type: boolean + description: enable strict host key checks when connecting to Nexus switches + default: false + NetworkNexusVxlanVniRanges: + type: string + description: VXLAN Network IDs that are available for tenant network + default: '' + NetworkNexusVxlanMcastRanges: + type: string + description: Multicast groups for the VXLAN interface. + default: '' + + +resources: + # First we lay down the base configuration via the static hieradata mappings + NetworkCiscoConfig: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + hiera: + datafiles: + neutron_cisco_data: + mapped_data: + neutron::plugins::ml2::cisco::ucsm::ucsm_ip: {get_input: UCSM_ip} + neutron::plugins::ml2::cisco::ucsm::ucsm_username: {get_input: UCSM_username} + neutron::plugins::ml2::cisco::ucsm::ucsm_password: {get_input: UCSM_password} + neutron::plugins::ml2::cisco::ucsm::ucsm_host_list: {get_input: UCSM_host_list} + neutron::plugins::ml2::cisco::ucsm::supported_pci_devs: {get_input: UCSMSupportedPciDevs} + neutron::plugins::ml2::cisco::nexus::nexus_config: {get_input: NexusConfig} + neutron::plugins::ml2::cisco::nexus::managed_physical_network: {get_input: NexusManagedPhysicalNetwork} + neutron::plugins::ml2::cisco::nexus::vlan_name_prefix: {get_input: NexusVlanNamePrefix} + neutron::plugins::ml2::cisco::nexus::svi_round_robin: {get_input: NexusSviRoundRobin} + neutron::plugins::ml2::cisco::nexus::provider_vlan_name_prefix: {get_input: NexusProviderVlanNamePrefix} + neutron::plugins::ml2::cisco::nexus::persistent_switch_config: {get_input: NexusPersistentSwitchConfig} + neutron::plugins::ml2::cisco::nexus::switch_heartbeat_time: {get_input: NexusSwitchHeartbeatTime} + neutron::plugins::ml2::cisco::nexus::switch_replay_count: {get_input: NexusSwitchReplayCount} + neutron::plugins::ml2::cisco::nexus::provider_vlan_auto_create: {get_input: NexusProviderVlanAutoCreate} + neutron::plugins::ml2::cisco::nexus::provider_vlan_auto_trunk: {get_input: NexusProviderVlanAutoTrunk} + neutron::plugins::ml2::cisco::nexus::vxlan_global_config: {get_input: NexusVxlanGlobalConfig} + neutron::plugins::ml2::cisco::nexus::host_key_checks: {get_input: NexusHostKeyChecks} + neutron::plugins::ml2::cisco::type_nexus_vxlan::vni_ranges: {get_input: NexusVxlanVniRanges} + neutron::plugins::ml2::cisco::type_nexus_vxlan::mcast_ranges: {get_input: NexusVxlanMcastRanges} + + NetworkCiscoDeployment: + type: OS::Heat::StructuredDeployments + properties: + config: {get_resource: NetworkCiscoConfig} + servers: {get_param: controller_servers} + input_values: + UCSM_ip: {get_param: NetworkUCSMIp} + UCSM_username: {get_param: NetworkUCSMUsername} + UCSM_password: {get_param: NetworkUCSMPassword} + UCSM_host_list: {get_attr: [MappingToUCSMDeploymentsController, deploy_stdout]} + UCSMSupportedPciDevs: {get_param: NetworkUCSMSupportedPciDevs} + NexusConfig: {get_attr: [MappingToNexusDeploymentsController, deploy_stdout]} + NexusManagedPhysicalNetwork: {get_param: NetworkNexusManagedPhysicalNetwork} + NexusVlanNamePrefix: {get_param: NetworkNexusVlanNamePrefix} + NexusSviRoundRobin: {get_param: NetworkNexusSviRoundRobin} + NexusProviderVlanNamePrefix: {get_param: NetworkNexusProviderVlanNamePrefix} + NexusPersistentSwitchConfig: {get_param: NetworkNexusPersistentSwitchConfig} + NexusSwitchHeartbeatTime: {get_param: NetworkNexusSwitchHeartbeatTime} + NexusSwitchReplayCount: {get_param: NetworkNexusSwitchReplayCount} + NexusProviderVlanAutoCreate: {get_param: NetworkNexusProviderVlanAutoCreate} + NexusProviderVlanAutoTrunk: {get_param: NetworkNexusProviderVlanAutoTrunk} + NexusVxlanGlobalConfig: {get_param: NetworkNexusVxlanGlobalConfig} + NexusHostKeyChecks: {get_param: NetworkNexusHostKeyChecks} + NexusVxlanVniRanges: {get_param: NetworkNexusVxlanVniRanges} + NexusVxlanMcastRanges: {get_param: NetworkNexusVxlanMcastRanges} + + # Now we collect the Mac->Hostname mappings for all nodes, which enables + # calculation of the neutron::plugins::ml2::cisco::nexus::nexus_config data + CollectMacConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/sh + MACS=$(ifconfig | grep ether | awk '{print $2}' | tr "\n" " ") + HOSTNAME=$(hostname -f) + echo "$HOSTNAME $MACS" + + CollectMacDeploymentsController: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: controller_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsCompute: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: compute_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsBlockStorage: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: blockstorage_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsObjectStorage: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: objectstorage_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + CollectMacDeploymentsCephStorage: + type: OS::Heat::SoftwareDeployments + properties: + servers: {get_param: cephstorage_servers} + config: {get_resource: CollectMacConfig} + actions: ['CREATE'] # Only do this on CREATE + + # Now we calculate the additional nexus config based on the mappings + MappingToNexusConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: controller_mappings + - name: compute_mappings + - name: blockstorage_mappings + - name: objectstorage_mappings + - name: cephstorage_mappings + - name: nexus_config + config: | + #!/bin/python + import ast + import json + import os + from copy import deepcopy + + mappings = ['controller_mappings', + 'compute_mappings', + 'blockstorage_mappings', + 'objectstorage_mappings', + 'cephstorage_mappings', + 'nexus_config'] + mapdict_list = [] + nexus = {} + for map_name in mappings: + f_name = '/root/' + map_name + map_data = os.getenv(map_name, "Nada") + with open(f_name, 'a') as f: + f.write(map_data) + if map_data is not "Nada": + if map_name is not 'nexus_config': + mapdict_list.append(ast.literal_eval(map_data)) + else: + nexus = ast.literal_eval(map_data) + + mac2host = {} + for mapdict in mapdict_list: + for (listnum, host2mac_list) in mapdict.iteritems(): + vals = host2mac_list.rstrip().split() + for mac in vals[1:]: + mac2host[mac.lower()] = vals[0] + + with open('/root/mac2host', 'a') as f: + f.write(str(mac2host)) + + # now we have mac to host, map host to switchport in hieradata + # nexus = ast.literal_eval(os.getenv('nexus_config', None)) + nexus_cp = deepcopy(nexus) + for nexus_switch in nexus: + for (mac,swport) in nexus[nexus_switch]['servers'].iteritems(): + lmac=mac.lower() + if lmac in mac2host: + if mac2host[lmac] in nexus_cp[nexus_switch]['servers']: + nexus_cp[nexus_switch]['servers'][mac2host[lmac]]['ports'] += ',' + swport['ports'] + else: + nexus_cp[nexus_switch]['servers'][mac2host[lmac]] = swport + del nexus_cp[nexus_switch]['servers'][mac] + # Note this echo means you can view the data via heat deployment-show + print json.dumps(nexus_cp) + + MappingToNexusDeploymentsController: + type: OS::Heat::SoftwareDeployment + properties: + server: {get_param: [controller_servers, '0']} + config: {get_resource: MappingToNexusConfig} + input_values: + # FIXME(shardy): It'd be more convenient if we could join these + # items together but because the returned format is a map (not a list) + # we can't use list_join or str_replace. Possible Heat TODO. + controller_mappings: {get_attr: [CollectMacDeploymentsController, deploy_stdouts]} + compute_mappings: {get_attr: [CollectMacDeploymentsCompute, deploy_stdouts]} + blockstorage_mappings: {get_attr: [CollectMacDeploymentsBlockStorage, deploy_stdouts]} + objectstorage_mappings: {get_attr: [CollectMacDeploymentsObjectStorage, deploy_stdouts]} + cephstorage_mappings: {get_attr: [CollectMacDeploymentsCephStorage, deploy_stdouts]} + nexus_config: {get_param: NetworkNexusConfig} + actions: ['CREATE'] # Only do this on CREATE + + MappingToUCSMConfig: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: ucsm_config + config: | + #!/bin/python + import ast + import os + with open('/root/mac2host', 'r') as f: + s=f.read() + m2h=ast.literal_eval(s) + ucs_config = os.getenv('ucsm_config', "Nada") + ucs_data = [] + lines = ucs_config.split(',') + for line in lines: + entry=line.rsplit(":",1) + mac = entry[0].lower().strip() + if mac in m2h: + ucs_data.append(m2h[mac] + ":" + entry[1]) + + print ", ".join(ucs_data) + + + MappingToUCSMDeploymentsController: + type: OS::Heat::SoftwareDeployment + depends_on: MappingToNexusDeploymentsController + properties: + server: {get_param: [controller_servers, '0']} + config: {get_resource: MappingToUCSMConfig} + input_values: + ucsm_config: {get_param: NetworkUCSMHostList} + actions: ['CREATE'] # Only do this on CREATE + +outputs: + # The Deployment applying the hieradata outputs the derived config-id, which + # changes if the input_values change, so if the stdouts from + # NetworkCiscoDeployment change, we need to reapply puppet (which will + # happen if we return a different config_identifier) + config_identifier: + value: {get_attr: [NetworkCiscoDeployment, deploy_stdouts]} diff --git a/puppet/extraconfig/ceph/ceph-external-config.yaml b/puppet/extraconfig/ceph/ceph-external-config.yaml new file mode 100644 index 00000000..62907104 --- /dev/null +++ b/puppet/extraconfig/ceph/ceph-external-config.yaml @@ -0,0 +1,65 @@ +heat_template_version: 2015-04-30 +description: 'Configure parameters for an external Ceph cluster via Puppet.' + +parameters: + ceph_storage_count: + default: 0 + type: number + description: Number of Ceph storage nodes. Used to enable/disable managed Ceph installation. + ceph_external_mon_ips: + default: '' + type: string + description: List of external Ceph Mon host IPs. + ceph_client_key: + default: '' + type: string + description: Ceph key used to create the 'openstack' user keyring. + ceph_fsid: + default: '' + type: string + # The following parameters are unused for external Ceph clusters and + # are here and exist for compatibility + ceph_admin_key: + default: '' + type: string + ceph_mon_key: + default: '' + type: string + ceph_mon_names: + type: comma_delimited_list + ceph_mon_ips: + type: comma_delimited_list + +resources: + CephClusterConfigImpl: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + hiera: + datafiles: + ceph_cluster: + mapped_data: + ceph_storage_count: {get_param: ceph_storage_count} + enable_external_ceph: true + ceph::profile::params::mon_host: {get_param: ceph_external_mon_ips} + ceph::profile::params::fsid: {get_param: ceph_fsid} + ceph::profile::params::client_keys: + str_replace: + template: "{ + client.openstack: { + secret: 'CLIENT_KEY', + mode: '0644', + cap_mon: 'allow r', + cap_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=volumes, allow rwx pool=vms, allow rwx pool=images' + } + }" + params: + CLIENT_KEY: {get_param: ceph_client_key} + + +outputs: + config_id: + description: The ID of the CephClusterConfigImpl resource. + value: + {get_resource: CephClusterConfigImpl} diff --git a/puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml b/puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml new file mode 100644 index 00000000..bf06d25d --- /dev/null +++ b/puppet/extraconfig/pre_deploy/controller/neutron-ml2-bigswitch.yaml @@ -0,0 +1,73 @@ +heat_template_version: 2015-04-30 + +description: Configure hieradata for Neutron Big Switch configuration + +parameters: + server: + description: ID of the controller node to apply this config to + type: string + NeutronBigswitchRestproxyServers: + description: 'Big Switch controllers ("IP:port,IP:port")' + type: string + NeutronBigswitchRestproxyServerAuth: + description: 'Big Switch controller credentials ("username:password")' + type: string + NeutronBigswitchRestproxyAutoSyncOnFailure: + description: Resynchronize with the new master server on Big Switch failover. + type: boolean + default: true + NeutronBigswitchRestproxyConsistencyInterval: + description: Keepalive message interval (from Neutron to Big Switch controller). + type: number + default: 60 + NeutronBigswitchRestproxyNeutronId: + description: Unique identifier of the Neutron instance for the Big Switch controller. + type: string + default: 'neutron' + NeutronBigswitchRestproxyServerSsl: + description: Whether Neutron should use SSL to talk to the Big Switch controllers. + type: boolean + default: true + NeutronBigswitchRestproxySslCertDirectory: + description: Directory where Big Switch controller certificate will be stored. + type: string + default: '/var/lib/neutron' + + +resources: + NeutronBigswitchConfig: + type: OS::Heat::StructuredConfig + properties: + group: os-apply-config + config: + hiera: + datafiles: + neutron_bigswitch_data: + mapped_data: + neutron_enable_bigswitch_ml2: true + neutron::plugins::ml2::bigswitch::restproxy::servers: {get_input: restproxy_servers} + neutron::plugins::ml2::bigswitch::restproxy::server_auth: {get_input: restproxy_server_auth} + neutron::plugins::ml2::bigswitch::restproxy::auto_sync_on_failure: {get_input: restproxy_auto_sync_on_failure} + neutron::plugins::ml2::bigswitch::restproxy::consistency_interval: {get_input: restproxy_consistency_interval} + neutron::plugins::ml2::bigswitch::restproxy::neutron_id: {get_input: restproxy_neutron_id} + neutron::plugins::ml2::bigswitch::restproxy::server_ssl: {get_input: restproxy_server_ssl} + neutron::plugins::ml2::bigswitch::restproxy::ssl_cert_directory: {get_input: restproxy_ssl_cert_directory} + + NeutronBigswitchDeployment: + type: OS::Heat::StructuredDeployment + properties: + config: {get_resource: NeutronBigswitchConfig} + server: {get_param: server} + input_values: + restproxy_servers: {get_param: NeutronBigswitchRestproxyServers} + restproxy_server_auth: {get_param: NeutronBigswitchRestproxyServerAuth } + restproxy_auto_sync_on_failure: {get_param: NeutronBigswitchRestproxyAutoSyncOnFailure} + restproxy_consistency_interval: {get_param: NeutronBigswitchRestproxyConsistencyInterval} + restproxy_neutron_id: {get_param: NeutronBigswitchRestproxyNeutronId} + restproxy_server_ssl: {get_param: NeutronBigswitchRestproxyServerSsl} + restproxy_ssl_cert_directory: {get_param: NeutronBigswitchRestproxySslCertDirectory} + +outputs: + deploy_stdout: + description: Deployment reference, used to trigger puppet apply on changes + value: {get_attr: [NeutronBigswitchDeployment, deploy_stdout]} diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index ab88a69a..455f7f22 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -33,3 +33,4 @@ neutron::rabbit_heartbeat_timeout_threshold: 60 cinder::rabbit_heartbeat_timeout_threshold: 60 ceilometer::rabbit_heartbeat_timeout_threshold: 60 heat::rabbit_heartbeat_timeout_threshold: 60 +keystone::rabbit_heartbeat_timeout_threshold: 60 diff --git a/puppet/hieradata/compute.yaml b/puppet/hieradata/compute.yaml index bb49bb90..d7c1f879 100644 --- a/puppet/hieradata/compute.yaml +++ b/puppet/hieradata/compute.yaml @@ -18,9 +18,7 @@ nova::compute::rbd::libvirt_rbd_secret_uuid: "%{hiera('ceph::profile::params::fs nova::config::nova_config: cinder/catalog_info: value: 'volumev2:cinderv2:internalURL' - DEFAULT/default_floating_pool: - value: 'public' ceilometer::agent::auth::auth_tenant_name: 'service' -compute_classes: []
\ No newline at end of file +compute_classes: [] diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index 1ae076d2..3c5697e6 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -51,9 +51,9 @@ swift::proxy::pipeline: - 'ratelimit' - 'tempurl' - 'formpost' - - 'staticweb' - 'authtoken' - 'keystone' + - 'staticweb' - 'proxy-logging' - 'proxy-server' @@ -74,11 +74,9 @@ neutron::agents::dhcp::dnsmasq_config_file: /etc/neutron/dnsmasq-neutron.conf # nova nova::notify_on_state_change: 'vm_and_task_state' +nova::api::default_floating_pool: 'public' nova::api::osapi_v3: true - -nova::config::nova_config: - DEFAULT/default_floating_pool: - value: 'public' +nova::scheduler::filter::ram_allocation_ratio: '1.0' # cinder cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler @@ -91,6 +89,8 @@ heat::instance_user: '' # pacemaker pacemaker::corosync::cluster_name: 'tripleo_cluster' pacemaker::corosync::manage_fw: false +pacemaker::resource_defaults::defaults: + resource-stickiness: { value: INFINITY } # horizon horizon::allowed_hosts: '*' @@ -98,6 +98,7 @@ horizon::django_session_engine: 'django.contrib.sessions.backends.cache' # mysql mysql::server::manage_config_file: true +mysql::server::remove_default_accounts: true tripleo::loadbalancer::keystone_admin: true diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index b001d667..fdb16ea2 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -122,8 +122,7 @@ if hiera('step') >= 2 { # pre-install swift here so we can build rings include ::swift - $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false) - $enable_ceph = $cinder_enable_rbd_backend + $enable_ceph = hiera('ceph_storage_count', 0) > 0 if $enable_ceph { class { 'ceph::profile::params': @@ -147,10 +146,13 @@ if hiera('step') >= 2 { } -> Class['ceph::profile::osd'] } - include ::ceph::profile::client include ::ceph::profile::osd } + if str2bool(hiera('enable_external_ceph', 'false')) { + include ::ceph::profile::client + } + } #END STEP 2 if hiera('step') >= 3 { @@ -218,6 +220,7 @@ if hiera('step') >= 3 { include ::nova::network::neutron include ::nova::vncproxy include ::nova::scheduler + include ::nova::scheduler::filter include ::neutron include ::neutron::server @@ -236,12 +239,31 @@ if hiera('step') >= 3 { class { 'neutron::plugins::ml2': flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], + mechanism_drivers => [hiera('neutron_mechanism_drivers')], } class { 'neutron::agents::ml2::ovs': bridge_mappings => split(hiera('neutron_bridge_mappings'), ','), tunnel_types => split(hiera('neutron_tunnel_types'), ','), } + if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') { + include ::neutron::plugins::ml2::cisco::ucsm + } + if 'cisco_nexus' in hiera('neutron_mechanism_drivers') { + include ::neutron::plugins::ml2::cisco::nexus + include ::neutron::plugins::ml2::cisco::type_nexus_vxlan + } + + if hiera('neutron_enable_bigswitch_ml2', false) { + include neutron::plugins::ml2::bigswitch::restproxy + } + neutron_l3_agent_config { + 'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false); + } + neutron_dhcp_agent_config { + 'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false); + } + Service['neutron-server'] -> Service['neutron-dhcp-service'] Service['neutron-server'] -> Service['neutron-l3'] Service['neutron-server'] -> Service['neutron-ovs-agent-service'] @@ -276,20 +298,21 @@ if hiera('step') >= 3 { $ceph_pools = hiera('ceph_pools') ceph::pool { $ceph_pools : } + + $cinder_pool_requires = [Ceph::Pool['volumes']] + + } else { + $cinder_pool_requires = [] } - if $cinder_enable_rbd_backend { + if hiera('cinder_enable_rbd_backend', false) { $cinder_rbd_backend = 'tripleo_ceph' - cinder_config { - "${cinder_rbd_backend}/host": value => 'hostgroup'; - } - cinder::backend::rbd { $cinder_rbd_backend : rbd_pool => 'volumes', rbd_user => 'openstack', rbd_secret_uuid => hiera('ceph::profile::params::fsid'), - require => Ceph::Pool['volumes'], + require => $cinder_pool_requires, } } diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index 86eecc29..63c44f82 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -177,6 +177,8 @@ if hiera('step') >= 2 { if $pacemaker_master { + include pacemaker::resource_defaults + # FIXME: we should not have to access tripleo::loadbalancer class # parameters here to configure pacemaker VIPs. The configuration # of pacemaker VIPs could move into puppet-tripleo or we should @@ -438,8 +440,7 @@ MYSQL_HOST=localhost\n", include ::swift # Ceph - $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false) - $enable_ceph = $cinder_enable_rbd_backend + $enable_ceph = hiera('ceph_storage_count', 0) > 0 if $enable_ceph { class { 'ceph::profile::params': @@ -463,10 +464,13 @@ MYSQL_HOST=localhost\n", } -> Class['ceph::profile::osd'] } - include ::ceph::profile::client include ::ceph::profile::osd } + if str2bool(hiera('enable_external_ceph', 'false')) { + include ::ceph::profile::client + } + } #END STEP 2 @@ -561,6 +565,7 @@ if hiera('step') >= 3 { manage_service => false, enabled => false, } + include ::nova::scheduler::filter class { '::nova::scheduler' : manage_service => false, enabled => false, @@ -596,6 +601,7 @@ if hiera('step') >= 3 { class { 'neutron::plugins::ml2': flat_networks => split(hiera('neutron_flat_networks'), ','), tenant_network_types => [hiera('neutron_tenant_network_type')], + mechanism_drivers => [hiera('neutron_mechanism_drivers')], } class { 'neutron::agents::ml2::ovs': manage_service => false, @@ -604,6 +610,24 @@ if hiera('step') >= 3 { tunnel_types => split(hiera('neutron_tunnel_types'), ','), } + if 'cisco_ucsm' in hiera('neutron_mechanism_drivers') { + include ::neutron::plugins::ml2::cisco::ucsm + } + if 'cisco_nexus' in hiera('neutron_mechanism_drivers') { + include ::neutron::plugins::ml2::cisco::nexus + include ::neutron::plugins::ml2::cisco::type_nexus_vxlan + } + + if hiera('neutron_enable_bigswitch_ml2', false) { + include neutron::plugins::ml2::bigswitch::restproxy + } + neutron_l3_agent_config { + 'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false); + } + neutron_dhcp_agent_config { + 'DEFAULT/ovs_use_veth': value => hiera('neutron_ovs_use_veth', false); + } + include ::cinder class { '::cinder::api': sync_db => $sync_db, @@ -643,20 +667,21 @@ if hiera('step') >= 3 { $ceph_pools = hiera('ceph_pools') ceph::pool { $ceph_pools : } + + $cinder_pool_requires = [Ceph::Pool['volumes']] + + } else { + $cinder_pool_requires = [] } - if $cinder_enable_rbd_backend { + if hiera('cinder_enable_rbd_backend', false) { $cinder_rbd_backend = 'tripleo_ceph' - cinder_config { - "${cinder_rbd_backend}/host": value => 'hostgroup'; - } - cinder::backend::rbd { $cinder_rbd_backend : rbd_pool => 'volumes', rbd_user => 'openstack', rbd_secret_uuid => hiera('ceph::profile::params::fsid'), - require => Ceph::Pool['volumes'], + require => $cinder_pool_requires, } } @@ -868,6 +893,43 @@ if hiera('step') >= 4 { clone_params => "interleave=true", } + pacemaker::constraint::base { 'haproxy-then-keystone-constraint': + constraint_type => 'order', + first_resource => "haproxy-clone", + second_resource => "${::keystone::params::service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service['haproxy'], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } + pacemaker::constraint::base { 'rabbitmq-then-keystone-constraint': + constraint_type => 'order', + first_resource => "rabbitmq-clone", + second_resource => "${::keystone::params::service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Ocf['rabbitmq'], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } + pacemaker::constraint::base { 'memcached-then-keystone-constraint': + constraint_type => 'order', + first_resource => "memcached-clone", + second_resource => "${::keystone::params::service_name}-clone", + first_action => 'start', + second_action => 'start', + require => [Pacemaker::Resource::Service['memcached'], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } + pacemaker::constraint::base { 'galera-then-keystone-constraint': + constraint_type => 'order', + first_resource => "galera-master", + second_resource => "${::keystone::params::service_name}-clone", + first_action => 'promote', + second_action => 'start', + require => [Pacemaker::Resource::Ocf['galera'], + Pacemaker::Resource::Service[$::keystone::params::service_name]], + } + # Cinder pacemaker::resource::service { $::cinder::params::api_service : clone_params => "interleave=true", diff --git a/puppet/swift-storage-puppet.yaml b/puppet/swift-storage-puppet.yaml index b3579429..67617771 100644 --- a/puppet/swift-storage-puppet.yaml +++ b/puppet/swift-storage-puppet.yaml @@ -89,9 +89,26 @@ resources: networks: - network: ctlplane user_data_format: SOFTWARE_CONFIG - user_data: {get_resource: NodeUserData} + user_data: {get_resource: UserData} name: {get_param: Hostname} + # Combine the NodeAdminUserData and NodeUserData mime archives + UserData: + type: OS::Heat::MultipartMime + properties: + parts: + - config: {get_resource: NodeAdminUserData} + type: multipart + - config: {get_resource: NodeUserData} + type: multipart + + # Creates the "heat-admin" user if configured via the environment + # Should return a OS::Heat::MultipartMime reference via OS::stack_id + NodeAdminUserData: + type: OS::TripleO::NodeAdminUserData + + # For optional operator additional userdata + # Should return a OS::Heat::MultipartMime reference via OS::stack_id NodeUserData: type: OS::TripleO::NodeUserData @@ -113,6 +130,7 @@ resources: NetworkConfig: type: OS::TripleO::ObjectStorage::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} @@ -120,6 +138,7 @@ resources: NetIpMap: type: OS::TripleO::Network::Ports::NetIpMap properties: + ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]} InternalApiIp: {get_attr: [InternalApiPort, ip_address]} StorageIp: {get_attr: [StoragePort, ip_address]} StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]} diff --git a/swift-storage.yaml b/swift-storage.yaml index 1a2967fa..d62d7d1a 100644 --- a/swift-storage.yaml +++ b/swift-storage.yaml @@ -149,6 +149,7 @@ resources: NetworkConfig: type: OS::TripleO::ObjectStorage::Net::SoftwareConfig properties: + ControlPlaneIp: {get_attr: [SwiftStorage, networks, ctlplane, 0]} InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]} StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py new file mode 100755 index 00000000..cb5669a7 --- /dev/null +++ b/tools/yaml-validate.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# 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. + +import os +import sys +import traceback +import yaml + +base_path = sys.argv[1] +exit_val = 0 +failed_files = [] + +def validate(filename): + try: + yaml.load(open(filename).read()) + except Exception: + print(traceback.format_exc()) + return 1 + return 0 + +for subdir, dirs, files in os.walk(base_path): + for f in files: + if f.endswith('.yaml'): + file_path = os.path.join(subdir, f) + failed = validate(file_path) + if failed: + failed_files.append(file_path) + exit_val |= failed + +if failed_files: + print('Validation failed on:') + for f in failed_files: + print(f) +else: + print('Validation successful!') +sys.exit(exit_val) @@ -9,3 +9,6 @@ deps = -r{toxinidir}/requirements.txt [testenv:venv] commands = {posargs} + +[testenv:validate] +commands = python ./tools/yaml-validate.py .
\ No newline at end of file diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh new file mode 100644 index 00000000..38a5a55e --- /dev/null +++ b/validation-scripts/all-nodes.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# For each unique remote IP (specified via Heat) we check to +# see if one of the locally configured networks matches and if so we +# attempt a ping test on that networks remote IP. +function ping_controller_ips() { + local REMOTE_IPS=$1 + + for REMOTE_IP in $(echo $REMOTE_IPS | sed -e "s| |\n|g" | sort -u); do + + for LOCAL_NETWORK in $(ip r | grep -v default | cut -d " " -f 1); do + local LOCAL_CIDR=$(echo $LOCAL_NETWORK | cut -d "/" -f 2) + local LOCAL_NETMASK=$(ipcalc -m $LOCAL_NETWORK | grep NETMASK | cut -d "=" -f 2) + local REMOTE_NETWORK=$(ipcalc -np $REMOTE_IP $LOCAL_NETMASK | grep NETWORK | cut -d "=" -f 2) + + if [ $REMOTE_NETWORK/$LOCAL_CIDR == $LOCAL_NETWORK ]; then + echo -n "Trying to ping $REMOTE_IP for local network $LOCAL_NETWORK..." + if ! ping -c 1 $REMOTE_IP &> /dev/null; then + echo "FAILURE" + echo "$REMOTE_IP is not pingable. Local Network: $LOCAL_NETWORK" >&2 + exit 1 + fi + echo "SUCCESS" + fi + done + done +} + +ping_controller_ips "$ping_test_ips" |