/!\ All commands should be run with a "simple" user (not root!). nvm (Node Version Manager) must not be installed with root!
We are going to install nvm (and STF) under /home/<username>
.
cd ~
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
nvm install --lts
sudo apt-get install -y libprotobuf-dev
sudo apt-get install -y libcurl3
wget http://samuelhughes.com/misc/bin/rethinkdb_2.3.6+stretch%7E0stretch_amd64.deb
sudo dpkg -i rethinkdb_2.3.6+stretch~0stretch_amd64.deb
rm rethinkdb_2.3.6+stretch~0stretch_amd64.deb
sudo apt-get install -y graphicsmagick
sudo apt-get install -y yasm
sudo apt-get install -y pkg-config
sudo apt-get install -y android-tools-adb
sudo apt-get install -y libczmq-dev libczmq4
sudo apt-get install -y build-essential
sudo apt-get install -y usbutils
npm install -g stf
stf doctor
All components must be OK except Protobuf:
ERR/cli:doctor 2481 [*] ProtoBuf is not installed (
protoc
is missing)
Plug your Android device in a USB port.
lsusb
adb start-server
adb devices
Allow USB debugging on Android:
Accept RSA key exchange on Android:
rethinkdb
stf local --public-ip <ip-address>
You should be able to access http://<ip-address>:7001
and see the STF login page. After login, you should be able to see and take control of your Android device.
Now clean the command-line-mode-test files as we'll setup the database in another repository during the service setup below:
rm -rf /home/<username>/rethinkdb_data
Reference: https://www.rethinkdb.com/docs/start-on-startup
sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/instance-stf.conf
sudo vi /etc/rethinkdb/instances.d/instance-stf.conf
Edit the file to change only this option:
bind=all
sudo service rethinkdb start
sudo service rethinkdb status
sudo vi /lib/systemd/system/sft.service
Create the file as follows. Make sure to check the paths (Node version, user name) and your IP address:
[Unit]
Description=OpenSTF
[Service]
User=<username>
Group=<group of user>
Environment="PATH=/home/<username>/.nvm/versions/node/v8.11.3/bin:$PATH"
ExecStart=/home/<username>/.nvm/versions/node/v8.11.3/bin/stf local --public-ip <ip-address>
[Install]
WantedBy=default.target
Start the service and enable it for auto-start:
sudo service stf start
sudo service stf status
sudo systemctl enable stf