Stackathon is a command-line program for io.js that walks users through the process of setting up and tearing down basic server stacks on Digital Ocean. It can also set simple DNS records for domains purchased from Namecheap. The program was designed with hackathons in mind so that participants can spend less time getting setup and more time hacking.
NOTE: This has been tested throughly on Mac OS X. It will probably work on any *nix system, but your milage may vary on Windows boxes.
Install the Stackathon module globally via NPM:
npm install stackathon -g
Generate a new Digital Ocean API token with read and write access in your account settings page.
You will also need your Namecheap API token. And will have to whitelist your current IP address on that same page. Your IP address changes periodically, like when you connect to a new WiFi network, so you may have to do this more than once. If you don't know how to find your IP address, just ask Google.
Namecheap is not required to use Stackathon. If you do decide to use it, be sure to read the Setting DNS Records With Namecheap section below.
To build a new stack just type:
The first time you run it, Stackathon will ask for your API token(s) and check to make sure they are working. Stackathon will store your credentials so you won't have to enter them over and over again.
From there you can follow the instructions on the page and in minutes you will be ready to start hacking.
Stackathon manages the dirty work of setting up a new server enviornment, it keeps track of stacks it creates and cleans up after itself when you delete a stack it created. Stackathon only needs a few pieces of information to get started and suggests sensible defaults: type of stack to build, admin username, admin password, SSH port, domain and sub-domain (or a project name).
When you create a new stack, Stackathon:
~/.ssh/configto allow you to SSH into your new stack with a single command
When you delete a stack, Stackathon:
Stackathon can automatically set the A record of a domain you have purchased from Namecheap to the IP address assigned to your new stack during deployment. To enable this functionality you will need to request API access from Namecheap in your account settings page.
It can take 24 hours for Namecheap to process your request and they may require that you have spent a certain amount of money with them. You can expidite a request by reaching out to their customer support team via live chat or ticketing system.
Stackathon stores your API tokens and information about the stacks you have active in plain-text in a JSON file in your home directory
~/.stackathon. You can purge your credentials from the JSON file by selecting the "Reset credentials" option from Stackathon's main menu. You can also invalidate your tokens from your Digital Ocean and Namecheap control panels if you accidently leave them on another computer.