GTOP-2325. Deployment recipes for HAWQ Fixing permissions on hawq-site.xml
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/560c0180 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/560c0180 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/560c0180 Branch: refs/heads/BIGTOP-2320 Commit: 560c01805b9a587d3de6de4712d6366225ed4cc1 Parents: 751c113 Author: Konstantin Boudnik <[email protected]> Authored: Sat Feb 27 17:43:42 2016 -0800 Committer: Konstantin Boudnik <[email protected]> Committed: Sat Feb 27 17:43:42 2016 -0800 ---------------------------------------------------------------------- .../puppet/modules/hawq/manifests/init.pp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/560c0180/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 8ba6adb..b932632 100644 --- a/bigtop-deploy/puppet/modules/hawq/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hawq/manifests/init.pp @@ -49,6 +49,9 @@ class hawq { file { "/etc/hawq/conf/hawq-site.xml": content => template('hawq/hawq-site.xml'), require => [File["/etc/hawq/conf"]], + owner => 'hawq', + group => 'hawq', + mode => '0755', } file { "/etc/hawq/conf/gpcheck.cnf": content => template('hawq/gpcheck.cnf'), @@ -95,18 +98,18 @@ class hawq { } ### TODO init require hdfs to be running. Need to test this - exec { "hawk init": + exec { "hawk init master": path => ['/usr/bin'], # Silly init will ask if I am really sure I want to init the cluster - command => 'echo y | bash -x /usr/bin/hawq init cluster', + command => 'echo y | bash -x /usr/bin/hawq init master', require => [ Package['hawq'], Exec ['install pygresql modules2'] ], } -### TODO The expectation is that init will start the service. I don't think so... -# service { "hawq": -# ensure => running, -# require => [ Package["hawq"], File["/etc/default/hawq"], Exec["hawk init"] ], -# subscribe => [ Package["hawq"], File["/etc/default/hawq", "/etc/hawq/conf/hawq-site.xml"] ] -# } +## TODO The expectation is that init will start the service. I don't think so... + service { "hawq": + ensure => running, + require => [ Package["hawq"], File["/etc/default/hawq"], Exec["hawk init"] ], + subscribe => [ Package["hawq"], File["/etc/default/hawq", "/etc/hawq/conf/hawq-site.xml"] ] + } } }
