• Stars
    star
    165
  • Rank 228,858 (Top 5 %)
  • Language Smarty
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android devices farm with USB and emulated devices support

android-farm

Android devices farm with USB and emulated devices support

TL;DR;

$ helm install openstf

Introduction

This project contains a chart that bootstraps an OpenSTF deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release openstf

The command deploys OpenSTF on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

You need to set emulators.imagePrefix and adb.image.repository values to the images of docker-emulator-android and adb-butler you've built in order for the chart to work properly. This can be done either in values.yaml or via the command-line. The full installation will look something like:

$ helm install --name openstf -f openstf/values.yaml \
    --set emulators.imagePrefix=docker-registry/agoda/docker-emulator-android- \
    --set emulators.imageVersion=1.0.0 \
    --set adb.image.repository=docker-registry/agoda/adb-butler \
    --set pullSecret=docker-registry-secret \
    --set ingress.enabled=true \
    --set ingress.hostname=openstf.svc.cluster.local \
    --set ingress.ssl.enabled=true \
    --set ingress.ssl.secret=ssl-secret \
    --set rethinkdb.password=strongpassword \
    openstf

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Nodes configuration

You need to label and taint the usb provider nodes and kvm nodes as following

USB providers:

$ kubectl label nodes node-x.cluster.local openstf.io/provider=true
$ kubectl taint nodes node-x.cluster.local openstf.io/provider=true:NoSchedule

Emulator nodes:

$ kubectl label nodes node-x.cluster.local openstf.io/emulator=kvm

Configuration

The following tables lists the configurable parameters of the openstf chart and their default values.

Parameter Description Default
stf.image.repository OpenSTF container image repository openstf/stf
stf.image.tag OpenSTF container image tag v3.2.0
stf.image.pullPolicy OpenSTF container image pull policy IfNotPresent
stf.api.replicas Desired number of API pods 3
stf.app.replicas Desired number of app pods 1
stf.auth.replicas Desired number of auth pods 1
stf.processor.replicas Desired number of processor pods 5
stf.reaper.replicas Desired number of reaper pods 1
stf.apkStorage.replicas Desired number of apk-storage pods 1
stf.imgStorage.replicas Desired number of image-storage pods 1
stf.storage.replicas Desired number of storage pods 1
stf.triproxyDev.replicas Desired number of triproxy-dev pods 1
stf.triproxyApp.replicas Desired number of triproxy-app pods 1
stf.websocket.replicas Desired number of websocket pods 1
nginx.image.repository nginx container image repository nginx
nginx.image.tag nginx container image repository tag 1.13.8-alpine
nginx.image.pullPolicy nginx container image pullPolicy IfNotPresent
nginx.replicas Desired number of nginx pods 1
adb.image.repository adb-butler container image repository agoda/adb-butler
adb.image.tag adb-butler container image repository tag latest
adb.image.pullPolicy adb-butler container image pullPolicy Always
db.url URL of RethinkDB rethinkdb-rethinkdb-proxy.openstf
db.port TCP port of RethinkDB 28015
db.password RethinkDB password rethinkdb
dns.resolver Address of DNS server kube-dns.kube-system
pullSecret Pull secret for pulling all the images ""
ingress.enabled Enable ingress controller resource false
ingress.annotations Custom annotations on ingress resource nginx.org/websocket-services: nginx
ingress.hostname Hostname to your OpenSTF installation openstf.local
ingress.ssl.enabled Utilize TLS backend in ingress false
ingress.ssl.secret TLS Secret (certificates) openstf.local-tls-secret
emulators.imagePrefix Prefix of docker android container image agoda/docker-emulator-android-
emulators.imageVersion Docker android container image tag 25
emulators.pullPolicy Docker android container image pull policy IfNotPresent
emulator.types Types of docker android emulators to spawn see below for more info
telegraf.image.repository telegraf container image repository telegraf
telegraf.image.tag telegraf container image repository tag 1.5-alpine
telegraf.image.pullPolicy telegraf container image pullPolicy IfNotPresent
telegraf.config.outputs.prometheus.enabled provide prometheus metrics on provider pods true

