• Tuesday

    • Updated supercontest banner.
    • Updated vscode. Updated/pruned some extensions.
    • AWS EC2 options; did a little research on the difference between a Reserved Instance and a Savings Plan.
      • This article summarized it well: https://www.cloudzero.com/blog/savings-plans-vs-reserved-instances.
      • RI = “commitment to use an instance at a particular price over a specific period”
      • SP = “commitment to spend a particular dollar amount per hour over a specific period.
      • RI is simply committing to a single VM longterm. You just have to calibrate your usage. You lose efficiency if you’re overprovisioned or underutilized.
      • Savings plans are newer, and will basically deprecate Reserved Instances. They’re more flexible. They’re basically a longterm commitment for the on-demand allocation model, you just have to roughly know your $/hr usage.
    • Reserved instance comparison.
      • 36 months, pay upfront, nonconvertible, us-west-1 region (Northern California).
      • $157 for a t2.micro, same size as my current DO droplet. At $6/mo, that’s $216. So AWS RI is cheaper.
      • t2.small (double mem, 2GB) is $315 for the next 3yrs. Paid for this RI.
    • Remember that the RI is just an object, not an instance. You still must go over the Instances interface and launch your custom instance. If you have an instance running that matches the size/region/etc of your reserved instance, then it will be deducted.
    • Migrated supercontest to aws.
      • Launched the instance, as above. Remember: doubled mem to 2GB.
      • Upgraded to ubuntu 22 from 18.
      • Created keypair. Added to my desktop wsl2. Not to gitlab (yet) and not to laptop.
      • Created security group. Inbound ssh/http/https from all IPv4, outbound all.
      • Installed docker with snap.
      • Installed docker-compose manually: https://docs.docker.com/compose/install/linux/#install-the-plugin-manually
      • Remember the account on the EC2 RI is not bmahlstedt, it’s ubuntu.
      • Created new ssh-rsa kill and added the identityfile path to it in ~/.ssh/config (rather than bash techniques for ssh-add).
      • Cloned master/head.
      • Created 3 private files manually.
      • Created the docker group, added the ubuntu user to it, and chowned root:docker /var/run/docker.sock so that I could run docker commands without sudo.
      • Copied over the most recent backup and restored the postgres db.
      • App and db are up and running in EC2, reverse-proxied by my nginx infra and letsencrypt companion.
      • The jwilder nginx setup searches for the VIRTUAL_HOST param in the docker network, so your publicly reachable address must be specified there. Otherwise you’ll get 503s.
      • Everything is ready for the cutover. Just need to migrate the DNS service and domain registrar from GoDaddy/DigitalOcean to Route53. Will do next week, again providing enough time just in case there are issues.