Skip to content

Commit

Permalink
add delay before starting calculation, so that the OS can start up re…
Browse files Browse the repository at this point in the history
…liably
  • Loading branch information
clezag committed Oct 23, 2023
1 parent e794ec6 commit 9f44fa1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/run_calculate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

# this used to be a wait (120 sec) to have the efs volume be mounted. If this makes problems, return to a wait 120
- name: Wait for instance to start up
run: |
aws ec2 wait instance-running --instance-ids ${{secrets.AWS_EC2_INSTANCE_ID }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

- name: Checkout source code
uses: noi-techpark/github-actions/checkout@v2

Expand Down Expand Up @@ -74,6 +65,18 @@ jobs:
X_CHARGER_BASEURL: "https://charger.otp.opendatahub.testingmachine.eu"
X_TRAFFIC_BASEURL: "https://traffic.otp.opendatahub.testingmachine.eu"

- name: Wait for instance to start up
run: |
aws ec2 wait instance-running --instance-ids ${{secrets.AWS_EC2_INSTANCE_ID }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}

# sometimes we try to log in before the OS is up, so let's wait 20 sec just to be sure
- name: Wait for system to boot
run: sleep 20

- name: Deploy / run calculation
uses: noi-techpark/github-actions/docker-deploy@v2
with:
Expand Down

0 comments on commit 9f44fa1

Please sign in to comment.