decision log




reason

8/01/2017

1.
try setting up stack myself instead of using digital ocean’s pre-setup droplets
  1. more expertise gained
  1. more familiarity with configuration?
  1. since I’m not using Wordpress as a monolithic CMS, I don’t need some of the standard components, e.g. apache
2.
have separate servers for test and prod of kusamochi

😅 : d13
  1. practices online don’t seem to attempt to host test and prod on one server
  1. confusing between configuration through Wordpress and configuration through Apache, with Nginx above..?
  1. if I rely on a database, I probably want a separate prod database and a separate test database. hosting 2 virtual domains, 2 databases on one server starts to get confusing.
  1. if I set up a script to provision the servers, then I can set up new test and prod servers with ease (all the same setup, I suppose); double-tasking for scaling needs. but if I combine test and prod on one server, the provisioning script will make a combined test&prod with each deploy
3.
having staging environment go with subdomain or actual domain - undecided
4.
use Express as web server in prod instead of webpack-dev-server
  1. not entirely sure why, but people seem to think webpack-dev-server should be reserved for dev only (security issues? performance issues?)
  1. express seems to be the most popular web server for node apps
5.
Chef vs Capistrano vs Fabric… for code deployment - undecided
→ d15

8/03/2017

6.
use Digital Ocean droplets instead of AWS EC2 instances
  1. about half the price of EC2 instances, according to rates
  1. more comfortable starting with blank slate rather than working from pre-setup instances o_O
7.
use Digital Ocean object storage for at least some storage needs
  1. free through Oct.
  1. not sure yet what sort of cost hosting my own dbs (whether relational or nonrelational) will pose
8.
use lowest tier for kusamochi droplets
  1. assuming that this tier is still good for a website with almost zero traffic. lol
  1. can change in future if necessary
9.
use two droplets for kusamochi to start with (1 stage, 1 prod)

😅 : d13
  1. although not ideal to have front end and back end on same server, necessarily, saves $$
  1. can change in future if necessary
10.
use same ssh pub for both droplets
  1. saves me a little bit of time :/
  1. supposedly a security issue but I think if someone gets ahold of my key pair for one, they’ll have access to the other ; not going to use different security measures for different key pairs.
11.
use duplicated commits (git cherry pick) and multiple pushes to push the same changes to two destinations, rather than a simultaneous push to two destinations (using multiple git remotes)
  1. my sense of how git commits work
  1. worried that if I git commit the same commit to two repos, both repos will end up in same state, rather than keep different states with addition of same change.

8/04/2017

12.
publish changes to mugwort’s ssh folder only to private repo
  1. might be nice to show configurations to .ssh file, but it reveals what access is available from this host.
  1. other contents (keys) are absolutely sensitive anyway, and I don’t want to open myself up to mistakes by occasionally pushing some contents to public repo
13.
run app as microservices in docker
  1. if I use containers, I can maybe test the app on localhost, or have stage and prod on one droplet, saving me money (ty Steven for this pt)
  1. gives me the isolation I want between microservices

use docker swarm for container mgmt, if needed
  1. seems simpler than using kubernetes, for now
  1. beginner level tutorials for this

use Ansible for both provisioning docker and code deployment of compose files, if necessary?
  1. seems to do both tasks, as opposed to needing to pair Chef and Puppet otherwise
  1. easy tutorial to demonstrate?
  1. not sure if Docker swarm cmds eliminate some need for code pushing…

8/07/2017

16.
don’t use nodemon for the time being
  1. currently causes issues for running barebones express app in remote swarm
  1. might be useful later but would take time to untangle how to get it running only in dev; or working in prod
17.
push images for different services to the same repo

push images for different services to separate repos
  1. haven’t seen any real examples of this and might get messy, but makes sense to me according to ‘repo’ terminology
  1. will be pushing to same image name for ‘latest’ ver of each service image
  1. can change later…
never mind… going by the default ‘latest’ tag, the tags are meant to distinguish between different versions of one image rather than images for different services

8/08/2017

18.
use ansible container at least to build my images..?
  1. it’s nice that I can just use other people’s roles, and not write custom Dockerfiles. then again I could probably use people’s images instead of writing my own Dockerfiles to set up wordpress, etc., too?