41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
Ruby
class Alluxio < Formula
|
|
desc "Open Source Memory Speed Virtual Distributed Storage"
|
|
homepage "https://www.alluxio.io/"
|
|
url "https://downloads.alluxio.io/downloads/files/1.8.1/alluxio-1.8.1-bin.tar.gz"
|
|
sha256 "5565b4a55331458da087c35d9612165a399a8fcc2221c7bc4665eac8b5f7ab5c"
|
|
|
|
bottle :unneeded
|
|
|
|
def default_alluxio_conf
|
|
<<~EOS
|
|
alluxio.master.hostname=localhost
|
|
EOS
|
|
end
|
|
|
|
def install
|
|
doc.install Dir["docs/*"]
|
|
libexec.install Dir["*"]
|
|
bin.write_exec_script Dir["#{libexec}/bin/*"]
|
|
|
|
rm_rf Dir["#{etc}/alluxio/*"]
|
|
|
|
(etc/"alluxio").install libexec/"conf/alluxio-env.sh.template" => "alluxio-env.sh"
|
|
ln_sf "#{etc}/alluxio/alluxio-env.sh", "#{libexec}/conf/alluxio-env.sh"
|
|
|
|
defaults = etc/"alluxio/alluxio-site.properties"
|
|
defaults.write(default_alluxio_conf) unless defaults.exist?
|
|
ln_sf "#{etc}/alluxio/alluxio-site.properties", "#{libexec}/conf/alluxio-site.properties"
|
|
end
|
|
|
|
def caveats; <<~EOS
|
|
To configure alluxio, edit
|
|
#{etc}/alluxio/alluxio-env.sh
|
|
#{etc}/alluxio/alluxio-site.properties
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system bin/"alluxio", "version"
|
|
end
|
|
end
|