Repository: bigtop Updated Branches: refs/heads/BIGTOP-2320 7d92b2934 -> 6ac64fd9c
BIGTOP-2325. More idiosyncratic stuff with runtime requirements. Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/ff2bdb60 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/ff2bdb60 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/ff2bdb60 Branch: refs/heads/BIGTOP-2320 Commit: ff2bdb60b8a1b90e788ecd50ac026052b460ca12 Parents: 7d92b29 Author: Konstantin Boudnik <[email protected]> Authored: Thu Feb 18 20:13:10 2016 +0300 Committer: Konstantin Boudnik <[email protected]> Committed: Thu Feb 18 20:13:10 2016 +0300 ---------------------------------------------------------------------- .../puppet/modules/hawq/manifests/init.pp | 39 +++++++++++++++++++- .../puppet/modules/hawq/templates/hawq.default | 2 + 2 files changed, 39 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/ff2bdb60/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 6c45773..a8da991 100644 --- a/bigtop-deploy/puppet/modules/hawq/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hawq/manifests/init.pp @@ -14,6 +14,8 @@ # limitations under the License. class hawq { + include stdlib + class deploy ($roles) { if ("hawq" in $roles) { hawq::cluster_node { "hawq-node": } @@ -61,10 +63,43 @@ class hawq { content => template('hawq/yarn-client.xml'), require => [File["/etc/hawq/conf"]], } + file { "/etc/hawq/conf/slaves": + ensure => file, + content => $slaves_content, + } + $slaves_content = join (hiera('bigtop::hawq_slaves), ' ') + + exec { "install pygresql modules1": + path => ['/usr/bin'], + command => 'pip --retries=50 --timeout=300 install pg8000 simplejson unittest2 pycrypto pygresql pyyaml lockfile paramiko psi', + require => [ Package['python-pip'] ], + } + exec { "install pygresql modules2": + path => ['/usr/bin'], + command => 'pip --retries=50 --timeout=300 install http://darcs.idyll.org/~t/projects/figleaf-0.6.1.tar.gz', + require => [ Package['python-pip'], Exec ['install pygresql modules1'] ], + } + exec { "install pygresql modules3": + path => ['/usr/bin'], + command => 'pip --retries=50 --timeout=300 install http://sourceforge.net/projects/pychecker/files/pychecker/0.8.19/pychecker-0.8.19.tar.gz/download', + require => [ Package['python-pip'], Exec ['install pygresql modules2'] ], + ## HAWQ install instructions are suggesting to + ## uninstall postgresql postgresql-libs postgresql-devel at this point + ## but I don't think it matter, and for sure looks ugly + } + + package { "python-pip": + ensure => latest, + } + package { "postgresql": + ensure => latest, + } + exec { "hawk init": path => ['/usr/bin'], - command => 'bash -x /usr/bin/hawq init', - require => Package['hawq'], + # 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', + require => [ Package['hawq', 'python-pip', 'postgresql'], Exec ['install pygresql modules3'] ], } service { "hawq": http://git-wip-us.apache.org/repos/asf/bigtop/blob/ff2bdb60/bigtop-deploy/puppet/modules/hawq/templates/hawq.default ---------------------------------------------------------------------- diff --git a/bigtop-deploy/puppet/modules/hawq/templates/hawq.default b/bigtop-deploy/puppet/modules/hawq/templates/hawq.default index f8cf6e1..19da99e 100644 --- a/bigtop-deploy/puppet/modules/hawq/templates/hawq.default +++ b/bigtop-deploy/puppet/modules/hawq/templates/hawq.default @@ -14,6 +14,8 @@ # limitations under the License. export HAWQ_HOME="/usr/lib/hawq" +## Due to some weird scripting, hawq doesn't work without GPHOME +export GPHOME=$HAWQ_HOME export HAWQ_CONF_DIR="/etc/hawq/conf" export HAWQ_PID_DIR="/var/run/hawq"
