Skip to content

Commit

Permalink
Merge pull request #142 from zebrunner/develop
Browse files Browse the repository at this point in the history
2.3 rc
  • Loading branch information
vdelendik authored Aug 19, 2022
2 parents 7e6d5d4 + 6b4525e commit 6a84eba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 23 deletions.
27 changes: 10 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feel free to support the development with a [**donation**](https://www.paypal.co
## Software prerequisites
* Install docker ([Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04), [Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04), [Ubuntu 20.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04), [Amazon Linux 2](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html), [Redhat/Cent OS](https://www.cyberciti.biz/faq/install-use-setup-docker-on-rhel7-centos7-linux/)).
* Install 2.9.6+ ansible ([Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-16-04), [Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-18-04), [Ubuntu 20.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-20-04)).
* Install and start usbmuxd service to be able to connect iOS devices.
* Install usbmuxd service to be able to connect iOS devices

## Initial setup
* Run `./zebrunner.sh setup` script.
Expand Down Expand Up @@ -50,23 +50,16 @@ Feel free to support the development with a [**donation**](https://www.paypal.co

### iOS devices

#### Adjust usbmuxd service
#### Mask usbmuxd service

1. Disable exit of usbmuxd service on disconnect of latest iOS device commenting in `/lib/udev/rules.d/39-usbmuxd.rules` such lines:
```
## Exit usbmuxd when the last device is removed
#ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/12[9a][0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="/usr/sbin/usbmuxd -x"
```

2. Add restart policy and ExecStartPost command updating `/lib/systemd/system/usbmuxd.service`:
```
[Service]
Type=simple
ExecStart=/usr/sbin/usbmuxd --user usbmux --systemd
ExecStartPost=/usr/local/bin/zebrunner-farm restart ios
Restart=always
PIDFile=/var/run/usbmuxd.pid
```
```
sudo systemctl mask usbmuxd
sudo systemctl status usbmuxd
->
● usbmuxd.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
```

#### [Optional] Supervise device

Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
DEVICE_IMAGE: zebrunner/mcloud-device
DEVICE_VERSION: 2.2.2
DEVICE_VERSION: 2.3

APPIUM_IMAGE: public.ecr.aws/zebrunner/appium
APPIUM_VERSION: 1.4.5
APPIUM_VERSION: 1.4.6

DEVELOPER_IMAGES: {12.0, 12.1, 12.2, 12.3, 12.4, 13.0, 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 14.0, 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 15.0, 15.1, 15.2, 15.3, 15.4, 15.5}
7 changes: 3 additions & 4 deletions roles/devices/templates/zebrunner-farm
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function create_containers () {
local net={{ STF_DOCKER_NETWORK }}

docker network inspect ${net} >/dev/null 2>&1 || docker network create ${net}
usb_bus=`readlink -f /dev/device-${device_name}-${udid}`
#echo "usb_bus: ${usb_bus}"

if [ $platform_name == "android" ]; then
docker run -itd --name device-${device_name}-${udid}-appium --network ${net} \
Expand Down Expand Up @@ -123,8 +125,7 @@ function create_containers () {
--restart on-failure \
-v appium-storage-volume:/opt/appium-storage \
-v mcloud-storage-volume:/opt/zebrunner \
-v /var/run/usbmuxd:/var/run/usbmuxd \
-v /var/lib/lockdown:/var/lib/lockdown \
--device=/dev/device-${device_name}-${udid}:${usb_bus} \
-v "{{ WDA_IPA_PATH }}:/opt/WebDriverAgent.ipa" \
-e APPIUM_CLI="--session-override" \
-e WDA_ENV=/opt/zebrunner/wda-${udid}.env \
Expand Down Expand Up @@ -155,8 +156,6 @@ function create_containers () {
--restart on-failure \
--link device-${device_name}-${udid}-appium:appium \
-v mcloud-storage-volume:/opt/zebrunner \
-v /var/run/usbmuxd:/var/run/usbmuxd \
-v /var/lib/lockdown:/var/lib/lockdown \
-e WDA_ENV=/opt/zebrunner/wda-${udid}.env \
-e WDA_WAIT_TIMEOUT=180 \
-e PLATFORM_NAME=$platform_name \
Expand Down

0 comments on commit 6a84eba

Please sign in to comment.