Mailspring/README.md
Juan Tejada dce872fac8 Adds bunyan for json logging on every package!
- Bunyan logs json output, and added a stream to send our logs to
cloudwatch
- Replaces /all/ instances of console.log. Turned eslint rule back on,
so we don't use console.log ever again.
- Added npm scripts to view pretty logs
2016-07-08 17:30:24 -07:00

1.8 KiB

K2 - Sync Engine Experiment

Initial Setup:

New Computer (Mac):

  1. Install Homebrew
  2. Install VirtualBox 5+
  3. Install Docker for Mac
  4. Install NVM brew install nvm
  5. Install Node 6+ via NVM: nvm install 6
  6. Install Redis locally brew install redis

New to AWS:

  1. Install Elastic Beanstalk CLI: sudo pip install awsebcli
  2. Install AWS CLI: brew install awscli
  3. Add your AWS IAM Security Credentials to aws configure.
  4. These are at Console Home -> IAM -> Users -> {{Your Name}} -> Security Credentials. Note that your private key was only shown unpon creation. If you've lost your private key you have to deactivate your old key and create a new one.
  5. Get the K2 team private SSH key. (Ignore this when we have a Bastion Host). Ask someone on K2 for a copy of the private SSH key. Copy it to your ~/.ssh folder.
  6. chmod 400 ~/.ssh/k2-keypair.pem
  7. ssh i ~/.ssh/k2-keypair.pem some-ec2-box-we-own.amazonaws.com
  8. Connect to Elastic Beanstalk instances: eb init. Select correct region. Select correct application.

Developing Locally:

npm run start
npm run logs
npm run stop

We use pm2 to launch a variety of processes (sync, api, dashboard, processor, etc).

You can see the scripts that are running and their arguments in /pm2-dev.yml

To test to see if the basic API is up go to: http://lvh.me:5100/ping. You should see pong.

lvh.me is a DNS hack that redirects back to 127.0.0.1 with the added benefit of letting us use subdomains.

Deploying