Skip to content

Upgrading the production to the new infrastructure

Daniel Rosenberg edited this page May 11, 2016 · 8 revisions

Upgrading the production to the new infrastructure

We will use nginx as the SSL terminator instead of bud

Upgrading NGINX

Run

sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx

*** fastcgi.conf (Y/I/N/O/D/Z) [default=N] ? N

Installed version is 1.10

Disable bud

pkill bud bud -c /opt/littlegenius/config/bud.conf.json -d

file system

Under /opt/littlegenius /app: common code and demo domain subdomain now. /carmel: VIP, subdomain carmel. /VIP: school VIP

set up config of nginx

https://www.digitalocean.com/community/tutorials/how-to-deploy-a-meteor-js-application-on-ubuntu-14-04-with-nginx The config is not easy just use the one tested .

get certificate for VIP domain using webroot

/opt/letsencrypt/letsencrypt-auto certonly -a webroot --webroot-path=/usr/share/nginx/html -d <vip>.gosmartix.com

#Change Google OAuth?

Phusion passenger ?

If you have deployed a Node.js app to production before, then you may know that it involves glueing a bunch of different tools together:

Nginx as a reverse proxy. Forever/PM2 to keep your app running and to manage your app's processes. An init script to start your app at boot. The Cluster module for multi-core usage.

Luckily Node.js has got your back. It comes with an awesome module - Cluster - which lets you spin up a bunch of new processes and connect the sockets to your master process, so it acts like one big multithreaded Node.js server.

manage startup service

sysv-rc-conf