Repository: bigtop Updated Branches: refs/heads/BIGTOP-2320 7b1aed9d5 -> c3cfe06e5
BIGTOP-2321. Add packaging code for HAWQ Switching to current master, as rc4 branch is crap Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/c3cfe06e Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/c3cfe06e Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/c3cfe06e Branch: refs/heads/BIGTOP-2320 Commit: c3cfe06e516c23d482c629d8e7199a67a62e44e3 Parents: 7b1aed9 Author: Cos <[email protected]> Authored: Wed Mar 9 23:05:24 2016 -0600 Committer: Cos <[email protected]> Committed: Wed Mar 9 23:05:24 2016 -0600 ---------------------------------------------------------------------- bigtop-deploy/puppet/modules/hawq/manifests/init.pp | 6 +++--- bigtop-packages/src/common/hawq/install_hawq.sh | 14 ++++++++++++++ bigtop-packages/src/rpm/hawq/SPECS/hawq.spec | 2 +- bigtop.bom | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/c3cfe06e/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 b932632..1b67340 100644 --- a/bigtop-deploy/puppet/modules/hawq/manifests/init.pp +++ b/bigtop-deploy/puppet/modules/hawq/manifests/init.pp @@ -99,16 +99,16 @@ class hawq { ### TODO init require hdfs to be running. Need to test this exec { "hawk init master": - path => ['/usr/bin'], + path => ['/usr/bin', '/usr/lib/hawq/bin/lib'], # Silly init will ask if I am really sure I want to init the cluster - command => 'echo y | bash -x /usr/bin/hawq init master', + command => 'bash -x run-init.sh 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"] ], + require => [ Package["hawq"], File["/etc/default/hawq"], Exec["hawk init master"] ], subscribe => [ Package["hawq"], File["/etc/default/hawq", "/etc/hawq/conf/hawq-site.xml"] ] } } http://git-wip-us.apache.org/repos/asf/bigtop/blob/c3cfe06e/bigtop-packages/src/common/hawq/install_hawq.sh ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/common/hawq/install_hawq.sh b/bigtop-packages/src/common/hawq/install_hawq.sh index 0b860be..a094e62 100755 --- a/bigtop-packages/src/common/hawq/install_hawq.sh +++ b/bigtop-packages/src/common/hawq/install_hawq.sh @@ -133,6 +133,20 @@ ln -s $ETC_DIR/conf $PREFIX/$LIB_DIR/etc # HAWQ-421 ln -s $ETC_DIR/default/hawq $PREFIX/$LIB_DIR/greenplum_path.sh +## Put a wrapper to source the defaults and then run init script for particular object +wrapper=$PREFIX/usr/lib/hawq/bin/lib/run-init.sh +mkdir -p `dirname $wrapper` +cat > $wrapper <<EOF +#!/bin/bash + +BIGTOP_DEFAULTS_DIR=\${BIGTOP_DEFAULTS_DIR-/etc/default} +[ -n "\${BIGTOP_DEFAULTS_DIR}" -a -r \${BIGTOP_DEFAULTS_DIR}/hawq ] && . \${BIGTOP_DEFAULTS_DIR}/hawq + +bash -x /usr/lib/hawq/bin/lib/hawqinit.sh $* $HAWQ_HOME + +EOF +chmod 755 $wrapper + wrapper=$PREFIX/usr/bin/hawq mkdir -p `dirname $wrapper` cat > $wrapper <<EOF http://git-wip-us.apache.org/repos/asf/bigtop/blob/c3cfe06e/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec ---------------------------------------------------------------------- diff --git a/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec b/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec index 606b047..694d29d 100644 --- a/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec +++ b/bigtop-packages/src/rpm/hawq/SPECS/hawq.spec @@ -22,7 +22,7 @@ %define pids_hawq %{hawq_home}/pids %define man_dir %{_mandir} %define hawq_username hawq -%define vcs_tag incubator-%{name}-%{hawq_version}-beta-incubating-RC4 +%define vcs_tag incubator-%{name}-master %define pxf %{hawq_home}/pxf http://git-wip-us.apache.org/repos/asf/bigtop/blob/c3cfe06e/bigtop.bom ---------------------------------------------------------------------- diff --git a/bigtop.bom b/bigtop.bom index f0066c3..bacd12c 100644 --- a/bigtop.bom +++ b/bigtop.bom @@ -426,8 +426,8 @@ bigtop { name = 'hawq' relNotes = 'Apache HAWQ (incubating)' version { base = '2.0.0'; pkg = base; release = 1 } - tarball { source = "${version.base}-beta-incubating-RC4.tar.gz" - destination = "incubator-${name}-${version.base}-beta-incubating-RC4.tar.gz" } + tarball { source = "master.tar.gz" + destination = "incubator-${name}-master.tar.gz" } url { download_path = "/apache/incubator-$name/archive" site = "https://github.com/${download_path}" archive = site }
