{"id":18458812,"url":"https://github.com/agoda-com/android-farm","last_synced_at":"2025-06-28T00:03:11.041Z","repository":{"id":29507771,"uuid":"121209222","full_name":"agoda-com/android-farm","owner":"agoda-com","description":"Android devices farm with USB and emulated devices support","archived":false,"fork":false,"pushed_at":"2020-05-03T11:21:50.000Z","size":33,"stargazers_count":167,"open_issues_count":2,"forks_count":21,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-08T05:34:34.447Z","etag":null,"topics":["android","chart","docker","farm","helm","kubernetes","openstf"],"latest_commit_sha":null,"homepage":"https://medium.com/@Malinskiy/android-ci-with-kubernetes-684713a83eec","language":"Smarty","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agoda-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-12T06:31:57.000Z","updated_at":"2025-03-01T18:40:02.000Z","dependencies_parsed_at":"2022-08-30T11:32:16.152Z","dependency_job_id":null,"html_url":"https://github.com/agoda-com/android-farm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agoda-com/android-farm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoda-com%2Fandroid-farm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoda-com%2Fandroid-farm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoda-com%2Fandroid-farm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoda-com%2Fandroid-farm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agoda-com","download_url":"https://codeload.github.com/agoda-com/android-farm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agoda-com%2Fandroid-farm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262352531,"owners_count":23297680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","chart","docker","farm","helm","kubernetes","openstf"],"created_at":"2024-11-06T08:20:13.171Z","updated_at":"2025-06-28T00:03:11.013Z","avatar_url":"https://github.com/agoda-com.png","language":"Smarty","funding_links":[],"categories":[],"sub_categories":[],"readme":"# android-farm\nAndroid devices farm with USB and emulated devices support\n\n## TL;DR;\n\n```console\n$ helm install openstf\n```\n\n## Introduction\n\nThis project contains a chart that bootstraps an OpenSTF deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.\n\n# Prerequisites\n- Kubernetes cluster with KVM-capable nodes for emulators\n- [helm](https://helm.sh)\n- [rethinkdb installation](https://github.com/kubernetes/charts/tree/master/stable/rethinkdb)\n- [adb-butler](https://github.com/agoda-com/adb-butler) image\n- [docker-emulator-android](https://github.com/agoda-com/docker-emulator-android) images\n\n## Installing the Chart\n\nTo install the chart with the release name `my-release`:\n\n```console\n$ helm install --name my-release openstf\n```\n\nThe command deploys OpenSTF on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.\n\nYou need to set `emulators.imagePrefix` and `adb.image.repository` values to the images of [docker-emulator-android](https://github.com/agoda-com/docker-emulator-android) and [adb-butler](https://github.com/agoda-com/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:\n\n```console\n$ helm install --name openstf -f openstf/values.yaml \\\n    --set emulators.imagePrefix=docker-registry/agoda/docker-emulator-android- \\\n    --set emulators.imageVersion=1.0.0 \\\n    --set adb.image.repository=docker-registry/agoda/adb-butler \\\n    --set pullSecret=docker-registry-secret \\\n    --set ingress.enabled=true \\\n    --set ingress.hostname=openstf.svc.cluster.local \\\n    --set ingress.ssl.enabled=true \\\n    --set ingress.ssl.secret=ssl-secret \\\n    --set rethinkdb.password=strongpassword \\\n    openstf\n```\n\n\u003e **Tip**: List all releases using `helm list`\n\n## Uninstalling the Chart\n\nTo uninstall/delete the `my-release` deployment:\n\n```console\n$ helm delete my-release\n```\n\nThe command removes all the Kubernetes components associated with the chart and deletes the release.\n\n# Nodes configuration\nYou need to label and taint the usb provider nodes and kvm nodes as following\n\nUSB providers:\n```\n$ kubectl label nodes node-x.cluster.local openstf.io/provider=true\n$ kubectl taint nodes node-x.cluster.local openstf.io/provider=true:NoSchedule\n```\n\nEmulator nodes:\n```\n$ kubectl label nodes node-x.cluster.local openstf.io/emulator=kvm\n```\n\n# Configuration\n\nThe following tables lists the configurable parameters of the openstf chart and their default values.\n\nParameter | Description | Default\n--- | --- | ---\n`stf.image.repository` | OpenSTF container image repository | `openstf/stf`\n`stf.image.tag` | OpenSTF container image tag | `v3.2.0`\n`stf.image.pullPolicy` | OpenSTF container image pull policy | `IfNotPresent`\n`stf.api.replicas` | Desired number of API pods | `3`\n`stf.app.replicas` | Desired number of app pods | `1`\n`stf.auth.replicas` | Desired number of auth pods | `1`\n`stf.processor.replicas` | Desired number of processor pods | `5`\n`stf.reaper.replicas` | Desired number of reaper pods | `1`\n`stf.apkStorage.replicas` | Desired number of apk-storage pods | `1`\n`stf.imgStorage.replicas` | Desired number of image-storage pods | `1`\n`stf.storage.replicas` | Desired number of storage pods | `1`\n`stf.triproxyDev.replicas` | Desired number of triproxy-dev pods | `1`\n`stf.triproxyApp.replicas` | Desired number of triproxy-app pods | `1`\n`stf.websocket.replicas` | Desired number of websocket pods | `1`\n`nginx.image.repository` | nginx container image repository | `nginx`\n`nginx.image.tag` | nginx container image repository tag | `1.13.8-alpine`\n`nginx.image.pullPolicy` | nginx container image pullPolicy | `IfNotPresent`\n`nginx.replicas` | Desired number of nginx pods | `1`\n`adb.image.repository` | adb-butler container image repository | `agoda/adb-butler`\n`adb.image.tag` | adb-butler container image repository tag | `latest`\n`adb.image.pullPolicy` | adb-butler container image pullPolicy | `Always`\n`db.url` | URL of RethinkDB  | `rethinkdb-rethinkdb-proxy.openstf`\n`db.port` | TCP port of RethinkDB | `28015`\n`db.password` | RethinkDB password | `rethinkdb`\n`dns.resolver` | Address of DNS server | `kube-dns.kube-system`\n`pullSecret` | Pull secret for pulling all the images | `\"\"`\n`ingress.enabled` | Enable ingress controller resource | `false`\n`ingress.annotations` | Custom annotations on ingress resource | `nginx.org/websocket-services: nginx`\n`ingress.hostname` | Hostname to your OpenSTF installation | `openstf.local`\n`ingress.ssl.enabled` | Utilize TLS backend in ingress | `false`\n`ingress.ssl.secret` | TLS Secret (certificates) | `openstf.local-tls-secret`\n`emulators.imagePrefix` | Prefix of docker android container image  | `agoda/docker-emulator-android-`\n`emulators.imageVersion` | Docker android container image tag | `25`\n`emulators.pullPolicy` | Docker android container image pull policy | `IfNotPresent`\n`emulator.types` | Types of docker android emulators to spawn | `see below for more info`\n`telegraf.image.repository` | telegraf container image repository | `telegraf`\n`telegraf.image.tag` | telegraf container image repository tag | `1.5-alpine`\n`telegraf.image.pullPolicy` | telegraf container image pullPolicy | `IfNotPresent`\n`telegraf.config.outputs.prometheus.enabled` | provide prometheus metrics on provider pods | `true`\n\n\u003e **Tip**: You can use the default [values.yaml](openstf/values.yaml)\n\n## Pod resources\nAll the pods have sane default resources set. To customize check the [values.yaml](openstf/values.yaml)\n\n## Emulators\nIn 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.\n\n```YAML\n- name: tablet7i\n  note: ci/uiTest/tablet/7inch\n  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;\"\n  instances:\n  - version: 26\n    count: 3\n  - version: 19\n    count: 3\n```\n\nBy default you'll have phones with API versions 17 to 26 and 7' + 10' tablets with API version 25.\n\n# License\n\nandroid-farm is open source and available under the [Apache License, Version 2.0](LICENSE).\n\nOpenSTF is open source and available under the [Apache License, Version 2.0](https://github.com/openstf/stf/blob/master/LICENSE)\n\nAndroid SDK components are available under the [Android Software Development Kit License](https://developer.android.com/studio/terms.html)\n\n# Related projects\n\nThe emulators are spawned using the\n[docker-emulator-android](https://github.com/agoda-com/docker-emulator-android) container image\n\nDefault adb side container image with self-healing and metrics is [adb-butler](https://github.com/agoda-com/adb-butler)\n\nConnecting to OpenSTF devices with filtering support and reconnect logic is done using [stf-client](https://github.com/Malinskiy/stf-client)\n\n[fork](https://github.com/agoda-com/fork) is an instrumentation runner with support for reconnecting to adb devices on-the-go and more\n\n[example of ci agent container](https://github.com/Malinskiy/docker-android)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagoda-com%2Fandroid-farm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagoda-com%2Fandroid-farm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagoda-com%2Fandroid-farm/lists"}