Personally, what I would do in this situation is to maintain a set of notes. I keep mine in Dropbox so they’re always available. Every time I start a project, I keep a note of things that I needed to do and learn about and then refer back to the notes every time I need to do it again.
I do this for standing up new cloud servers all the time, as I found using configuration management for pet projects to be like using a sledgehammer to kill a fly. Way too much friction. Notes that you can just edit whenever things change are much better.
Here’s what I use:
- Building a Server
- =================
- - Make a Digital Ocean box
- - Use digital_ocean SSH key
- - Check "Internal Networking"
- - Add host to `dotfiles/ssh/.ssh/config`
- - Log in to the Digital Ocean box
- - specify root user using `-l root`
- - Add `deploy` user
- adduser deploy
- - Enter password
- - tap 'return' for rest of prompts
- - Add `deploy` user to sudo group
- usermod -a -G sudo deploy
- - Exit out of SSH session
- - Add the SSH key for password-less login
- ssh-copy-id <server-name>
- - uses `~/.ssh/id_rsa`
- - Test password-less login
- ssh <server-name>
- - should just log in
It’s tempting to want to write scripts to automate this, but I’ve so far found that when the scripts break, you now have two major problems, the one you’re fixing, and the fact that the script broke. I don’t want my personal life to get mired in yak shaving, so I refrain from automating this kind of thing. I don’t need to reimplement configuration management.
You can use the same “checklist”-type approach with anything that you have to do often enough to want some kind of process, but not so often that it’s worth maintaining software for. I use the above procedure maybe twice a year. When I do, it’s a huge time saver.
For your particular use case, I use Rails and my process to start up new projects changes so often as to make even the lightweight procedure described above to be too process to bother with. Rails has generators to make it easy to introduce workflow and process if you want it.
For example: `rails new <app-name> -T` will generate a new rails app without a testing framework. `rails new <app-name> --database=postgresql` will set it up to use PostgreSQL rather than the default SQLite.
Your workflow might look like this:
It’s a good idea to study the generator documentation before you do this so you’re not in the position of having to blow away non-generated additions in order to add new generated ones. But redoing them gives you the opportunity to iterate your procedure, so I don’t sweat it too much.
If you’re feeling froggy, learn how the generator system works, then you can make your own plugins. If you’re feeling super-froggy and want to give back, start a public project and push them out to the world. This is heads and tails harder, and not falling in the realm of “increasing convenience,” so yeah.