Presentation notes for #DevTO - Appy Hour #1 April 23rd 2014.
- Create Virtual Machine in Azure Portal/Dashboard
- Open ports: 22 (ssh), 80 (http), 9418 (git)
- Write Node.js code locally (see file)
- Create local git repo
- git Add/Commit changes
- Install git-core on server
sudo apt-get install git-core
- Install node.js on server
sudo apt-get install build-essential
sudo apt-get install nodejs
sudo apt-get install npm
- Setup git server
- create git user account
sudo adduser git
- setup .ssh/authorized_keys
- copy your local
~/.ssh/id_rsa.pub
to server's~/.ssh/authorized_keys
file
- copy your local
- create git user account
- Create Upstart/init.d file
- make exectuable e.g.
sudo chmod +x /etc/init.d/appyHour
- make exectuable e.g.
- Hack Sudoers group
- user ALL = NOPASSWD: ALL
- Setup git hooks
- pre-receive
- post-receive
- make executable e.g.
chmod +x /home/raykao/git/appyhour.git/post-receive
- Setup git remote server config on local machine
git remote add origin master git@servername.com:~/path/to/repo.git
- Push local repo to server
git add .
git commit -m "initial commit"
git push origin master
- Show server is running
- Open browser to server url e.g. http://appyhour.cloudapp.net
- Make Code Changes
- Push changes to server
- Show changes are live
- Profit
- Install server firewall package (ufw - uncomplicated firewall)
- Install and configure Nginx as server proxy
- Make more secure - Sudoers hack is bad for business
- git-core
- nodejs
- Deploy Node.js website with git
- Hello Node - Node.js server examples
- Git - Git Hooks
- Git - Git on the Server - Setting Up the Server
- Notes written by: Raymond Kao
- Presenters:
- Marc Gagne - Getting to know Node.JS & Windows Azure PaaS
- Raymond Kao - VPS setup to deploy in 30 minutes