Skip to content

Instantly share code, notes, and snippets.

@bayleedev
Created December 7, 2016 22:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayleedev/6858b32434da27318811b3b410329ba4 to your computer and use it in GitHub Desktop.
Save bayleedev/6858b32434da27318811b3b410329ba4 to your computer and use it in GitHub Desktop.

Open Questions

  • Setup let's encrypt via a script
  • How do we have a consistent salt on the servers?

Types of servers

Servers need to be created in this order:

  • master database
  • replica database [skippable]
  • app server
  • load balancer

Commands

  • provision server
  • switch floating ips to new loadbalancers

Provision Load Balancer

apt-get update
apt-get install nginx
  [copy ./lb.nginx.conf to /etc/nginx/nginx.conf]
  restart nginx

App Servers

apt-get update
apt-get install nginx
  [copy ./app.nginx.conf to /etc/nginx/nginx.conf]
  restart nginx
apt-get install git
  git clone cloakedpost ~/www/current
install node (http://do.co/2gW07gf)
install pm2
  start pm2

Database Servers

I don't even remember

Security on all boxes

disallow ssh login (http://bit.ly/2gW0h7k)
disable ssh/ports (ufw?)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment