Skip to content

Instantly share code, notes, and snippets.

@yasuyk
Last active August 7, 2021 03:06
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save yasuyk/bbaa28568c497d95ff92566efc4ecc3c to your computer and use it in GitHub Desktop.
Save yasuyk/bbaa28568c497d95ff92566efc4ecc3c to your computer and use it in GitHub Desktop.
Installing OpenSTF in Ubuntu 14.04

How to install OpenSTF in Ubuntu 14.04

  1. Add Add RethinkDB key

     source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
     wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
    
  2. Install packages

     sudo apt-get update && sudo apt-get install -y git nodejs nodejs-legacy npm rethinkdb android-tools-adb python autoconf automake libtool build-essential ninja-build libzmq3-dev libprotobuf-dev git graphicsmagick yasm stow
    
  3. Install additional packages via npm

     sudo npm install -g bower karma gulp
    
  4. Install ZeroMQ

     cd ~/Downloads && wget http://download.zeromq.org/zeromq-4.1.2.tar.gz && tar -zxvf zeromq-4.1.2.tar.gz && cd zeromq-4.1.2 && ./configure --without-libsodium --prefix=/usr/local/stow/zeromq-4.1.2
     make && sudo make install && cd /usr/local/stow && sudo stow -vv zeromq-4.1.2
    
  5. Install Google protobuf

     cd ~/Downloads && git clone https://github.com/google/protobuf.git && cd protobuf && ./autogen.sh && ./configure --prefix=/usr/local/stow/protobuf-`git rev-parse --short HEAD`
     make && sudo make install && cd /usr/local/stow && sudo stow -vv protobuf-*
    
  6. Update library path

     sudo ldconfig
    
  7. Install npm

     sudo npm install -g stf
    

Run OpenSTF

  1. Start required services

     rethinkdb &
     adb start-server
    
  2. Start OpenSTF

     stf local
    

or

    stf local --public-ip <ip address>
  1. View in actions

    Go to htttp://<your_ip_address>:7100

Reference

https://gist.github.com/pvsune/a2122369f91d2a518271

https://www.rethinkdb.com/docs/install/ubuntu/

@ilanbenb
Copy link

ilanbenb commented Sep 8, 2016

Hello,
I used your guide but it had a small problem. The version of node.js provided with apt on my ubuntu 14-04 was below 0.12.
I used n to update node with this stackoverflow answer:
http://stackoverflow.com/questions/19451851/install-node-js-to-install-n-to-install-node-js
This guide is also a good option:
https://github.com/nodesource/distributions
Thank you for the guide !

@fsengil
Copy link

fsengil commented Nov 11, 2016

Before installing protobuf, unzip package should also be installed via apt-get. (aka sudo apt-get install unzip)

@roseantony
Copy link

roseantony commented Nov 23, 2016

Hi
I was able to install STF using the commands you have mentioned. But it is not listing the devices in the browser.Could you please help. I ran 'adb devices' and could see my device in the list. Installed STF on ubuntu 14.04. Have I missed something?

@trix0
Copy link

trix0 commented Jan 16, 2018

You should avoid installing node and npm with sudo

@this-sumit
Copy link

Hi, i have followed the steps.
but while running i am getting error.

Options:
-h, --help Show help. [boolean]
-V, --version Show version. [boolean]
--bind-dealer, -d The address to bind the ZeroMQ DEALER endpoint to.
[string] [default: "tcp://:7112"]
--bind-pub, -u The address to bind the ZeroMQ PUB endpoint to.
[string] [default: "tcp://
:7111"]
--bind-pull, -p The address to bind the ZeroMQ PULL endpoint to.
[string] [default: "tcp://*:7113"]
--name An easily identifiable name for log output.
[string] [default: "ip-172-31-20-158"]

Each option can be be overwritten with an environment variable by converting the
option to uppercase, replacing dashes with underscores and prefixing it with
STF_TRIPROXY_ (e.g. STF_TRIPROXY_BIND_PUB).

Could not locate the bindings file. Tried:
→ /home/ubuntu/stf/node_modules/zmq/build/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/build/Debug/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/build/Release/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/out/Debug/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/Debug/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/out/Release/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/Release/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/build/default/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/compiled/10.15.3/linux/x64/zmq.node

could you please help?

@sashamad2
Copy link

Hi, i have followed the steps.
but while running i am getting error.

Options:
-h, --help Show help. [boolean]
-V, --version Show version. [boolean]
--bind-dealer, -d The address to bind the ZeroMQ DEALER endpoint to.
[string] [default: "tcp://:7112"] --bind-pub, -u The address to bind the ZeroMQ PUB endpoint to. [string] [default: "tcp://:7111"]
--bind-pull, -p The address to bind the ZeroMQ PULL endpoint to.
[string] [default: "tcp://*:7113"]
--name An easily identifiable name for log output.
[string] [default: "ip-172-31-20-158"]

Each option can be be overwritten with an environment variable by converting the
option to uppercase, replacing dashes with underscores and prefixing it with
STF_TRIPROXY_ (e.g. STF_TRIPROXY_BIND_PUB).

Could not locate the bindings file. Tried:
→ /home/ubuntu/stf/node_modules/zmq/build/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/build/Debug/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/build/Release/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/out/Debug/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/Debug/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/out/Release/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/Release/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/build/default/zmq.node
→ /home/ubuntu/stf/node_modules/zmq/compiled/10.15.3/linux/x64/zmq.node

could you please help?

Try this!

bower install --allow-root bower.json && gulp webpack:build

It will fix those dependencies!

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment