Skip to content
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

Update cloudformation config to use pdm export instead of venv #6478

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 3 additions & 3 deletions scripts/aws/cloudformation/tasking-manager.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ const Resources = {
'cd /opt/tasking-manager/',
cf.sub('git reset --hard ${GitSha}'),
'pip install --upgrade pip pdm==2.7.4',
'pdm export --prod > requirements.txt',
'wget -6 https://s3.dualstack.us-east-1.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz -O /tmp/aws-cfn-bootstrap-py3-latest.tar.gz',
'pip install /tmp/aws-cfn-bootstrap-py3-latest.tar.gz',
'pdm install',
'eval "$(pdm venv activate)"',
'pip install --user -r requirements.txt',
'echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf',
'export LC_ALL=C',
'wget -6 https://s3.dualstack.us-east-1.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb -O /tmp/amazon-cloudwatch-agent.deb',
Expand Down Expand Up @@ -474,7 +474,7 @@ const Resources = {
cf.sub('export TM_IMAGE_UPLOAD_API_KEY="${TaskingManagerImageUploadAPIKey}"'),
'psql "host=$POSTGRES_ENDPOINT dbname=$POSTGRES_DB user=$POSTGRES_USER password=$POSTGRES_PASSWORD" -c "CREATE EXTENSION IF NOT EXISTS postgis"',
cf.if('DatabaseDumpFileGiven', cf.sub('aws s3 cp ${DatabaseDump} dump.sql; sudo -u postgres psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_ENDPOINT/$POSTGRES_DB" < dump.sql'), ''),
'pdm run -vv flask db upgrade',
'flask db upgrade',
'echo "------------------------------------------------------------"',
cf.sub('export NEW_RELIC_LICENSE_KEY="${NewRelicLicense}"'),
cf.sub('export TM_SENTRY_BACKEND_DSN="${SentryBackendDSN}"'),
Expand Down
Loading