<feed xmlns='http://www.w3.org/2005/Atom'>
<title>server/terraform.tfstate, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://euandre.org/git/server/atom?h=main</id>
<link rel='self' href='http://euandre.org/git/server/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://euandre.org/git/server/'/>
<updated>2022-03-07T22:12:06Z</updated>
<entry>
<title>Delete all old code and configuration to start from scratch with Guix only</title>
<updated>2022-03-07T22:12:06Z</updated>
<author>
<name>EuAndreh</name>
<email>eu@euandre.org</email>
</author>
<published>2022-03-07T22:12:06Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/server/commit/?id=5bf9572734025ddbe680c0c4978f72df5718ae4b'/>
<id>urn:sha1:5bf9572734025ddbe680c0c4978f72df5718ae4b</id>
<content type='text'>
Delete files related to:
- Terraform
- opt/*
- scripts/deploy
- secrets/*
- git-crypt
- Nix
</content>
</entry>
<entry>
<title>WIP: Move to Vultr and NixOS</title>
<updated>2020-08-10T14:30:44Z</updated>
<author>
<name>EuAndreh</name>
<email>eu@euandre.org</email>
</author>
<published>2020-08-10T14:30:44Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/server/commit/?id=18e1dc6cc114e8ea3eedf09e67cd576e879c6326'/>
<id>urn:sha1:18e1dc6cc114e8ea3eedf09e67cd576e879c6326</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Automate provisioning and deployment of VPS</title>
<updated>2019-05-26T14:51:51Z</updated>
<author>
<name>EuAndreh</name>
<email>eu@euandre.org</email>
</author>
<published>2019-05-26T14:51:51Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/server/commit/?id=da00227813b1fbeebae8c90e2122a8b73acb1af9'/>
<id>urn:sha1:da00227813b1fbeebae8c90e2122a8b73acb1af9</id>
<content type='text'>
In order to perform that I had to remove Terraform's =.tfstate= files from the
repository. Terraform does support "backends" for storing the state files, but I
settled for storing it on a separate repo (vps-state).

For now it solves the state management problem:
- it has history of states;
- all state files are GPG encrypted;
- there's no coordination however, but only the CI should perform a deploy in
order to avoid race conditions.

I had to add GPG and SSH keys to sr.ht to achieve that:
- SSH public key to my profile to authorize it to push to vps-state repo;
- SSH private key to the secret builds.sr.ht environment to enable push to the
repository from the pipeline;
- GPG public key to git-crypt to make it possible for the pipeline to unlock the
encrypted content;
- GPG private key to the secret builds.sr.ht environment to enable decrypting
git-crypt content from the pipeline.

In order to avoid divergent environment from local and CI, the ./provision.sh
script is ran through nix-shell.
</content>
</entry>
<entry>
<title>Check-in Terraform .tfstate files using git-crypt</title>
<updated>2019-05-25T16:17:12Z</updated>
<author>
<name>EuAndreh</name>
<email>eu@euandre.org</email>
</author>
<published>2019-05-25T16:17:12Z</published>
<link rel='alternate' type='text/html' href='http://euandre.org/git/server/commit/?id=afb4f9f97a339a75fee83748d1a3cdae23bd9d27'/>
<id>urn:sha1:afb4f9f97a339a75fee83748d1a3cdae23bd9d27</id>
<content type='text'>
</content>
</entry>
</feed>
