Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,26 @@ hooks:
# During the BeforeInstall deployment lifecycle event, run the commands
# in the script specified in "location".
BeforeInstall:
#- location: scripts/backup
#- location: deploy_scripts/backup
# timeout: 300
# runas: root
- location: scripts/install_dependencies
- location: deploy_scripts/install_dependencies
timeout: 300
runas: root
# During the AfterInstall deployment lifecycle event, run the commands
# in the script specified in "location".
AfterInstall:
- location: scripts/config_files
- location: deploy_scripts/config_files
timeout: 300
runas: root
- location: scripts/start_services
- location: deploy_scripts/start_services
timeout: 300
runas: root
# During the ApplicationStop deployment lifecycle event, run the commands
# in the script specified in "location" starting from the root of the
# revision's file bundle.
ApplicationStop:
- location: scripts/stop_services
timeout: 300
runas: root
# ApplicationStop:
# - location: deploy_scripts/stop_services
# timeout: 300
# runas: root

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
groovyVersion = '2.4.12'
gebVersion = '2.2'
seleniumVersion = '3.6.0'
chromeDriverVersion = '97.0.4692.71'
chromeDriverVersion = '114.0.5735.90'
geckoDriverVersion = '0.23.0'
}
}
Expand Down
File renamed without changes.
24 changes: 24 additions & 0 deletions deploy_scripts/config_files
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
#Changing the executor permissions
sudo chown -R ubuntu:ubuntu /home/ubuntu/projects/executor

#Setting the cloud key
#The cloud key it's located in a external config.json file
if [[ -f "/home/ubuntu/config.json" ]]; then
echo "Config File exists"

#Changing portal route to the proper one in the config file
muuktestRoute=$(cat /home/ubuntu/config.json | jq -r '.BERoute')
echo $muuktestRoute
if [[ "$muuktestRoute" != "null" ]]; then
#Change the BE route in the mkcli.py file
sudo sed -i "s_https://portal.muuktest.com:8081_"$muuktestRoute"_" /home/ubuntu/projects/executor/mkcli.py
fi

# Adding the cloudKey in the mkcloud.py file
cloudKey=$(cat /home/ubuntu/config.json | jq -r '.cloudKey')
if [[ "$cloudKey" != "null" ]]; then
sudo sed -i '$ a def getCloudKey():' /home/ubuntu/projects/executor/mkcloud.py
sudo sed -i "$ a \ \ return('$cloudKey')" /home/ubuntu/projects/executor/mkcloud.py
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ sudo pip3 install BeautifulSoup4
sudo apt -y install xvfb
#Installing firefox
sudo apt -y install firefox
#Installing google chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt -y install ./google-chrome-stable_current_amd64.deb
sudo apt-get install google-chrome-stable
sudo rm google-chrome-stable_current_amd64.deb
#Installing ffmpeg
sudo apt -y install ffmpeg
#Installing request
pip3 install request
#Installing jq to read json files
sudo apt -y install jq
sudo apt -y install jq
#Installing lxml
sudo pip3 install lxml
#Installing Google 114
wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.198-1_amd64.deb
sudo dpkg -i google-chrome-stable_114.0.5735.198-1_amd64.deb
sudo rm google-chrome-stable_114.0.5735.198-1_amd64.deb
4 changes: 2 additions & 2 deletions scripts/start_services → deploy_scripts/start_services
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
sudo chmod 777 /home/ubuntu/projects/executor/gradlew
# sudo chmod 777 /home/ubuntu/projects/executor/gradlew
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I's now needed right now, that's why I commented out.
At the first time I added this line because when trying to execute a test after the deploy it causes an error of permissions since the aws agent starts the deploy as root and the support project starts the execution as ubuntu user.

Now it's changing the owner of the executor project to ubuntu in line 3 of the deploy_scripts/config_files

Xvfb :99 -screen 0 1366x768x16 &

#Starting queue service in case it is needed
# Starting queue service in case it is needed
serviceStatus=`systemctl is-active muuktest-queued.service`
queueServiceFile=/lib/systemd/system/muuktest-queued.service
if [[ "$serviceStatus" != 'active' ]] && [ -f "$queueServiceFile" ]; then
Expand Down
File renamed without changes.
29 changes: 0 additions & 29 deletions scripts/config_files

This file was deleted.