diff options
-rw-r--r-- | .fixtures.yml | 4 | ||||
-rw-r--r-- | manifests/cluster/cassandra.pp | 19 | ||||
-rw-r--r-- | manifests/loadbalancer.pp | 7 | ||||
-rw-r--r-- | spec/classes/tripleo_cluster_cassandra_spec.rb | 23 |
4 files changed, 33 insertions, 20 deletions
diff --git a/.fixtures.yml b/.fixtures.yml index e2444d1..69512da 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -12,8 +12,8 @@ fixtures: repo: 'git://github.com/puppetlabs/puppetlabs-inifile.git' ref: '1.4.2' 'cassandra': - repo: 'git://github.com/midonet/puppet-cassandra.git' - ref: 'v1.1.1' + repo: 'git://github.com/locp/cassandra.git' + ref: '1.9.2' 'zookeeper': repo: 'git://github.com/deric/puppet-zookeeper.git' ref: 'v0.3.9' diff --git a/manifests/cluster/cassandra.pp b/manifests/cluster/cassandra.pp index 39e6e5e..b20926b 100644 --- a/manifests/cluster/cassandra.pp +++ b/manifests/cluster/cassandra.pp @@ -60,15 +60,14 @@ class tripleo::cluster::cassandra( # validate_array($cassandra_servers) validate_ipv4_address($cassandra_ip) - class {'::cassandra::run': - seeds => $cassandra_servers, - seed_address => $cassandra_ip, - conf_dir => '/etc/cassandra/default.conf', - pid_dir => '/var/run/cassandra', - service_path => '/sbin', - storage_port => $storage_port, - ssl_storage_port => $ssl_storage_port, - client_port => $client_port, - client_port_thrift => $client_port_thrift + class {'::cassandra': + cluster_name => 'TripleO', + seeds => $cassandra_servers, + listen_address => $cassandra_ip, + storage_port => $storage_port, + ssl_storage_port => $ssl_storage_port, + native_transport_port => $client_port, + rpc_port => $client_port_thrift } + } diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index 6306f61..37c8c66 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -35,6 +35,10 @@ # The value to use as maxconn in the haproxy default config section. # Defaults to 4096 # +# [*haproxy_default_timeout*] +# The value to use as timeout in the haproxy default config section. +# Defaults to [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ] +# # [*haproxy_log_address*] # The IPv4, IPv6 or filesystem socket path of the syslog server. # Defaults to '/dev/log' @@ -263,6 +267,7 @@ class tripleo::loadbalancer ( $haproxy_service_manage = true, $haproxy_global_maxconn = 20480, $haproxy_default_maxconn = 4096, + $haproxy_default_timeout = [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ], $haproxy_log_address = '/dev/log', $controller_host = undef, $controller_hosts = undef, @@ -680,7 +685,7 @@ class tripleo::loadbalancer ( 'mode' => 'tcp', 'log' => 'global', 'retries' => '3', - 'timeout' => [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ], + 'timeout' => $haproxy_default_timeout, 'maxconn' => $haproxy_default_maxconn, }, } diff --git a/spec/classes/tripleo_cluster_cassandra_spec.rb b/spec/classes/tripleo_cluster_cassandra_spec.rb index 4f2eb6c..13be98e 100644 --- a/spec/classes/tripleo_cluster_cassandra_spec.rb +++ b/spec/classes/tripleo_cluster_cassandra_spec.rb @@ -21,6 +21,14 @@ describe 'tripleo::cluster::cassandra' do shared_examples_for 'cassandra cluster service' do + let :facts do + { + :hostname => 'host1.midonet', + :osfamily => 'RedHat', + :operatingsystemmajrelease => 7, + } + end + let :params do { :cassandra_servers => ['192.168.2.2', '192.168.2.3'], @@ -29,14 +37,15 @@ describe 'tripleo::cluster::cassandra' do end it 'should configure cassandra' do - is_expected.to contain_class('cassandra::run').with( - :seeds => ['192.168.2.2', '192.168.2.3'], - :seed_address => '192.168.2.2', - :storage_port => '7000', - :ssl_storage_port => '7001', - :client_port => '9042', - :client_port_thrift => '9160' + is_expected.to contain_class('cassandra').with( + :seeds => ['192.168.2.2', '192.168.2.3'], + :listen_address => '192.168.2.2', + :storage_port => 7000, + :ssl_storage_port => 7001, + :native_transport_port => 9042, + :rpc_port => 9160 ) + end end |