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:

committed by
Yanis Guenane

parent
430d833469
commit
8bcb5315a2
63
manifests/compute/api.pp
Normal file
63
manifests/compute/api.pp
Normal 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
27
manifests/compute/cert.pp
Normal 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,
|
||||
}
|
||||
|
||||
}
|
27
manifests/compute/conductor.pp
Normal file
27
manifests/compute/conductor.pp
Normal 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,
|
||||
}
|
||||
|
||||
}
|
27
manifests/compute/consoleauth.pp
Normal file
27
manifests/compute/consoleauth.pp
Normal 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,
|
||||
}
|
||||
|
||||
}
|
38
manifests/compute/consoleproxy.pp
Normal file
38
manifests/compute/consoleproxy.pp
Normal 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'
|
||||
}
|
||||
}
|
@@ -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 { 'nova::api':
|
||||
enabled => true,
|
||||
auth_host => $ks_keystone_internal_host,
|
||||
admin_password => $ks_nova_password,
|
||||
api_bind_address => $api_eth,
|
||||
metadata_listen => $api_eth,
|
||||
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::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,
|
||||
}
|
||||
|
||||
}
|
||||
|
27
manifests/compute/scheduler.pp
Normal file
27
manifests/compute/scheduler.pp
Normal 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,
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user