-
Notifications
You must be signed in to change notification settings - Fork 5
Deployment guide
Of the four documents in this set, this is the least well developed.
- all app statics should go on Amazon's CDN
- Travis will deploy to AWS S3.
- CI/CD on Travis and Sauce
- At this time there is none.
- Travis is the way to go with open source projects as they provide a quality service for free (while surreptitiously training an army of sales people, as evidenced by this text).
- Suace Labs and Travis work together
"Sauce Labs provides a Selenium cloud with access to more than 170 different device/OS/browser combinations. If you have browser tests that use Selenium, using Sauce Labs to run the tests is very easy. First, you need to sign up for their service (it's free for open source projects)."
Core NodeJS machinery has to work out of the box. This includes:
- "Out of box means after `nmp install`
- NOT FIRST: but we should have publish to the NPM network so that a developer can just
`nmp install seanetmap
- As, is a developer can do a "git clone-less" install via
`npm install codeforseattle/seanetmap –save` Which under the hood will go fetch and install that which is at https://github.com/codeforseattle/seanetmap.git i.e. it's pretty much the same thing, but we will want to publish to npm eventually
Code for Seattle seems to have some resources available for deploying to Droplets on DigitalOcean. This will need to be a tested deploy target.
- Travis will deploy the server to AWS deploy to S3
- Live data will be in Amazon
- site will want to have HTTPS
- ssl support requires openssl library
- Along the lines of A sample Docker workflow with Nginx, Node.js and Redis
Initially the deploy target will be AWS. http://broadbandtogether.com
- [2015-05-05 Tue]Code for Seattle has a DigitalOcean account it seems. Tigue just went ahead and used AWS.
- [2015-05-07 Thu] Brett Miller recommended AWS | Elastic Load Balancing - Cloud Network Load Balancer (I believe) or similar over nginx for growing the number of nodes working.
Eventually, it may well be that the City of Seattle will deploy the code on some infrastucture of their own. Perhaps that is simply their AWS account. This is actually a good thing as one of the goals is to have liberally licensed code that can be easily deploy in multiple contexts. So, let us call this beta testing.
Various issues need to be addressed whereever the code is deployed.
- Supervisor, healthcheck, etc
-
Operating Node.js in Production
- Forever, Supervisor, reverse proxy, load balancing
-
Ten Common Mistakes in Node.js Development | Toptal
- #1: auto restart/watch and auto reload
- #10 supervisors: pm2, forever, nodemon, supervisor
-
Operating Node.js in Production
- Set up as a service
- service seanetmap start|stop|restart
-
https://www.digitalocean.com/community/tutorials/how-to-install-and-run-a-node-js-app-on-centos-6-4-64bit
- "I wouldn't advise using screen for long running processes of any kind (not just node). Check node-linux at https://github.com/coreybutler/node-linux (FD: I'm the author). It will generate an init.d script allowing your node process to be managed by the OS (like other daemons). For example, `service my-node-app start|stop|restart`.
- Logging in app is via Bunyan which is storing info via DTrace
- How To Set Up a Node.js Application for Production on Ubuntu 14.04 Good coverage of the basics.
General
Architecture
Process
Seattle