-
-
Save douglassims/6998001 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| useradd -r -U -s /bin/false -g storm storm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| chown -R storm:storm /usr/local/storm/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| SOURCE='-s dir' | |
| TARGET='-t deb' | |
| CONFIG='--config-files conf/storm.yaml' | |
| VERSION='-v 0.8.2' | |
| OUTPUT='-p pkg' | |
| MAINTAINER='-m "Jarret Raim <jarret.raim@rackspace.com>"' | |
| BEFORE_INSTALL='--before-install pkg/add_storm_user.sh' | |
| AFTER_INSTALL='--after-install pkg/change-ownership.sh' | |
| DEPENDENCIES=( | |
| 'python-2.7' | |
| 'openjdk-7-jdk' | |
| 'unzip' | |
| 'supervisor' | |
| ) | |
| for i in "${DEPENDENCIES[@]}" | |
| do | |
| DEPS="$DEPS -d $i" | |
| done | |
| ROOT_INSTALL_DIR="/usr/local/storm" | |
| MAPPINGS=( | |
| "conf/storm.yaml=/etc/storm" | |
| "lib=$ROOT_INSTALL_DIR/lib" | |
| "log4j=$ROOT_INSTALL_DIR/log4j" | |
| "bin=$ROOT_INSTALL_DIR/bin" | |
| "public=$ROOT_INSTALL_DIR/public" | |
| ) | |
| for i in "${MAPPINGS[@]}" | |
| do | |
| MAP="$MAP $i" | |
| done | |
| function build { | |
| # Expects: | |
| # $1 name | |
| # $2 supervisor config file mapping | |
| echo "Building $1" | |
| echo fpm $SOURCE $TARGET -n $1 -f $VERSION $DEPS $BEFORE_INSTALL $AFTER_INSTALL $CONFIG $MAP $2 | |
| fpm $SOURCE $TARGET -n $1 -f $VERSION $DEPS $BEFORE_INSTALL $AFTER_INSTALL $CONFIG $MAP $2 | |
| } | |
| # Build 'dem packages | |
| cd .. | |
| build "storm-ui" "pkg/storm-ui.conf" | |
| build "storm-nimbus" "pkg/storm-nimbus.conf" | |
| build "storm-supervisor" "pkg/storm-supervisor.conf" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget http://download.zeromq.org/zeromq-2.1.7.tar.gz | |
| tar -xzf zeromq-2.1.7.tar.gz | |
| cd zeromq-2.1.7 | |
| ./configure | |
| make | |
| mkdir /tmp/installdir | |
| make install DESTDIR=/tmp/installdir | |
| fpm -s dir -t deb -n zmqpackage -v 2.1.7 -C /tmp/installdir \ | |
| -p zmqpackage-VERSION_ARCH.deb \ | |
| -d "libssl0.9.8 (> 0)" \ | |
| -d "libstdc++6 (>= 4.4.3)" \ | |
| -d "libuuid1 (>= 2.16)" \ | |
| /usr/bin /usr/lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # needs: libltdl-dev dh-autoreconf openjdk-7-jdk | |
| wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz | |
| tar -xzf pkg-config-0.22.tar.gz | |
| cd pkg-config-0.22 | |
| ./configure --prefix=/usr/local/pkg-config-0.22 --datarootdir=/usr/share | |
| make | |
| sudo make install | |
| export PATH=$PATH:/usr/local/pkg-config-0.22/bin | |
| #export JAVA_HOME=$JAVA_HOME:/usr/lib/jvm/java-1.6.0-openjdk-amd64 | |
| git clone https://github.com/nathanmarz/jzmq.git | |
| cd jzmq | |
| ./autogen.sh | |
| ./configure | |
| make | |
| sudo make install | |
| mkdir /tmp/installdir2 | |
| make install DESTDIR=/tmp/installdir2 | |
| fpm -s dir -t deb -n jzmqpackage -v 2.1.7 -C /tmp/installdir2 \ | |
| -p jzmqpackage-VERSION_ARCH.deb \ | |
| -d "libssl0.9.8 (> 0)" \ | |
| -d "libstdc++6 (>= 4.4.3)" \ | |
| -d "libuuid1 (>= 2.16)" \ | |
| /usr/bin /usr/lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [program:storm-nimbus] | |
| command=/usr/local/storm/bin/storm nimbus | |
| numprocs=1 | |
| autostart=true | |
| directory=/usr/local/storm | |
| process_name=storm-nimbus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [program:storm-supervisor] | |
| command=/usr/local/storm/bin/storm supervisor | |
| numprocs=1 | |
| autostart=true | |
| directory=/usr/local/storm | |
| process_name=storm-supervisor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [program:storm-ui] | |
| command=/usr/local/storm/bin/storm ui | |
| numprocs=1 | |
| autostart=true | |
| directory=/usr/local/storm | |
| process_name=storm-ui |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment