This challenge will see if you can setup and configure a wordpress correctly.
Wordpress is great!
The hardware used will be an Ubuntu machine.
- os: ubuntu
How to make operations love Nodejs
Apps
One little typo for Dev-kind, one big failure for Ops
(or vice versa if that makes more sense)
One little typo, is all what it takes to break a nodejs program. From an operational side, this doesn't give you much confidence.
Much of the documentation on nodejs out there is focused on building websites with Express and the Secret Sauce 'Socket.IO' and friends. Documentation on non-functional aspects, is sparse and more fragmented.
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)
- Tune /etc/ssh/sshd_config | |
UseDNS no # Disable DNS lookups | |
GSSAPIAuthentication no # Disable negotation of slow GSSAPI | |
don't forget to restart it, use a script provider to set it , or create it with veewee or snapshot it | |
- Tune Vagrantfile | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] |
Get free version of growl - http://www.macupdate.com/app/mac/41038/growl-fork | |
From notes on - <https://github.com/visionmedia/node-growl> | |
$ sudo gem install terminal-notifier | |
$ npm install growl | |
$ ./node_modules/mocha/bin/mocha --require test/common.js -G | |
Simple guard-nodejs like : |
So we got nexe to compile nodejs projects to an executable binary:
$ nexe -i myproject.js -o myproject.bin -r 0.10.3
Caveats:
#!/bin/bash -e | |
export TERM=xterm | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
# Use the correct ruby | |
rvm install ruby-1.9.2-p320 | |
rvm use 1.9.2@veewee-test-1 --create | |
# Do any setup | |
# e.g. possibly do 'rake db:migrate db:test:prepare' here | |
bundle install | |
export VEEWEE_SSH_TIMEOUT=600 |
#!/bin/bash -e | |
export TERM=xterm | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
# Use the correct ruby | |
rvm install ruby-1.9.2-p320 | |
rvm use 1.9.2@veewee-test-1 --create | |
# Do any setup | |
bundle install | |
export VEEWEE_SSH_TIMEOUT=600 | |
export VEEWEE_CPU_COUNT=4 |
if [ -f .veewee_params ] | |
then | |
. .veewee_params | |
fi | |
if [ -z "$CHEF_INSTALLMETHOD" ]; then | |
export CHEF_INSTALLMETHOD="gems" | |
fi | |
# Installing chef |