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

Add variables for each deployment #38

Closed
wants to merge 5 commits into from
Closed

Add variables for each deployment #38

wants to merge 5 commits into from

Conversation

xmunoz
Copy link
Contributor

@xmunoz xmunoz commented Dec 31, 2020

- Untar repositories into a temp directory, then rsync to deploy location
- Clean up temp packages and files
- Fix #34
@xmunoz xmunoz force-pushed the fix_deployment branch 4 times, most recently from c570b25 to 51d4c5f Compare December 31, 2020 04:51
synchronize doesn't really work when src and dest are both remote
Also, use root to remove temp dir
@xmunoz
Copy link
Contributor Author

xmunoz commented Dec 31, 2020

Successful image build action: https://github.com/PermanentOrg/infrastructure/actions/runs/453964464

I just deployed the new dev AMI this morning, and it looks good from the user perspective. We can confirm this together on the call later, since I no longer have SSH access.

Still need to test just the code deploy action.

@xmunoz
Copy link
Contributor Author

xmunoz commented Dec 31, 2020

Just deployed dev from this branch, and it appears to work (the queue issue is now fixed): https://github.com/PermanentOrg/infrastructure/runs/1631265467?check_suite_focus=true

- website
command: "aws s3 cp s3://permanent-repos/{{ perm_env }}/{{ item }}.tar.gz {{ temp_dir }}/{{ item }}.tar.gz"
loop: "{{ repos }}"
- name: Create temp untar dir
Copy link
Member

Choose a reason for hiding this comment

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

I would have thought this would come before the "copy from S3" command, so the tars have somewhere to land - what am I missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like the previous command aws s3 cp creates that missing directory. We can remove the step that explicitly creates it, since it does nothing according to the ansible log:

TASK [Create temp untar dir] ***************************************************
task path: /home/runner/work/infrastructure/infrastructure/provisioners/deploy-cron.yml:28
ok: [ec2-34-220-107-44.***.compute.amazonaws.com] => {"changed": false, "gid": 1005, "group": "deployer", "mode": "0755", "owner": "deployer", "path": "/data/tmp/www", "size": 4096, "state": "directory", "uid": 1005}

@cecilia-donnelly cecilia-donnelly self-assigned this Mar 31, 2021
@cecilia-donnelly
Copy link
Member

Closing this because it is so out-of-date. Will reopen and adjust when needed!

@jasonaowen jasonaowen deleted the fix_deployment branch February 9, 2022 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove code dir before untar-ing
3 participants