Deploying NixOS to Amazon EC2
Contents
- Launching an EC2 instance
- Building NixOS locally
- Deploying a local build
- Show notes
Video
- 5 videos, 36 minutes total
Tags
Most of the code that powers the Type Classes website is written in Haskell and running on Amazon EC2. In this project we walk through the process of how we developed our deploy process. We start by clicking around in the AWS web console, and we end up with some scripts and a fairly simple process that we now use to provision our servers from the command line.
We use these command-line tools:
nix-build, to compile everything that runs on our severnix-copy-closure, to upload build results to the serverssh, to activate changes on the server and switch to a new build
The scripts we write here are written in Haskell, using:
- a Stack
scriptshebang - the
turtlepackage to run shell commands - the
neat-interpolationpackage with theQuasiQuotesGHC extension
You can see the final results in the Type Classes projects GitHub repository.