Tip: You can use the default values.yaml

Pod resources

All the pods have sane default resources set. To customize check the values.yaml

Emulators

In order to create emulators you need to provide configuration inside emulators.types. For example you want the to name the batch of devices tablet7i, add ci/uiTest/tablet/7inch note to all these devices in OpenSTF and change the config.ini variable for emulator. You also want 3 instances of such config with API version 26 and 3 instances with API version 19.

- name: tablet7i
  note: ci/uiTest/tablet/7inch
  args: "skin.name=600x1024;hw.lcd.density=160;hw.lcd.height=600;hw.lcd.width=1024;hw.device.name=7in WSVGA (Tablet);avd.ini.displayname=7  WSVGA (Tablet) API 23;"
  instances:
  - version: 26
    count: 3
  - version: 19
    count: 3

By default you'll have phones with API versions 17 to 26 and 7' + 10' tablets with API version 25.

License

android-farm is open source and available under the Apache License, Version 2.0.

OpenSTF is open source and available under the Apache License, Version 2.0

Android SDK components are available under the Android Software Development Kit License

Related projects

The emulators are spawned using the docker-emulator-android container image

Default adb side container image with self-healing and metrics is adb-butler

Connecting to OpenSTF devices with filtering support and reconnect logic is done using stf-client

fork is an instrumentation runner with support for reconnecting to adb devices on-the-go and more

example of ci agent container

More Repositories

1

Kakao

This repo is no longer supported. Please visit a https://github.com/KakaoCup/Kakao
Kotlin
1,110
star
2

docker-emulator-android

Dockerized android emulator
Shell
247
star
3

ninjato

Flexible and type-safe inline HTTP client for Android and Kotlin
Kotlin
111
star
4

boots

Lightweight bootstrap library for your Kotlin, Java and Android apps
Kotlin
91
star
5

samsahai

Dependencies verification system with Kubernetes Operator
Go
80
star
6

Agoda.IoC

C# IoC extension library, used at Agoda for Registration of classes into IoC container based on Attributes.
C#
39
star
7

react-handyman

๐Ÿ‘จโ€๐Ÿ”ง Enhance your React.js app with i18n, string formatting, ab tests and other handy packages!
TypeScript
37
star
8

opentelemetry-logs-go

Opentelemetry Logs Go library
Go
35
star
9

net-loadbalancing

.NET Standard library for simple retry handling and load balancing
C#
25
star
10

adb-butler

adb server for OpenSTF deployment
Shell
22
star
11

AgodaAnalyzers

A set of opinionated Roslyn analyzers for C#
C#
21
star
12

standards-c-sharp

Agoda's standards and practices for C# code
20
star
13

kafka-jdbc-connector

Simple way to copy data from relational databases into kafka.
Scala
20
star
14

opentelemetry-go

Extensions to OpenTelemetry (Golang)
Go
18
star
15

spark-hpopt

Bayesian hyperparamter tuning for Spark MLLib
Jupyter Notebook
10
star
16

eslint-config-agoda

Agoda's ESLint configuration
JavaScript
8
star
17

agoda-design-toolkit

Sketch Plugin - Quickly generate real content for your design workflow (Internal use)
JavaScript
4
star
18

dotnet-build-metrics

Measure Compilation time of Dev local C# projects
C#
4
star
19

tslint-rules

A set of TSLint rules used on some Agoda projects.
TypeScript
3
star
20

Rebus.Kafka

C#
2
star
21

teldrassil

Visualize dependency graphs in your Intelli J projects
Kotlin
2
star
22

otelzap

Zap logger with OpenTelemetry support
Go
2
star
23

kafka-jdbc-connector-samples

Kafka JDBC Connector sample projects
Scala
2
star
24

android-ci

Android CI scripts
Dockerfile
1
star
25

samsahai-example

Samsahai Integration Configuration
Makefile
1
star
26

cicd

JavaScript
1
star
27

ga-npm-wildcard-check

PowerShell
1
star
28

Shouldly.FromAssert

C#
1
star
29

StructuredMapper

C#
1
star
30

KafkaFlow.ApplicationInsights

C#
1
star