diff options
author | Guillaume ALAUX | 2015-07-04 14:16:56 +0200 |
---|---|---|
committer | Guillaume ALAUX | 2015-07-04 14:17:34 +0200 |
commit | 58d633c0563eded7dae2b103b5a03ccaa9bf4ca1 (patch) | |
tree | d49c700fa36a7c6c1786170e7970eed56e239016 | |
download | aur-58d633c0563eded7dae2b103b5a03ccaa9bf4ca1.tar.gz |
Initial files 0.9.5
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 90 | ||||
-rw-r--r-- | install_storm.sh | 18 | ||||
-rw-r--r-- | systemd_storm-nimbus.service | 13 | ||||
-rw-r--r-- | systemd_storm-supervisor.service | 13 | ||||
-rw-r--r-- | systemd_storm-ui.service | 13 | ||||
-rw-r--r-- | systemd_sysusers.d_storm.conf | 1 | ||||
-rw-r--r-- | systemd_tmpfiles.d_storm.conf | 3 | ||||
-rw-r--r-- | zookeeper_log4j.properties | 58 | ||||
-rw-r--r-- | zookeeper_zoo.cfg | 28 |
11 files changed, 276 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ffa3ef0ada82 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = storm + pkgdesc = Distributed and fault-tolerant realtime computation system + pkgver = 0.9.5 + pkgrel = 1 + url = https://storm.apache.org/ + install = install_storm.sh + arch = any + license = Apache + depends = java-runtime + depends = python2 + depends = zookeeper + backup = etc/storm/storm_env.ini + backup = etc/storm/storm.yaml + backup = etc/zookeeper/zookeeper-storm/zoo.cfg + backup = etc/zookeeper/zookeeper-storm/log4j.properties + source = http://www.webhostingjams.com/mirror/apache///storm/apache-storm-0.9.5/apache-storm-0.9.5.tar.gz + source = zookeeper_zoo.cfg + source = zookeeper_log4j.properties + source = systemd_storm-nimbus.service + source = systemd_storm-supervisor.service + source = systemd_storm-ui.service + source = systemd_sysusers.d_storm.conf + source = systemd_tmpfiles.d_storm.conf + sha256sums = 2e8337126de8d1e180abe77fb81af7c971f8c4b2dad94e446ac86c0f02ba3fb2 + sha256sums = c94799f4b459f5218faf1da57936baeb4c32b9542a1ba0aacdd637bf2f3aaf05 + sha256sums = 00780ee4cea3bb7a282a548f41b8964d5e392776f9d687ebea89cd49ed5742e3 + sha256sums = 0d8958786538714da86ccf3f23cb668fa017530f8858aea2b7325ffe1af66cd1 + sha256sums = 894b41bd473410271337585509fe9db431a74f3ae2114039229a5742214e097e + sha256sums = 41eade47c4e3b07c53c84351730b1f8752341eed095b6b6fc499ccc2213bead3 + sha256sums = 66db40103bc75bae0817581ef1bbde35bb3b81c2494eda5a8c769813ddd000f1 + sha256sums = 15c959356f32c9583fe6a328d2ec4c7addb983ac7a2529621d90c24b49a07df3 + +pkgname = storm + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..353683943f36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pkg.tar.xz +*.src.tar.gz +*.src.tar.xz +pkg +src diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..01340ace8a6d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,90 @@ +# Maintainer: Guillaume ALAUX <guillaume at alaux dot net> +# Sources available at https://github.com/galaux/arch_storm + +# nimbus -> requires zookeeper to run +# supervisor -> requires zookeeper to run +# ui -> requires nimbus + +# TODO change zoo ports +# TODO split packages? nimbus/supervisor/ui ? + +pkgname=storm +pkgver=0.9.5 +pkgrel=1 +pkgdesc='Distributed and fault-tolerant realtime computation system' +arch=('any') +url='https://storm.apache.org/' +license=('Apache') +depends=('java-runtime' 'python2' 'zookeeper') +backup=(etc/storm/storm_env.ini + etc/storm/storm.yaml + etc/zookeeper/zookeeper-storm/zoo.cfg + etc/zookeeper/zookeeper-storm/log4j.properties) +install=install_storm.sh + +_apache_cgi="http://www.apache.org/dyn/closer.cgi" +_closest=$(curl "${_apache_cgi}?asjson=1" | tr -d '\n ' | sed -r 's/.*"preferred":"(.+)".*/\1/') +_app_path="/${pkgname}/apache-${pkgname}-${pkgver}/apache-${pkgname}-${pkgver}.tar.gz" +source=(${_closest}/${_app_path} + zookeeper_zoo.cfg + zookeeper_log4j.properties + systemd_storm-nimbus.service + systemd_storm-supervisor.service + systemd_storm-ui.service + systemd_sysusers.d_storm.conf + systemd_tmpfiles.d_storm.conf) + +sha256sums=('2e8337126de8d1e180abe77fb81af7c971f8c4b2dad94e446ac86c0f02ba3fb2' + 'c94799f4b459f5218faf1da57936baeb4c32b9542a1ba0aacdd637bf2f3aaf05' + '00780ee4cea3bb7a282a548f41b8964d5e392776f9d687ebea89cd49ed5742e3' + '0d8958786538714da86ccf3f23cb668fa017530f8858aea2b7325ffe1af66cd1' + '894b41bd473410271337585509fe9db431a74f3ae2114039229a5742214e097e' + '41eade47c4e3b07c53c84351730b1f8752341eed095b6b6fc499ccc2213bead3' + '66db40103bc75bae0817581ef1bbde35bb3b81c2494eda5a8c769813ddd000f1' + '15c959356f32c9583fe6a328d2ec4c7addb983ac7a2529621d90c24b49a07df3') + +package() { + cd "${srcdir}/apache-${pkgname}-${pkgver}" + + _app_home=/usr/share/${pkgname} + + install -d "${pkgdir}"{${_app_home}/bin,/etc,/usr/bin,/usr/share/java/${pkgname}} + install -d "${pkgdir}"/etc/zookeeper/zookeeper-${pkgname} + + cp -r conf "${pkgdir}/etc/${pkgname}/" + ln -s /etc/${pkgname} "${pkgdir}${_app_home}/conf" + install -D -m 644 ${srcdir}/zookeeper_log4j.properties \ + "${pkgdir}/etc/zookeeper/zookeeper-${pkgname}/log4j.properties" + install -D -m 644 ${srcdir}/zookeeper_zoo.cfg \ + "${pkgdir}/etc/zookeeper/zookeeper-${pkgname}/zoo.cfg" + + cp -r bin/storm "${pkgdir}${_app_home}/bin/" + sed -i "1s|^#!/usr/bin/python$|#!/usr/bin/python2|" \ + "${pkgdir}${_app_home}/bin/storm" + ln -s ${_app_home}/bin/storm "${pkgdir}/usr/bin/storm" + + cp -r lib/* "${pkgdir}/usr/share/java/${pkgname}" + ln -s ../java/${pkgname} "${pkgdir}${_app_home}/lib" + + cp -r examples external logback public RELEASE "${pkgdir}${_app_home}" + + ln -s /var/log/${pkgname} "${pkgdir}${_app_home}/logs" + + install -m 644 "${pkgdir}/etc/${pkgname}/storm.yaml" \ + "${pkgdir}/etc/${pkgname}/storm.yaml.sample" + echo "dev.zookeeper.path: \"/var/lib/zookeeper/zookeeper-${pkgname}\"" \ + >> "${pkgdir}/etc/${pkgname}/storm.yaml" + echo "storm.local.dir: \"/var/lib/${pkgname}\"" \ + >> "${pkgdir}/etc/${pkgname}/storm.yaml" + #TODO dev-storm-zookeeper (add this in conjunction with special storm-zookeeper.service file?) + + install -D -m 644 ${srcdir}/systemd_sysusers.d_storm.conf \ + "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" + install -D -m 644 ${srcdir}/systemd_tmpfiles.d_storm.conf \ + "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" + + for s in nimbus supervisor ui; do + install -D -m 644 "${srcdir}/systemd_${pkgname}-${s}.service" \ + "${pkgdir}/usr/lib/systemd/system/${pkgname}-${s}.service" + done +} diff --git a/install_storm.sh b/install_storm.sh new file mode 100644 index 000000000000..2b357fe4bd58 --- /dev/null +++ b/install_storm.sh @@ -0,0 +1,18 @@ +post_install() { + systemd-sysusers storm.conf + systemd-tmpfiles --create storm.conf +} + +post_upgrade(){ + systemd-sysusers storm.conf + systemd-tmpfiles --create storm.conf +} + +post_remove() { + if getent passwd storm >/dev/null 2>&1; then + userdel -f storm + fi + if getent group storm >/dev/null 2>&1; then + groupdel -f storm + fi +} diff --git a/systemd_storm-nimbus.service b/systemd_storm-nimbus.service new file mode 100644 index 000000000000..f63285175ca8 --- /dev/null +++ b/systemd_storm-nimbus.service @@ -0,0 +1,13 @@ +[Unit] +Description=Storm Nimbus master node +Requires=zookeeper@storm.service +After=network.target zookeeper@storm.service + +[Service] +User=storm +Group=storm +SuccessExitStatus=143 +ExecStart=/usr/bin/storm nimbus + +[Install] +WantedBy=multi-user.target diff --git a/systemd_storm-supervisor.service b/systemd_storm-supervisor.service new file mode 100644 index 000000000000..5b5b09a27c2e --- /dev/null +++ b/systemd_storm-supervisor.service @@ -0,0 +1,13 @@ +[Unit] +Description=Storm Supervisor node +Requires=zookeeper@storm.service +After=network.target zookeeper@storm.service + +[Service] +User=storm +Group=storm +SuccessExitStatus=143 +ExecStart=/usr/bin/storm supervisor + +[Install] +WantedBy=multi-user.target diff --git a/systemd_storm-ui.service b/systemd_storm-ui.service new file mode 100644 index 000000000000..af77c75ea65d --- /dev/null +++ b/systemd_storm-ui.service @@ -0,0 +1,13 @@ +[Unit] +Description=Storm UI daemon +Requires=storm-nimbus.service +After=network.target storm-nimbus.service + +[Service] +User=storm +Group=storm +SuccessExitStatus=143 +ExecStart=/usr/bin/storm ui + +[Install] +WantedBy=multi-user.target diff --git a/systemd_sysusers.d_storm.conf b/systemd_sysusers.d_storm.conf new file mode 100644 index 000000000000..24c8f5c418f9 --- /dev/null +++ b/systemd_sysusers.d_storm.conf @@ -0,0 +1 @@ +u storm - "Storm user" diff --git a/systemd_tmpfiles.d_storm.conf b/systemd_tmpfiles.d_storm.conf new file mode 100644 index 000000000000..a817d21081a5 --- /dev/null +++ b/systemd_tmpfiles.d_storm.conf @@ -0,0 +1,3 @@ +d /var/log/storm 0755 storm log +d /var/lib/storm 0755 storm storm +d /var/lib/zookeeper/zookeeper-storm 0755 zookeeper zookeeper diff --git a/zookeeper_log4j.properties b/zookeeper_log4j.properties new file mode 100644 index 000000000000..9825970594ee --- /dev/null +++ b/zookeeper_log4j.properties @@ -0,0 +1,58 @@ +# Define some default values that can be overridden by system properties +zookeeper.root.logger=INFO, CONSOLE +zookeeper.console.threshold=INFO +zookeeper.log.dir=. +zookeeper.log.file=zookeeper.log +zookeeper.log.threshold=DEBUG +zookeeper.tracelog.dir=. +zookeeper.tracelog.file=zookeeper_trace.log + +# +# ZooKeeper Logging Configuration +# + +# Format is "<default threshold> (, <appender>)+ + +# DEFAULT: console appender only +log4j.rootLogger=${zookeeper.root.logger} + +# Example with rolling log file +#log4j.rootLogger=DEBUG, CONSOLE, ROLLINGFILE + +# Example with rolling log file and tracing +#log4j.rootLogger=TRACE, CONSOLE, ROLLINGFILE, TRACEFILE + +# +# Log INFO level and above messages to the console +# +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.Threshold=${zookeeper.console.threshold} +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n + +# +# Add ROLLINGFILE to rootLogger to get log file output +# Log DEBUG level and above messages to a log file +log4j.appender.ROLLINGFILE=org.apache.log4j.RollingFileAppender +log4j.appender.ROLLINGFILE.Threshold=${zookeeper.log.threshold} +log4j.appender.ROLLINGFILE.File=${zookeeper.log.dir}/${zookeeper.log.file} + +# Max log file size of 10MB +log4j.appender.ROLLINGFILE.MaxFileSize=10MB +# uncomment the next line to limit number of backup files +#log4j.appender.ROLLINGFILE.MaxBackupIndex=10 + +log4j.appender.ROLLINGFILE.layout=org.apache.log4j.PatternLayout +log4j.appender.ROLLINGFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n + + +# +# Add TRACEFILE to rootLogger to get log file output +# Log DEBUG level and above messages to a log file +log4j.appender.TRACEFILE=org.apache.log4j.FileAppender +log4j.appender.TRACEFILE.Threshold=TRACE +log4j.appender.TRACEFILE.File=${zookeeper.tracelog.dir}/${zookeeper.tracelog.file} + +log4j.appender.TRACEFILE.layout=org.apache.log4j.PatternLayout +### Notice we are including log4j's NDC here (%x) +log4j.appender.TRACEFILE.layout.ConversionPattern=%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L][%x] - %m%n diff --git a/zookeeper_zoo.cfg b/zookeeper_zoo.cfg new file mode 100644 index 000000000000..6b22fe69e276 --- /dev/null +++ b/zookeeper_zoo.cfg @@ -0,0 +1,28 @@ +# The number of milliseconds of each tick +tickTime=2000 +# The number of ticks that the initial +# synchronization phase can take +initLimit=10 +# The number of ticks that can pass between +# sending a request and getting an acknowledgement +syncLimit=5 +# the directory where the snapshot is stored. +# do not use /tmp for storage, /tmp here is just +# example sakes. +dataDir=/var/lib/zookeeper/zookeeper-storm +# the port at which the clients will connect +clientPort=2181 +# the maximum number of client connections. +# increase this if you need to handle more clients +#maxClientCnxns=60 +# +# Be sure to read the maintenance section of the +# administrator guide before turning on autopurge. +# +# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance +# +# The number of snapshots to retain in dataDir +#autopurge.snapRetainCount=3 +# Purge task interval in hours +# Set to "0" to disable auto purge feature +#autopurge.purgeInterval=1 |