Skip to content

Commit 59c1a14

Browse files
committed
browser-emulator: fix permission issues on AMI
1 parent 5080442 commit 59c1a14

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

browser-emulator/aws/EC2-browser-emulator.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ Resources:
4848
git checkout ${GitRef}
4949
echo 'AWS_STACK=${AWS::StackId}' | sudo tee -a /etc/environment
5050
echo 'AWS_REGION=${AWS::Region}' | sudo tee -a /etc/environment
51-
chmod +x ./prepare_scripts/*.sh
52-
chmod +x ./*.sh
53-
./prepare_scripts/install_base.sh > /var/log/install.log 2>&1
5451
if [ "${CacheMediaFilesArgs}" != "__disabled__" ]; then
5552
if [ "${CacheMediaFilesArgs}" = "__enabled__" ]; then
5653
./prepare_scripts/download_mediafiles.sh > /var/log/download_mediafiles.log 2>&1
5754
else
5855
./prepare_scripts/download_mediafiles.sh ${CacheMediaFilesArgs} > /var/log/download_mediafiles.log 2>&1
5956
fi
6057
fi
58+
chmod +x ./prepare_scripts/*.sh
59+
chmod +x ./*.sh
60+
./prepare_scripts/install_base.sh > /var/log/install.log 2>&1
6161
echo "@reboot cd /opt/openvidu-loadtest/browser-emulator && CI=true pnpm install > /var/log/pnpm_install.log 2>&1 && pnpm run build > /var/log/build.log 2>&1 && pnpm run start:prod > /var/log/crontab.log 2>&1" 2>&1 | crontab -u ubuntu -
6262
apt-get install -y python3-pip linux-aws-edge
6363
./notify-aws.sh > /var/log/notify_aws.log 2>&1

browser-emulator/prepare_scripts/install_base.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ snap remove firefox
4747
mkdir -p ./recordings/chrome
4848
mkdir -p ./recordings/qoe
4949

50-
# Add user ubuntu to docker, video and syslog groups
51-
if id "ubuntu" &>/dev/null; then
52-
usermod -aG docker ubuntu
53-
usermod -aG syslog ubuntu
54-
usermod -aG video ubuntu
55-
chown -R ubuntu:ubuntu /opt/openvidu-loadtest/
56-
fi
57-
5850
install_node_dependencies_and_build() {
5951
## Install node dependencies
6052
corepack enable pnpm
@@ -77,4 +69,12 @@ pull_images &
7769
install_node_dependencies_and_build &
7870
wait
7971

72+
# Add user ubuntu to docker, video and syslog groups
73+
if id "ubuntu" &>/dev/null; then
74+
usermod -aG docker ubuntu
75+
usermod -aG syslog ubuntu
76+
usermod -aG video ubuntu
77+
chown -R ubuntu:ubuntu /opt/openvidu-loadtest/
78+
fi
79+
8080
echo "base installation completed"

0 commit comments

Comments
 (0)