-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage_scenario_BASELINE_AND_IDLE.yml
More file actions
150 lines (139 loc) · 5.16 KB
/
Copy pathusage_scenario_BASELINE_AND_IDLE.yml
File metadata and controls
150 lines (139 loc) · 5.16 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
---
name: Nextcloud - MariaDB - Baseline & Idle - Firefox
author: Arne Tarara <arne@green-coding.io> + Didi Hoffmann <didi@green-coding.io>
description: Nexcloud Blue Angel Baseline & Idle Scenario with all apps installed
compose-file: !include compose.yml
services:
gcb-playwright:
image: greencoding/gcb_playwright:v21
depends_on:
app:
condition: service_healthy
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix # for debugging in non-headless mode
environment:
DISPLAY: ":0" # for debugging in non-headless mode
HOST_URL: https://ncs
command: [ "tail", "-f", "/dev/null" ] # keep container running
ncs:
mem_limit: 500MB # this should be enough and leaves room for the App container to have ~4 GB
relations:
server: # will be put in /tmp/relations/server
url: https://github.com/nextcloud/server
branch: master
text:
url: https://github.com/nextcloud/text
branch: main
# commit_hash: ghhkshfkjsdnfk # no commit means latest
spreed:
url: https://github.com/nextcloud/spreed
branch: main
# commit_hash: ghhkshfkjsdnfk # no commit means latest
contacts:
url: https://github.com/nextcloud/contacts
branch: main
# commit_hash: ghhkshfkjsdnfk # no commit means latest
calendar:
url: https://github.com/nextcloud/calendar
branch: main
# commit_hash: ghhkshfkjsdnfk # no commit means latest
viewer:
url: https://github.com/nextcloud/viewer
branch: master
flow:
- name: Patch config
container: app
hidden: true
commands:
- type: console
shell: bash
command: |
cat <<'EOF' > config/config.php
<?php
$CONFIG = array (
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://ncs',
'trusted_proxies' =>
array (
0 => 'ncs',
),
'trusted_domains' =>
array (
0 => 'ncs',
),
'upgrade.disable-web' => true,
'instanceid' => 'ocvb0i3uw47a',
);
EOF
- name: Install Nextcloud
container: gcb-playwright
hidden: true
commands:
- type: console
command: python3 /tmp/relations/text/green-metrics-tool/nextcloud_install.py firefox
- name: Install Apps
hidden: true
container: app
commands:
- type: console
command: |
mkdir /var/www/html/apps/viewer/
cp -r /tmp/relations/viewer/* /var/www/html/apps/viewer/
chown -R www-data:www-data /var/www/html/apps/viewer/
cd /var/www/html/apps/viewer/
sudo -u www-data npm ci
sudo -u www-data npm run build
sudo -u www-data php /var/www/html/occ app:enable viewer
shell: bash
- type: console
command: |
mkdir /var/www/html/apps/text/
cp -r /tmp/relations/text/* /var/www/html/apps/text/
chown -R www-data:www-data /var/www/html/apps/text/
cd /var/www/html/apps/text/
sudo -u www-data composer install --no-dev --no-scripts
sudo -u www-data make npm-init build-js-production
sudo -u www-data php /var/www/html/occ app:enable text
shell: bash
- type: console
command: |
mkdir /var/www/html/apps/spreed/
cp -r /tmp/relations/spreed/* /var/www/html/apps/spreed
chown -R www-data:www-data /var/www/html/apps/spreed/
cd /var/www/html/apps/spreed/
sudo -u www-data composer install --no-dev --no-scripts
sudo -u www-data npm ci
sudo -u www-data make build-js-production
sudo -u www-data php /var/www/html/occ app:enable spreed
shell: bash
- type: console
command: |
mkdir /var/www/html/apps/contacts/
cp -r /tmp/relations/contacts/* /var/www/html/apps/contacts
chown -R www-data:www-data /var/www/html/apps/contacts/
cd /var/www/html/apps/contacts/
sudo -u www-data composer install --no-dev --no-scripts
sudo -u www-data npm ci
sudo -u www-data npm run build
sudo -u www-data php /var/www/html/occ app:enable contacts
shell: bash
- type: console
command: |
mkdir /var/www/html/apps/calendar/
cp -r /tmp/relations/calendar/* /var/www/html/apps/calendar/
sed -i '/^module\.exports = webpackConfig$/e cat /tmp/repo/memory_patch.txt' /var/www/html/apps/calendar/webpack.config.js
chown -R www-data:www-data /var/www/html/apps/calendar/
cd /var/www/html/apps/calendar/
sudo -u www-data composer install --no-dev --no-scripts
sudo -u www-data npm ci
sudo -u www-data npm run build -- --parallelism 1
sudo -u www-data php /var/www/html/occ app:enable calendar
shell: bash
- name: Idle 3600
container: gcb-playwright
# we do not open the browser window, as the window is part of the automation tool, the browser and thus not part
# of the idle of the application. We would rather measure the idle of the automation mostly.
commands:
- type: console
command: sleep 3600
note: Idle 3600