Smartphone Test Farm is a great tool to create on-premise device farm. And also, it is very easy to get started with it using it's stf local
feature. But the problem is, this feature was developed for development purpose. Users are not supposed to use it in production. It is okay to use it for a small farm of 10 ~ 15 devices with one host machine. But to scale you will have to deploy it over a cluster instead.
This project will provide various setup examples of STF in production environment. I will be using Vagrant with VirtualBox provider to create virtual cluster for demonstration.
Before going any further, I am going to give you a brief idea about what kind of setups are we going to do. Most of the setups will have two major components.
We will be creating these clusters using Vagrant and VirtualBox. And then deploy various software components on these clusters. By the end of this tutorial, you will have a running STF on your VMs which you will be able to access on http://172.17.8.101 from your browser. Stay Excited!
git clone https://github.com/openstf/setup-examples.git stf-setup-examples
cd stf-setup-examples
Lets create rethinkdb cluster. Go to the db
folder and run vagrant up
. Yeah, thats it.
cd ./db; vagrant up
Above command will do following things
198.162.50.11
You can confirm if rethinkdb is up by visiting rethinkdb admin console
Please have a look at Vagrantfile to have better understanding about what is happening.
TODO: Use 2 instances of VM for rethinkdb if somebody complains that this is not a real cluster.
Please check following host specific docs for STF cluster creation and deployment strategy.