Splitting: Compute Controller services

Split cloud::compute::controller in
* cloud::compute::api
* cloud::compute::cert
* cloud::compute::conductor
* cloud::compute::consoleauth
* cloud::compute::consoleproxy
* cloud::compute::scheduler

Also maintains backward compatibility and informs the end user about the
new classes.

Bug #346
This commit is contained in:
Emilien Macchi
2014-04-23 11:26:27 +02:00
committed by Yanis Guenane
parent 430d833469
commit 8bcb5315a2
8 changed files with 228 additions and 52 deletions

63
manifests/compute/api.pp Normal file
View File

@@ -0,0 +1,63 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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.
#
# Compute API node
#
class cloud::compute::api(
$ks_keystone_internal_host = '127.0.0.1',
$ks_nova_password = 'novapassword',
$neutron_metadata_proxy_shared_secret = 'metadatapassword',
$api_eth = '127.0.0.1',
$ks_nova_public_port = '8774',
$ks_ec2_public_port = '8773',
$ks_metadata_public_port = '8775'
){
include 'cloud::compute'
class { 'nova::api':
enabled => true,
auth_host => $ks_keystone_internal_host,
admin_password => $ks_nova_password,
api_bind_address => $api_eth,
metadata_listen => $api_eth,
neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret,
}
@@haproxy::balancermember{"${::fqdn}-compute_api_ec2":
listening_service => 'ec2_api_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $ks_ec2_public_port,
options => 'check inter 2000 rise 2 fall 5'
}
@@haproxy::balancermember{"${::fqdn}-compute_api_nova":
listening_service => 'nova_api_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $ks_nova_public_port,
options => 'check inter 2000 rise 2 fall 5'
}
@@haproxy::balancermember{"${::fqdn}-compute_api_metadata":
listening_service => 'metadata_api_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $ks_metadata_public_port,
options => 'check inter 2000 rise 2 fall 5'
}
}

27
manifests/compute/cert.pp Normal file
View File

@@ -0,0 +1,27 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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.
#
# Compute Certificate node
#
class cloud::compute::cert {
include 'cloud::compute'
class { 'nova::cert':
enabled => true,
}
}

View File

@@ -0,0 +1,27 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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.
#
# Compute Conductor node
#
class cloud::compute::conductor {
include 'cloud::compute'
class { 'nova::conductor':
enabled => true,
}
}

View File

@@ -0,0 +1,27 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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.
#
# Compute Authenfication Console node
#
class cloud::compute::consoleauth {
include 'cloud::compute'
class { 'nova::consoleauth':
enabled => true,
}
}

View File

@@ -0,0 +1,38 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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.
#
# Compute Proxy Console node
#
class cloud::compute::consoleproxy(
$api_eth = '127.0.0.1',
$spice_port = '6082'
){
include 'cloud::compute'
class { 'nova::spicehtml5proxy':
enabled => true,
host => $api_eth
}
@@haproxy::balancermember{"${::fqdn}-compute_spice":
listening_service => 'spice_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $spice_port,
options => 'check inter 2000 rise 2 fall 5'
}
}

View File

@@ -27,61 +27,28 @@ class cloud::compute::controller(
$ks_metadata_public_port = 8775
){
warning('This class is deprecated. You should use cloud::compute::api,scheduler,conductor,consoleauth,consoleproxy,cert classes')
include 'cloud::compute'
class { [
'nova::scheduler',
'nova::cert',
'nova::consoleauth',
'nova::conductor'
]:
enabled => true,
class { 'cloud::compute::cert': }
class { 'cloud::compute::conductor': }
class { 'cloud::compute::consoleauth': }
class { 'cloud::compute::scheduler': }
class { 'cloud::compute::api':
ks_keystone_internal_host => $ks_keystone_internal_host,
ks_nova_password => $ks_nova_password,
api_eth => $api_eth,
neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret,
ks_nova_public_port => $ks_nova_public_port,
ks_ec2_public_port => $ks_ec2_public_port,
ks_metadata_public_port => $ks_metadata_public_port,
}
class { 'nova::api':
enabled => true,
auth_host => $ks_keystone_internal_host,
admin_password => $ks_nova_password,
api_bind_address => $api_eth,
metadata_listen => $api_eth,
neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret,
}
class { 'nova::spicehtml5proxy':
enabled => true,
host => $api_eth
}
@@haproxy::balancermember{"${::fqdn}-compute_api_ec2":
listening_service => 'ec2_api_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $ks_ec2_public_port,
options => 'check inter 2000 rise 2 fall 5'
}
@@haproxy::balancermember{"${::fqdn}-compute_api_nova":
listening_service => 'nova_api_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $ks_nova_public_port,
options => 'check inter 2000 rise 2 fall 5'
}
@@haproxy::balancermember{"${::fqdn}-compute_api_metadata":
listening_service => 'metadata_api_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $ks_metadata_public_port,
options => 'check inter 2000 rise 2 fall 5'
}
@@haproxy::balancermember{"${::fqdn}-compute_spice":
listening_service => 'spice_cluster',
server_names => $::hostname,
ipaddresses => $api_eth,
ports => $spice_port,
options => 'check inter 2000 rise 2 fall 5'
class { 'cloud::compute::consoleproxy':
api_eth => $api_eth,
spice_port => $spice_port,
}
}

View File

@@ -0,0 +1,27 @@
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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.
#
# Compute Scheduler node
#
class cloud::compute::scheduler {
include 'cloud::compute'
class { 'nova::scheduler':
enabled => true,
}
}

View File

@@ -159,4 +159,4 @@ class cloud::image::api(
ports => $ks_glance_api_internal_port,
options => 'check inter 2000 rise 2 fall 5'
}
}
}