diff --git a/.github/workflows/forcingprocessor.yml b/.github/workflows/forcingprocessor.yml index 3aed84df..026b0ff3 100644 --- a/.github/workflows/forcingprocessor.yml +++ b/.github/workflows/forcingprocessor.yml @@ -27,6 +27,12 @@ jobs: uses: actions/setup-python@v3 with: python-version: "3.9" + + - name: Configure AWS + run: | + aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} + aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws configure set region us-east-1 - name: Install dependencies run: | diff --git a/.github/workflows/research_datastream_terraform.yml b/.github/workflows/research_datastream_terraform.yml index 64621487..1002b5a1 100644 --- a/.github/workflows/research_datastream_terraform.yml +++ b/.github/workflows/research_datastream_terraform.yml @@ -41,7 +41,7 @@ jobs: run: | cd research_datastream/terraform if ! aws ec2 describe-key-pairs --key-names "actions_key" --query 'KeyPairs[0].KeyName' --output text 2>/dev/null; then aws ec2 create-key-pair --key-name "actions_key" --query 'KeyName' --output text && echo "Key pair 'actions_key' created in AWS"; else echo "Key pair 'actions_key' already exists"; fi - execution_arn=$(aws stepfunctions start-execution --state-machine-arn $(cat ./sm_ARN.txt) --name docker_builder_$(env TZ=US/Eastern date +'%Y%m%d%H%M%S') --input "file://test/execution_gp_test.json" --region us-east-1 --query 'executionArn' --output text); echo "Execution ARN: $execution_arn"; status="RUNNING"; while [ "$status" != "SUCCEEDED" ]; do status=$(aws stepfunctions describe-execution --execution-arn "$execution_arn" --region us-east-1 --query 'status' --output text); echo "Current status: $status"; if [ "$status" == "FAILED" ]; then echo "State machine execution failed!"; exit 1; fi; sleep 5; done; echo "State machine execution succeeded!" + execution_arn=$(aws stepfunctions start-execution --state-machine-arn $(cat ./sm_ARN.txt) --name gp_test_$(env TZ=US/Eastern date +'%Y%m%d%H%M%S') --input "file://test/execution_gp_test.json" --region us-east-1 --query 'executionArn' --output text); echo "Execution ARN: $execution_arn"; status="RUNNING"; while [ "$status" != "SUCCEEDED" ]; do status=$(aws stepfunctions describe-execution --execution-arn "$execution_arn" --region us-east-1 --query 'status' --output text); echo "Current status: $status"; if [ "$status" == "FAILED" ]; then echo "State machine execution failed!"; exit 1; fi; sleep 5; done; echo "State machine execution succeeded!" - name: Tear down infra if: always() diff --git a/research_datastream/terraform/test/execution_gp_test.json b/research_datastream/terraform/test/execution_gp_test.json index 4a6322b6..bf659c0d 100644 --- a/research_datastream/terraform/test/execution_gp_test.json +++ b/research_datastream/terraform/test/execution_gp_test.json @@ -8,10 +8,10 @@ }, "instance_parameters" : { - "ImageId" : "ami-00e73ddc3a6fc7dfe", + "ImageId" : "ami-041f4ef35649c11b0", "InstanceType" : "t4g.nano", "KeyName" : "actions_key", - "SecurityGroupIds" : ["sg-0ab5f40d1eb97d163"], + "SecurityGroupIds" : ["sg-049e002d41bce813c"], "IamInstanceProfile": { "Name": "datastream_ec2_profile_github_actions" },