forked from pivotal-legacy/homebrew-tap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreenplum-db.rb
58 lines (44 loc) · 1.76 KB
/
greenplum-db.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
require 'formula'
class GreenplumDb < Formula
homepage 'http://www.pivotal.io/big-data/pivotal-greenplum-database'
url 'http://dist.vfabric.com.s3.amazonaws.com/greenplum-db-4.2.8.0.tar.gz'
sha1 'a26df9bf2649f6083f19a44c42a84065448450a3'
resource 'gpdbctl' do
tapdir = File.dirname(__FILE__)
extdir = File.basename(__FILE__, ".rb")
url "file:///#{File.join(tapdir, extdir, "gpdbctl")}"
sha1 '23e1062dd0a6633c33b8018dd79a206ef0ad2c74'
end
def install
libexec.install Dir['*']
resource('gpdbctl').stage { bin.install 'gpdbctl' }
inreplace "#{bin}/gpdbctl", /%%GPDATA%%/,\
"#{ENV["HOMEBREW_PREFIX"]}/var/greenplum"
inreplace "#{bin}/gpdbctl", /%%GPHOME%%/, "#{libexec}"
inreplace "#{libexec}/greenplum_path.sh", /%%GPHOME%%/, "#{libexec}"
inreplace "#{libexec}/bin/lib/gp_bash_functions.sh", /gnutar/, "tar"
end
def caveats
s = <<-EOS.undent
GreenplumDB formula is currently a beta version and UNSUPPORTED. Use it at
your own risk.
By installing, you agree to comply with the license at:
http://www.pivotal.io/products/software-license-agreement
If you disagree with these terms, please uninstall by typing:
brew uninstall greenplum-db
Next steps:
1. Enable remote login:
System Preferences -> Sharing -> Check "Remove Login"
2. GreenplumDB requires modification to the OS X kernel parameters.
To have me make those for you, run:
gpdbctl kernel
3. Before GreenplumDB daemon can be started, its data directory and master
database need to be initialized.
To have me initialize those for you, run:
gpdbctl init
4. To start and stop GreenplumDB, run:
gpdbctl start|stop
EOS
return s
end
end