aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODOs.org8
-rw-r--r--secrets/envrc.shbin1493 -> 1541 bytes
-rw-r--r--vps.tf6
3 files changed, 13 insertions, 1 deletions
diff --git a/TODOs.org b/TODOs.org
index 2b50fab..c7a3bdc 100644
--- a/TODOs.org
+++ b/TODOs.org
@@ -25,8 +25,8 @@ CLOSED: [2019-05-26 Sun 19:42]
Put it in an environment variable?
Done by appending to content of =~/.ssh/config=.
+**** DOING Use DigitalOcean's Floating IP in front of the droplet
**** DOING Automate deployment with Terraform and deployment scripts
-**** NEXT Use DigitalOcean's Floating IP in front of the droplet
**** DONE Backup data during deployments
CLOSED: [2019-05-28 Tue 00:48]
Is this approach feasible? Will it make the deployment take too much longer? What are the alternatives?
@@ -120,6 +120,12 @@ I'm already covered by using Git Annex for almost everything.
** WAITING =matrix.euandreh.org=: Matrix Synapse server
I'm not using IRC a lot right now. Wait for me to interact more with mailing lists and gauge the need of IRC.
* Questions
+** TODO How to dynamically handle Floating IPs?
+Right now the current Floating IP defined in =.envrc= was created manually in DigitalOcean's web UI and copied from it to the environment variable.
+
+If everything was teared down, I couldn't recreate everything from source, because the Floating IP would be different.
+
+The ultimate goal would be to upsert a Floating IP address? If no Floating IP address exists, create one. If one already exists (I don't how to get a reference to it), use it.
** TODO Critiques of Docker?
What does NixOps, DisNix and Dysnomia are trying to accomplish that overlap with Docker?
diff --git a/secrets/envrc.sh b/secrets/envrc.sh
index 52e5ac1..fb573ba 100644
--- a/secrets/envrc.sh
+++ b/secrets/envrc.sh
Binary files differ
diff --git a/vps.tf b/vps.tf
index c5412c3..072fc74 100644
--- a/vps.tf
+++ b/vps.tf
@@ -1,5 +1,6 @@
variable "do_token" {}
variable "ssh_fingerprint" {}
+variable "floating_ip" {}
provider "digitalocean" {
token = "${var.do_token}"
@@ -30,3 +31,8 @@ resource "digitalocean_droplet" "vps" {
script = "./deploy.sh"
}
}
+
+resource "digitalocean_floating_ip_assignment" "vps" {
+ ip_address = "${var.floating_ip}"
+ droplet_id = "${digitalocean_droplet.vps.id}"
+} \ No newline at end of file