Skip to content

openstf/setup-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smartphone Test Farm Setup Examples

This repository contains setup examples of openstf/stf on various hosts using Vagrant with VirtualBox provider.

Supported Hosts

Requirements

Setup

git clone https://github.com/openstf/setup-examples.git stf-setup-examples
cd stf-setup-examples

Run Rethinkdb Cluster

cd ./db
vagrant up

Above command will do

  • Download ubuntu/trusty64 image if image is not present (this may take time depending on internet speed)
  • Launch Ubuntu VM and set its IP to $rethinkdb_host_ip configured in Configuration File (Default: 198.162.50.11)
  • Install and run rethinkdb server

You can confirm if rethinkdb is up by visiting rethinkdb admin console (http://198.162.50.11:8080 or http://RETHINKDB_HOST_IP:8080)

Run STF on CoreOS Cluster

Requirements

Configuration

You can configure global variable present in CoreOS Configuration File according to your Requirements.

Run CoreOS Cluster

cd coreos
vagrant up

Above command will do

  • Download CoreOS image if image is not present (this may take time depending on internet speed)
  • Launch $num_instances configured in CoreOS Configuration File instances of CoreOS VM
  • You can check if all the instances are running using vagrant global-status command

Configuring fleetctl

Next, we will be launching services inside CoreOS cluster using fleetctl. First we need to export a global variable FLEETCTL_ENDPOINT. This endpoint will tell fleetctl running on host os (OS X in my case) to talk with fleet daemon running inside one of the guest OS.

export FLEETCTL_ENDPOINT=http://172.17.8.101:2379

Using core-01 guest OS.

Now, run fleetctl list-machines command, You will see something like below

MACHINE     IP           METADATA
6e3e7dc2... 172.17.8.101 -
9821f508... 172.17.8.102 -
ab5747a8... 172.17.8.103 -

Now, your CoreOS cluster is ready to deploy STF Components.

Deploy STF Components

adbd.service

You need to have a single adbd.service unit running on each host where devices are connected.Global=true X-Fleet parameter in adbd.service will make it run on each cluster host.

Deploy using below command

fleetctl submit ./unit_files/adbd.service
fleetctl start adbd

It will take adbd.service some time to start on each host. Once it is done, you can check by running fleetctl list-units command. You will see

UNIT		MACHINE				ACTIVE	SUB
adbd.service	6e3e7dc2.../172.17.8.101	active	running
adbd.service	9821f508.../172.17.8.102	active	running
adbd.service	ab5747a8.../172.17.8.103	active	running

About

STF Setup Examples using Vagrant and Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published