BIGTOP-2325. Deployment recipes for HAWQ Adding sysctl template and handling code
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/00499791 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/00499791 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/00499791 Branch: refs/heads/BIGTOP-2320 Commit: 004997913bdbb607a89f7e6e7e581380622abedc Parents: c7e5ec8 Author: Cos <[email protected]> Authored: Thu Mar 10 16:56:30 2016 -0600 Committer: Cos <[email protected]> Committed: Thu Mar 10 16:56:30 2016 -0600 ---------------------------------------------------------------------- .../puppet/modules/hawq/manifests/init.pp | 12 +++++++++- .../puppet/modules/hawq/templates/sysctl.conf | 24 ++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/00499791/bigtop-deploy/puppet/modules/hawq/manifests/init.pp ---------------------------------------------------------------------- diff --git a/bigtop-deploy/puppet/modules/hawq/manifests/init.pp b/bigtop-deploy/puppet/modules/hawq/manifests/init.pp index 1b67340..73079c2 100644 --- a/bigtop-deploy/puppet/modules/hawq/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hawq/manifests/init.pp @@ -70,6 +70,16 @@ class hawq { content => "localhost", ## TODO - this has to be dynamic } + file { "/etc/sysctl.conf": + # TODO overriding sysctl might be a somewhat dangerous, let's figure something better + content => template('hawq/ysysctl.conf'), + } + exec { "sysctl reset": + path => ['/usr/sbin'], + command => 'sysctl -p', + require => [ File['/etc/sysctl.conf'] ], + } + exec { "install pygresql modules1": path => ['/usr/bin'], command => 'pip --retries=50 --timeout=300 install pg8000 simplejson unittest2 pycrypto pygresql pyyaml lockfile paramiko psi', @@ -102,7 +112,7 @@ class hawq { path => ['/usr/bin', '/usr/lib/hawq/bin/lib'], # Silly init will ask if I am really sure I want to init the cluster command => 'bash -x run-init.sh master', - require => [ Package['hawq'], Exec ['install pygresql modules2'] ], + require => [ Package['hawq'], Exec ['sysctl reset', 'install pygresql modules2'] ], } ## TODO The expectation is that init will start the service. I don't think so... http://git-wip-us.apache.org/repos/asf/bigtop/blob/00499791/bigtop-deploy/puppet/modules/hawq/templates/sysctl.conf ---------------------------------------------------------------------- diff --git a/bigtop-deploy/puppet/modules/hawq/templates/sysctl.conf b/bigtop-deploy/puppet/modules/hawq/templates/sysctl.conf new file mode 100644 index 0000000..2ac1598 --- /dev/null +++ b/bigtop-deploy/puppet/modules/hawq/templates/sysctl.conf @@ -0,0 +1,24 @@ +kernel.shmmax = 1000000000 +kernel.shmmni = 4096 +kernel.shmall = 4000000000 +kernel.sem = 250 512000 100 2048 +kernel.sysrq = 1 +kernel.core_uses_pid = 1 +kernel.msgmnb = 65536 +kernel.msgmax = 65536 +kernel.msgmni = 2048 +net.ipv4.tcp_syncookies = 0 +net.ipv4.ip_forward = 0 +net.ipv4.conf.default.accept_source_route = 0 +net.ipv4.tcp_tw_recycle = 1 +net.ipv4.tcp_max_syn_backlog = 200000 +net.ipv4.conf.all.arp_filter = 1 +net.ipv4.ip_local_port_range = 1281 65535 +net.core.netdev_max_backlog = 200000 +vm.overcommit_memory = 2 +fs.nr_open = 3000000 +kernel.threads-max = 798720 +kernel.pid_max = 798720 +# increase network +net.core.rmem_max=2097152 +net.core.wmem_max=2097152
