Skip to content

Instantly share code, notes, and snippets.

@giordanocardillo
Last active April 30, 2020 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giordanocardillo/5db25dd2462aafb31aa2db2052876b73 to your computer and use it in GitHub Desktop.
Save giordanocardillo/5db25dd2462aafb31aa2db2052876b73 to your computer and use it in GitHub Desktop.
Installing OpenSTF

Installation

  1. Download current gist as zip file and unzip it in any folder
  2. Connect MAC to GIALLO or to internet using something else, GIALLO is fine
  3. Start file install.sh
  4. Disconnect from internet, to allow nexus usage and run install-offline.sh
  5. Done!

Start/stop

To start/stop use the provided scripts!

#!/bin/sh
# Must be offline for this part, to use nexus
USE_NODE_VERSION=8.14.0
export PATH=$HOME/node-$USE_NODE_VERSION/bin:$PATH
npm i -g stf pm2
pm2 install pm2-logrotate
pm2 set pm2-logorotate:retain 2
#!/bin/sh
# Must be online for this part
USE_NODE_VERSION=8.14.0
brew tap homebrew/services
brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config
curl https://nodejs.org/dist/v$USE_NODE_VERSION/node-v$USE_NODE_VERSION-darwin-x64.tar.gz -o $HOME/node-v$USE_NODE_VERSION.tar.gz
tar zxvf $HOME/node-v$USE_NODE_VERSION.tar.gz -C $HOME
mv $HOME/node-v$USE_NODE_VERSION-darwin-x64 $HOME/node-$USE_NODE_VERSION
rm -rf $HOME/node-v$USE_NODE_VERSION.tar.gz
mkdir -p $HOME/.node-gyp/$USE_NODE_VERSION
echo 9 > $HOME/.node-gyp/$USE_NODE_VERSION/installVersion
cp -r $HOME/node-$USE_NODE_VERSION/include $HOME/.node-gyp/$USE_NODE_VERSION
# Configure rethinkdb
echo "http-port=7200" >> /usr/local/etc/rethinkdb.conf
echo "bind=all" >> /usr/local/etc/rethinkdb.conf
exit 0
#!/bin/sh
USE_NODE_VERSION=8.14.0
export PATH=$HOME/node-$USE_NODE_VERSION/bin:$PATH
pm2 restart stf.ecosystem.yml
#!/bin/sh
USE_NODE_VERSION=8.14.0
export PATH=$HOME/node-$USE_NODE_VERSION/bin:$PATH
pm2 start stf.ecosystem.yml
apps:
- script: rethinkdb
name: 'rethinkdb'
args: '--config-file /usr/local/etc/rethinkdb.conf'
- script: stf
name: 'STF'
args: 'local --public-ip 10.57.205.16'
#!/bin/sh
USE_NODE_VERSION=8.14.0
export PATH=$HOME/node-$USE_NODE_VERSION/bin:$PATH
pm2 delete stf stf.ecosystem.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment