Compare commits

..

2 commits

Author SHA1 Message Date
65eaa031dd Speed up deploys with Ansible's pipelining option
The main bottleneck for us is still just uploading the full source code,
there might be some clever option I'm not using for that yet of like,
compression or something? But this change did take the process down
from like 5 minutes to 3 minutes, so, works for me!
2024-09-06 12:22:28 -07:00
2e7bdc47d7 Move some Ansible config out of scripts and into ansible.cfg
My immediate motivation is that I'm going to try turning on the
pipelining setting, to improve performance, and I'd like to have the
consistent place to put it! But also, I like standardizing our setup a
bit more, too
2024-09-06 12:16:26 -07:00
3 changed files with 9 additions and 2 deletions

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Deploy a new version to production, using the Ansible playbook in `deploy/deploy.yml`. # Deploy a new version to production, using the Ansible playbook in `deploy/deploy.yml`.
# This skips the build step that normally runs when you just call `bin/deploy`. # This skips the build step that normally runs when you just call `bin/deploy`.
ansible-playbook -i deploy/inventory.cfg deploy/deploy.yml cd $(dirname $0)/../deploy && ansible-playbook deploy.yml

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Set up the deployment environment, using the Ansible playbook in `deploy/setup.yml`. # Set up the deployment environment, using the Ansible playbook in `deploy/setup.yml`.
echo $'Setup requires you to become the root user. You\'ll need to enter the password for your account on the remote web server below, and you must be part of the `sudo` user group.' echo $'Setup requires you to become the root user. You\'ll need to enter the password for your account on the remote web server below, and you must be part of the `sudo` user group.'
ansible-playbook -K -i deploy/inventory.cfg deploy/setup.yml cd $(dirname $0)/../deploy && ansible-playbook -K setup.yml

7
deploy/ansible.cfg Normal file
View file

@ -0,0 +1,7 @@
[defaults]
inventory = inventory.cfg
[ssh_connection]
# Pipelining is an optimization that's off by default for compatibility, but runs
# playbooks much faster when it's available. It works in our case, so use it!
pipelining = True