-
Notifications
You must be signed in to change notification settings - Fork 2
/
defaults.jinja
99 lines (93 loc) · 2.92 KB
/
defaults.jinja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{% load_yaml as defaults %}
emulator:
image: us-docker.pkg.dev/android-emulator-268719/images/30-google-x64-no-metrics
tag: 7148297
# tag: 7148297 is latest (from 17.02.2021)
emulator_build:
name: android-emulator
image: localhost/android/emulator
tag: latest
type: build
build:
source: .
files:
build/Dockerfile:
contents: |
FROM us-docker.pkg.dev/android-emulator-268719/images/30-google-x64-no-metrics:7148297
COPY ./launch-emulator.sh /android/sdk/launch-emulator.sh
RUN chmod +x /android/sdk/launch-emulator.sh
RUN mv /android-home /android-home-default
RUN sed -r -i -e "s/^disk.dataPartition.size=.+//g" /android-home-default/Pixel2.avd/config.ini
RUN install -o 1000 -g 1000 -m "777" -d /android-home
build/launch-emulator.sh:
source: salt://android/emulator/launch-emulator.sh
emulator_desktop:
name: android-emulator-desktop
image: localhost/android/emulator
type: desktop
desktop:
template: host
options:
- --group-add kvm
entry:
Comment: Android Emulator Desktop Version
Terminal: "true"
Icon: applications-internet
Categories: Network;
Keywords: android;emulator;
environment:
NO_FORWARD_LOGGERS: "true"
NO_PULSE_AUDIO: "false"
AVD_DATA_SIZE: "disk.dataPartition.size=536870912"
# use host gpu for desktop emulator
EMULATOR_PARAMS: "-accel on -no-snapshot -no-boot-anim -gpu host -memory 2048"
ADD_EMULATOR_PARAMS: ""
labels:
android: emulator
storage:
- name: ${SERVICE_NAME}_data
volumes:
- ${SERVICE_NAME}_data:/android-home
publish:
- 127.0.0.1:8554:8554/tcp
- 127.0.0.1:5555:5555/tcp
options:
- --device /dev/kvm
emulator_headless_service:
name: android-emulator-headless
image: localhost/android/emulator
type: service
environment:
NO_FORWARD_LOGGERS: "true"
NO_PULSE_AUDIO: "true"
AVD_CONFIG: "disk.dataPartition.size=536870912"
EMULATOR_PARAMS: "-nowindow -accel on -no-snapshot -no-boot-anim -gpu swiftshader_indirect -memory 2048"
ADD_EMULATOR_PARAMS: ""
storage:
- name: ${SERVICE_NAME}_data
volumes:
- ${SERVICE_NAME}_data:/android-home
publish:
- 127.0.0.1:8554:8554/tcp
- 127.0.0.1:5555:5555/tcp
options:
- --device /dev/kvm
emulator_webrtc_service:
name: android-emulator-webrtc
image: localhost/android/emulator
type: service
environment:
NO_FORWARD_LOGGERS: "true"
NO_PULSE_AUDIO: "false"
AVD_CONFIG: "disk.dataPartition.size=536870912"
EMULATOR_PARAMS: "-nowindow -accel on -no-snapshot -no-boot-anim -gpu swiftshader_indirect -memory 2048"
ADD_EMULATOR_PARAMS: ""
storage:
- name: ${SERVICE_NAME}_data
volumes:
- ${SERVICE_NAME}_data:/android-home
options:
- --device /dev/kvm
{% endload %}
{% set settings=salt['grains.filter_by']({'default': defaults},
grain='default', default= 'default', merge= salt['pillar.get']('android', {})) %}