Name: puppet-rocketchat
Owner: Inuits
Description: Puppet module for Rocketchat
Created: 2017-07-14 09:22:07.0
Updated: 2017-07-14 09:22:09.0
Pushed: 2016-08-06 21:30:20.0
Homepage: null
Size: 4
Language: Puppet
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This module assumes you will install rocketchat through an RPM with a selfcontained Nodejs environment.
Instructions on how to recreate the RPM:
Requisites
stall fpm (https://github.com/jordansissel/fpm)
stall nodeenv (hint: fpm -s python -t rpm nodeenv)
stall nodejs/npm to install the dependencies of rocketchat
Download Rocket.chat
https://cdn-download.rocket.chat/build/rocket.chat-0.36.0.tgz
Extract
-zxvf *.tgz
Cleanup
fr ./*.tgz
Create a selfcontained nodejs environment
env --node=0.10.40 --prebuilt --jobs=4 ./dist/opt/rocketchat
Move stuff around in position and create the necessary scripts and config files
/bundle/* ./dist/opt/rocketchat/
/dist/opt/rocketchat/programs/server
install
./../../../../
-e "chmod +x /opt/rocketchat/bin/node\nsystemctl daemon-reload" > after-install.sh
-e "chmod +x /opt/rocketchat/bin/node\nsystemctl daemon-reload" > after-upgrade.sh
-e "systemctl stop rocketchat\n" > before-remove.sh
-e "systemctl daemon-reload\n" > after-remove.sh
r -p ./dist/etc/systemd/system/
r -p ./dist/etc/rocketchat/
> ./dist/etc/rocketchat/rocketchat.conf <<- EOM
_URL=http://your-host-name.com-as-accessed-from-internet:3000/
O_URL=mongodb://localhost:27017/rocketchat
=3000
> ./dist/etc/systemd/system/rocketchat.service <<- EOM
t]
ription=rocketchat
r=network.target
vice]
=simple
it WorkingDirectory, User and Group as needed
ingDirectory=/opt/rocketchat
=nobody
p=nobody
Start=/bin/bash -c "source ./bin/activate; exec node ./main.js"
ogIdentifier=rocketchat
ronmentFile=/etc/rocketchat/rocketchat.conf
tall]
edBy=multi-user.target
d +x ./dist/opt/rocketchat/bin/node
Package using fpm
\
ir \
pm \
ocketchat \
eration 0.36.0 \
rsion 1 \
-rpm-autoreqprov \
chitecture 'x86_64' \
scription "Selfcontained NodeJS Rocketchat with nodeenv" \
m-use-file-permissions \
m-user root \
m-group root \
ter-install after-install.sh \
ter-upgrade after-upgrade.sh \
fore-remove before-remove.sh \
ter-remove after-remove.sh \
ist/
Place the resulting RPM in your repository or just install it on the target machine.