– Meteor in production with Modulus and Codeship



– Meteor in production with Modulus and Codeship

0 0


mrtclt-ci-presentation1

Presentation – Meteor in production with Modulus and Codeship

On Github tbjers / mrtclt-ci-presentation1

Meteor in production with Modulus and Codeship

Created by Torgny Bjers / @torgnybjers

Continuous Integration

No need for a release manager or lead developer to evaluate each release before it goes to production.

Changes to your repository are immediately built and tested then pushed live to Modulus.

Test-driven development encourages simple designs and inspires confidence.

No need for a release manager or lead developer to evaluate each release before it goes to production. Changes to your repository are immediately built and tested then pushed live to Modulus. Test-driven development encourages simple designs and inspires confidence.

Test-Driven Development

add a test run tests and see if new one fails write some code run tests refactor rinse, repeat... add test, run tests, write code, run rests, refactor

Focus on code

Keep deployment and hosting simple so that you can focus on code instead of playing devops.

Why Modulus?

github integration

sticky sessions

web sockets

SSL endpoints

scalability

Github, sticky sessions, web sockets, SSL, scalability. Mongo benefits better from being hosted somewhere like Compose where we can trail the oplog.

Getting started with Modulus

Create a Modulus account and get $15 credit that covers about a month's usage of one servo.

https://modulus.io/

Creating your first project

Navigate to your account page and select Create New Project. Select the 396 MB servo size and give it the name my-app.

npm install -g modulus
meteor create my-app
cd my-app
modulus -p 'my-app'

You have just deployed your Meteor application to Modulus.

Why Codeship?

test automation

continuous deployment

notification integration

never ship bad code

automation, deployment, notifications, avoid bad code

Setting up Codeship

Setup Commands

nvm install 0.10.28
nvm use 0.10.28
npm install jshint -g
curl -o meteor_install_script.sh https://install.meteor.com/
chmod +x meteor_install_script.sh
sed -i "s/type sudo >\/dev\/null 2>&1/\ false /g" meteor_install_script.sh
./meteor_install_script.sh
export PATH=$PATH:~/.meteor/
meteor --version

Test Commands

jshint .
Setup commands, test commands. Supports both Github and Bitbucket.

Configure Deployments

click deployment menu select Modulus generate API token
modulus token create
click the green checkbox … profit! When building, Codeship also checks the site to see that it's up, and if not, the test fails. Not sure how that benefits you if you've already pushed buggy code since the site would be down.

Scaling with Modulus

scale across regions and providers

use AWS us-east-1 if you use Compose

Scale across regions and providers. Compose houses most of its services in the us-east-1 region.

Auto-Scaling

per-region

CPU

memory

response time

Supports per region and CPU, memory, response time metrics.

Questions or comments?

Torgny Bjers / @torgnybjers

Thanks

Thanks to @david_sykora for writing the original article.