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

Fix remote deployment script #956

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

dacook
Copy link
Member

@dacook dacook commented Nov 4, 2024

This issue was caused because I took the shortcut to provision all three servers at once:

ansible-playbook playbooks/setup_remote_deployment.yml -l all_staging

The playbook assumed that the limit param only refers to the current server, and pastes it into the deploy script. So I've updated it to specify only a reference to itself.

This script template is generated and saved on each server, with the name of itself.
If the playbook was being executed on multiple servers at once, it was saving the name of all servers here, which is not right! Now it will only save the name of the current server.

It now uses the domain name instead of group name (eg staging.openfoodnetwork.org.uk instead of uk_staging).
@dacook dacook self-assigned this Nov 4, 2024
@dacook
Copy link
Member Author

dacook commented Nov 4, 2024

I've tested on uk_staging. All looks good

ofn-admin@uk-staging:~$ sudo less /home/ofn-deploy/deploy
...
# Deploy
ansible-playbook playbooks/deploy.yml --limit staging.openfoodnetwork.org.uk --connection local -e "git_repo=https://github.com/openfoodfoundation/openfoodnetwork.git git_version=$deploy"
(END)

Copy link
Contributor

@rioug rioug left a comment

Choose a reason for hiding this comment

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

👍

@dacook dacook merged commit 3a50ff3 into openfoodfoundation:master Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants