-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Integration Testing] PEcAn Docker Stack Run : Single Site, Single Model #3345
Open
meetagrawal09
wants to merge
48
commits into
PecanProject:develop
Choose a base branch
from
meetagrawal09:model-run-workflow
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 38 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
6934bc9
added model run
meetagrawal09 652d81e
trial
8b36096
trial
c70a06e
Accepted Suggestions
meetagrawal09 2e39f1c
Added wait time
meetagrawal09 9db5d2e
Bug fix
meetagrawal09 d194e21
Shifted to executor
meetagrawal09 b94bda7
Merge branch 'develop' into model-run-workflow
meetagrawal09 e8a359a
Merge branch 'develop' into model-run-workflow
meetagrawal09 266f0c6
Trying run by avoiding creating a user
meetagrawal09 d3557ef
Create docker compose override
meetagrawal09 c8ba82e
Remove docker images
meetagrawal09 a389dd6
Merge branch 'develop' into model-run-workflow
meetagrawal09 c78e999
Trying free-disk-space action
meetagrawal09 3c6d30a
typo
meetagrawal09 51060d7
trying rstudio container
meetagrawal09 d845de3
trial
meetagrawal09 3c51a46
trial
meetagrawal09 d3f835e
Removing entry for volume
meetagrawal09 363edd8
moved to executor
meetagrawal09 724160b
bug fix
meetagrawal09 76e5607
bug fix
meetagrawal09 d9ae803
Merge branch 'develop' into model-run-workflow
meetagrawal09 eb896d1
clean-up
meetagrawal09 0b6b71d
bug fix
meetagrawal09 87752b4
updated output dir
meetagrawal09 6ffefd2
Removed sleep
meetagrawal09 6771566
Keeping sleep with a comment
meetagrawal09 e4007f5
Update workflow name
meetagrawal09 998cce7
Merge branch 'develop' into model-run-workflow
meetagrawal09 b4f6d09
updated settings
meetagrawal09 824bb65
Merge branch 'develop' into model-run-workflow
meetagrawal09 a06e01b
Merge branch 'develop' into model-run-workflow
meetagrawal09 5896395
Merge branch 'develop' into model-run-workflow
infotroph c6d38df
Removing sleep -> relying on healthchecks
meetagrawal09 8556f5b
Adding sleep for testing
meetagrawal09 0bc2c78
Using model name
meetagrawal09 a55143d
Running add models script
meetagrawal09 69c27d6
Run add.models.sh
meetagrawal09 a949401
Merge branch 'develop' into model-run-workflow
meetagrawal09 2a3d512
Merge branch 'develop' into model-run-workflow
meetagrawal09 3fa4084
Merge branch 'develop' into model-run-workflow
meetagrawal09 7391456
trying out monitor
meetagrawal09 41f76bc
Merge branch 'develop' into model-run-workflow
meetagrawal09 0236356
moving to guest queue
meetagrawal09 5062635
testing without queue
meetagrawal09 33e3393
run rabbitmq container
meetagrawal09 9e8fba5
updated settings
meetagrawal09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name : Docker Stack Model Test | ||
on : | ||
pull_request: | ||
|
||
# allow manual triggering | ||
workflow_dispatch: | ||
|
||
schedule: | ||
# run Thursday 4:30 AM UTC | ||
- cron: '30 4 * * 4' | ||
jobs: | ||
sipnet: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
docker-images: false | ||
swap-storage: true | ||
|
||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Compose | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install docker-compose | ||
|
||
- name: Add Volumes to Executor | ||
run: | | ||
cp docker-compose.dev.yml docker-compose.override.yml | ||
sed -i'' '/R_library/d' docker-compose.override.yml | ||
|
||
- name: Build Containers | ||
run: | | ||
cp docker/env.example .env | ||
echo "COMPOSE_PROJECT_NAME=pecan" >> .env | ||
echo "PECAN_VERSION=develop" >> .env | ||
echo "UID=$(id -u)" >> .env | ||
echo "GID=$(id -g)" >> .env | ||
|
||
docker compose up --wait -d postgres | ||
docker run --rm --network pecan_pecan pecan/db:ci | ||
docker run --rm --network pecan_pecan --volume pecan_pecan:/data --env FQDN=docker pecan/data:develop | ||
docker image rm pecan/db:ci pecan/data:develop | ||
|
||
- name: Run required containers | ||
run: | | ||
docker compose up --wait -d sipnet executor | ||
|
||
- name: List running containers | ||
run: | | ||
sleep 50 | ||
docker ps | ||
|
||
- name: Add models | ||
run: | | ||
docker compose exec --workdir /pecan/scripts executor sh add.models.sh | ||
|
||
- name: Run SIPNET | ||
run: | | ||
docker compose exec --workdir /pecan/tests executor R CMD ../web/workflow.R --settings docker-ghaction.sipnet.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0"?><pecan> | ||
<outdir>/tmp/docker_stack_tests/sipnet</outdir> | ||
<database> | ||
<bety> | ||
<user>bety</user> | ||
<password>bety</password> | ||
<host>postgres</host> | ||
<port>5432</port> | ||
<dbname>bety</dbname> | ||
<driver>PostgreSQL</driver> | ||
<write>true</write> | ||
</bety> | ||
<dbfiles>/data/dbfiles</dbfiles> | ||
</database> | ||
<pfts> | ||
<pft> | ||
<name>semiarid.grassland</name> | ||
</pft> | ||
</pfts> | ||
<meta.analysis> | ||
<iter>3000</iter> | ||
<random.effects> | ||
<on>FALSE</on> | ||
<use_ghs>TRUE</use_ghs> | ||
</random.effects> | ||
</meta.analysis> | ||
<ensemble> | ||
<size>1</size> | ||
<variable>NPP</variable> | ||
<samplingspace> | ||
<parameters> | ||
<method>uniform</method> | ||
</parameters> | ||
<met> | ||
<method>sampling</method> | ||
</met> | ||
</samplingspace> | ||
</ensemble> | ||
<model> | ||
<name>SIPNET</name> | ||
<revision>git</revision> | ||
</model> | ||
<run> | ||
<site> | ||
<id>2000001297</id> | ||
<met.start>2004/01/01</met.start> | ||
<met.end>2004/12/31</met.end> | ||
</site> | ||
<inputs> | ||
<met> | ||
<source>CRUNCEP</source> | ||
<output>SIPNET</output> | ||
<product/> | ||
</met> | ||
</inputs> | ||
<start.date>2004/01/01</start.date> | ||
<end.date>2004/12/31</end.date> | ||
</run> | ||
<host> | ||
<name>localhost</name> | ||
<rabbitmq> | ||
<uri>amqp://carya:illinois@rabbitmq/%2F</uri> | ||
<queue>SIPNET_r136</queue> | ||
</rabbitmq> | ||
</host> | ||
</pecan> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest logs are showing that the executor image doesn't have psql installed.
There are probably better ways, but I think this should work:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting to suspect I'm sending you on a goose chase here. Hey @robkooper is this the right approach or should we instead be, like, starting the monitor service and waiting for it to register sipnet for us? If so what would that look like here?