Basic application that builds Python Sphinx documentation. The generated documentation will be served by nginx in a remote environment.
Install Nix http://nixos.org/nix/download.html and then nixops
with
$ nix-env -i nixops
This step is optional as it will be automatically run by nixops as it evaluates the build expression.
$ nix-build
You can also access a nix shell environment with the package installed by running the following
$ nix-shell
The deployment happens in two phases. First, create the deployment and setting the required arguments
$ nixops create --deployment sphinx-nix nix/ec2.nix nix/application.nix
Make sure to set the appropriate values for the following arguments:
accountId
: a symbolic name looked up in ~/.ec2-keys or a ~/.aws/credentials profile nameaccountId
: the AWS account IDvpcId
: the VPC id used for the target deployment
$ nixops set-args --deployment sphinx-nix --argstr account "dev" --argstr accountId "123" --argstr vpcId "vpc-foo"
Then by execute the deployment
$ nixops deploy --deployment sphinx-nix
Once the deployment is complete, you can check the details of the deployed machine by running
$ nixops info --deployment sphinx-nix