aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci/setup.sh (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-06-10Provision DNS entries using DigitalOcean instead of DNS registrarEuAndreh1-1/+0
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-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-06Use ${DOLLAR}{VAR} to double scape bash variable in .env templatesEuAndreh1-0/+5
2019-06-05Restore backup in Ansible instead of BashEuAndreh1-1/+3
2019-06-05Remove duplicate chmod on borg-remoteEuAndreh1-1/+0
2019-06-05Remove unused cloud-config.env.yamlEuAndreh1-1/+0
2019-06-05Fix ShellCheck offensesEuAndreh1-2/+4
2019-06-05Use Ansible instead of Bash for provisioningEuAndreh1-3/+11
The deployment is not quite working, and I'm unable to test right now: DigitalOcean is returning 503 for my requests. As of this commit, I can run =ansible-playbook provider.yml= more than once and it will actually be idempotent. Notes: - SSH fingerprint are now taken from the public key file instead of manually supplying it in the terraform template using the =digitalocean_ssh_key= resource; - use Ansible instead of ad-hoc Bash scripts for provisioning the Droplets created by Terraform; - use the =filename.env.extension= to create the concrete files in CI; - use the =user_data= to add the know SSH key pair to the newly created Droplet; - add =rotate-ssh-keys.sh= utils;
2019-05-28Configure git for vps-state repo in ./scripts/ci/setup.shEuAndreh1-1/+5
2019-05-28Fix shell.nix path in nix-shell custom shebangEuAndreh1-1/+1
2019-05-28Split scripts into CI and VPS boxEuAndreh1-0/+1
2019-05-28Remove set -x from ci-setup.shEuAndreh1-1/+1
2019-05-28Add =set -x= to ci-setup.shEuAndreh1-1/+1
2019-05-28Add backup routing before possibly tearing down machineEuAndreh1-0/+1
Create a new backup entry before running =terraform apply=, which may (or may not) destroy the current machine. This shouldn't be an issue for the backup itself, since all of the data should be stored in a separate Block Storage Volume, but we can take advantage of the sevices already needing to be taken down in order to perform a full backup of the data.
2019-05-28Rename ./secrets/id_rsa{.pub} -> ./secrets/vps_box{.pub}EuAndreh1-1/+1
2019-05-26Change permission of ./secrets/id_rsa after git crypt unlockEuAndreh1-0/+2
2019-05-26Specify shell type to ShellCheck in nix-shell shebang filesEuAndreh1-0/+1
2019-05-26Use more robust Bash cd approachEuAndreh1-1/+1
2019-05-26Use nix-shell shebang to run CI scriptsEuAndreh1-1/+2
2019-05-26Prepare builds.sr.ht CI environment before running build tasksEuAndreh1-0/+16
Make content of .envrc available to subsequent build jobs.