From: Dan Prince Date: Wed, 6 May 2015 20:16:17 +0000 (-0400) Subject: Add isolated network ports to ceph roles X-Git-Tag: opnfv-6.0.0~2557 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=0e2ecdfb27bde043ed1b48a3c5afda64df6d2d8d;p=apex-tripleo-heat-templates.git Add isolated network ports to ceph roles This patch updates the ceph roles so that they can optionally make use of isolated network ports on the storage and storage management networks. -Multiple networks are created based upon settings in the heat resource registry. These nets will either use the noop network (the control plane pass-thru default) or create a custom Neutron port on each of the configured networks. -The ipaddress/subnet of each network is passed passed into the NetworkConfig resource which drives os-net-config. This allows the deployer to define a custom network template for static IPs, etc on each of the networks. -The ipaddress is exposed as an output parameter. By exposing the individual addresses as outputs we allow Heat to construct collections of ports for various services. Change-Id: I35cb8e7812202f8a7bc0379067bf33d483cd2aec --- diff --git a/ceph-storage.yaml b/ceph-storage.yaml index ecb47f26..aa957e69 100644 --- a/ceph-storage.yaml +++ b/ceph-storage.yaml @@ -45,8 +45,21 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + StoragePort: + type: OS::TripleO::CephStorage::Ports::StoragePort + properties: + ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]} + + StorageMgmtPort: + type: OS::TripleO::CephStorage::Ports::StorageMgmtPort + properties: + ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]} + NetworkConfig: type: OS::TripleO::CephStorage::Net::SoftwareConfig + properties: + StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} + StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -118,3 +131,9 @@ outputs: params: IP: {get_attr: [CephStorage, networks, ctlplane, 0]} HOST: {get_attr: [CephStorage, name]} + storage_ip_address: + description: IP address of the server in the storage network + value: {get_attr: [StoragePort, ip_address]} + storage_mgmt_ip_address: + description: IP address of the server in the storage_mgmt network + value: {get_attr: [StorageMgmtPort, ip_address]} diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml index 432ddc45..cf7d17c7 100644 --- a/overcloud-resource-registry-puppet.yaml +++ b/overcloud-resource-registry-puppet.yaml @@ -45,5 +45,9 @@ resource_registry: OS::TripleO::Compute::Ports::StoragePort: network/ports/noop.yaml OS::TripleO::Compute::Ports::TenantPort: network/ports/noop.yaml + # Port assignments for the ceph storage role + OS::TripleO::CephStorage::Ports::StoragePort: network/ports/noop.yaml + OS::TripleO::CephStorage::Ports::StorageMgmtPort: network/ports/noop.yaml + parameter_defaults: EnablePackageInstall: false diff --git a/overcloud-resource-registry.yaml b/overcloud-resource-registry.yaml index 28e80220..a9163783 100644 --- a/overcloud-resource-registry.yaml +++ b/overcloud-resource-registry.yaml @@ -42,3 +42,7 @@ resource_registry: OS::TripleO::Compute::Ports::InternalApiPort: network/ports/noop.yaml OS::TripleO::Compute::Ports::StoragePort: network/ports/noop.yaml OS::TripleO::Compute::Ports::TenantPort: network/ports/noop.yaml + + # Port assignments for the ceph storage role + OS::TripleO::CephStorage::Ports::StoragePort: network/ports/noop.yaml + OS::TripleO::CephStorage::Ports::StorageMgmtPort: network/ports/noop.yaml diff --git a/puppet/ceph-storage-puppet.yaml b/puppet/ceph-storage-puppet.yaml index e3d623fd..49346cd7 100644 --- a/puppet/ceph-storage-puppet.yaml +++ b/puppet/ceph-storage-puppet.yaml @@ -45,8 +45,21 @@ resources: NodeUserData: type: OS::TripleO::NodeUserData + StoragePort: + type: OS::TripleO::CephStorage::Ports::StoragePort + properties: + ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]} + + StorageMgmtPort: + type: OS::TripleO::CephStorage::Ports::StorageMgmtPort + properties: + ControlPlaneIP: {get_attr: [CephStorage, networks, ctlplane, 0]} + NetworkConfig: type: OS::TripleO::CephStorage::Net::SoftwareConfig + properties: + StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]} + StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]} NetworkDeployment: type: OS::TripleO::SoftwareDeployment @@ -102,3 +115,9 @@ outputs: description: Heat resource handle for the ceph storage server value: {get_resource: CephStorage} + storage_ip_address: + description: IP address of the server in the storage network + value: {get_attr: [StoragePort, ip_address]} + storage_mgmt_ip_address: + description: IP address of the server in the storage_mgmt network + value: {get_attr: [StorageMgmtPort, ip_address]}