aboutsummaryrefslogtreecommitdiff
path: root/scripts (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-06-10Output all generated files on ./generated/, refactor .envrc variablesEuAndreh5-52/+47
2019-06-10Store updated Terraform files in case of failureEuAndreh1-0/+8
2019-06-10Only send log email when running on CIEuAndreh1-0/+7
2019-06-10ci dbgEuAndreh1-1/+1
2019-06-10Fix missing stdout redirection '>' characterEuAndreh1-1/+1
2019-06-10Trust commited keyEuAndreh1-1/+2
2019-06-10Add filename to logs.txt outputEuAndreh1-1/+1
Taken from: https://stackoverflow.com/questions/5917413/concatenate-multiple-files-but-include-filename-as-section-headers
2019-06-10Put terraform output in email logs.txtEuAndreh1-3/+3
2019-06-10Commit public key instead of downloading itEuAndreh1-1/+1
2019-06-10Import GPG key before provisioningEuAndreh1-0/+1
2019-06-10Disable SC2016 warningsEuAndreh1-0/+2
2019-06-10Change order of stderr -> stdout redirectionEuAndreh1-2/+2
Thanks ShellCheck.
2019-06-10Encrypt attached logEuAndreh1-1/+3
2019-06-10Show in email subject if the run failedEuAndreh2-2/+16
2019-06-10Send logs via email after finishing provision.shEuAndreh3-2/+44
The email will be send for both sucessfull and failed runs.
2019-06-10Remove --progress from borg createEuAndreh1-1/+0
It shows filenames in CI output log.
2019-06-10Use create_known_hosts_file function instead of duplicating behaviourEuAndreh1-3/+6
2019-06-10Fail CI run if backup failsEuAndreh1-3/+3
2019-06-10Don't run restore backup Ansible task when not requiredEuAndreh1-7/+0
Instead of performing this task on the generated =restore-backup.sh= file, do it on provision.yaml. The boolean logic is less confusing and the interpolation is less tricky.
2019-06-10Create generated-known-hosts.txt twiceEuAndreh1-0/+1
Since it can change after being destroyed by Terraform, we can't create it before and use it later.
2019-06-10Allow shutdown process to failEuAndreh1-2/+2
2019-06-10Provision DNS entries using DigitalOcean instead of DNS registrarEuAndreh2-2/+2
This way we can implement dynamic (provision-time) Floating IP, instead of a hardcoded pre-created Floating IP address. Related changes: - remove =terraform-godaddy= provider, use =digitalocean_record= instead; - create =generated-known-hosts= after provisioning instead of during =setup.sh=: use the =$(terraform output public_floating_ip)= value to make this file dynamic; - remote the =$PINNED_IP= and =$TF_VAR_floating_ip= variables; - add type and descriptions to variable declarations in Terraform recipe.
2019-06-09Revert "Create Terraform plan before shutting down running containers"EuAndreh1-6/+6
This reverts commit c8963acd02a5095bafb46c79abd45eec45059707.
2019-06-09Don't use terraform-full derivationEuAndreh1-3/+1
2019-06-09Create Terraform plan before shutting down running containersEuAndreh1-8/+8
2019-06-09Quote $() call (ShellCheck offense)EuAndreh1-1/+1
2019-06-09Make terraform-provider-godaddy available for TerraformEuAndreh1-0/+3
2019-06-08Add quote around nested quote expansionEuAndreh1-1/+1
Thanks ShellCheck :)
2019-06-08Remove unused $PUBLIC_KEY_ONLYEuAndreh1-1/+0
Thanks ShellCheck.
2019-06-08Generate UserKnownHostsFile dynamically instead of when rotating keysEuAndreh1-0/+2
The previous solution would hardcode the server IP. This way we can change the server IP address that is hosting everything and keep the SSH keypair. Previously changing the IP address would require either calling the =./rotate-ssh-keys.sh= script or manually changing the IP address on the known-hosts.txt file. The IP address being duplicated itself was a code smell. Both SSH keypair and IP address can now be changed independently.
2019-06-08CI debug: remove --verbose flag from borg create commandEuAndreh1-1/+0
THe objective is to remove the logged files from the CI log.
2019-06-07Revert "Add verbose logging for Ansible playbook command"EuAndreh1-1/+1
This reverts commit 80ee903ac9f09c22b4ef3458393242fa929cff89.
2019-06-07Add verbose logging for Ansible playbook commandEuAndreh1-1/+1
2019-06-07Fix boolean logic bug on ${DESTROY_VOLUME} usageEuAndreh1-2/+2
2019-06-07Disable SC2034 for ${DOLLAR} interpolated variableEuAndreh1-0/+3
2019-06-06Add ${DESTROY_VOLUME} operational toggleEuAndreh2-2/+13
This way I can dynamically control whether to destroy and recreate all the existing infrastructure entirely from scratch. The advantages of doing so are: - test the non-existence of local state on every deployment; - make sure I can always recreate everything from scratch. The disadvantages are: - slower deployment times; - longer downtime during deployments.
2019-06-06Remove invalid --stats option from borg extract commandEuAndreh1-1/+0
2019-06-06Fail fast on copied Bash filesEuAndreh2-0/+2
2019-06-06Unify quoted strings from restore-backup.env.shEuAndreh1-1/+1
2019-06-06Use ${DOLLAR}{VAR} to double scape bash variable in .env templatesEuAndreh2-2/+7
2019-06-06Notify when backup fails instead od saying nothingEuAndreh1-1/+1
2019-06-06Allow backups to fail for nowEuAndreh1-1/+1
2019-06-05Remove debug echoEuAndreh1-1/+0
2019-06-05Fix ShellCheck offensesEuAndreh3-3/+5
2019-06-05Restore backup in Ansible instead of BashEuAndreh2-7/+4
2019-06-05Restore from backup in fresh volumeEuAndreh3-10/+46
2019-06-05Add volume to VPSEuAndreh1-4/+0
Don't destroy everything on deploy. This would destroy the volume too.
2019-06-05Always destroy infrastructure before applyingEuAndreh1-0/+4
2019-06-05Uncomment accidentally commented codeEuAndreh1-6/+6
2019-06-05Remove duplicate chmod on borg-remoteEuAndreh1-1/+0