Collection of tools to deploy Serokell infrastructure.
File structure
deploymentsincludes all NixOps deployments controlled viaCardano*.hsscriptsmoduleshas NixOS moduleslib.nixwarps upstream<nixpkgs/lib.nix>with our common functionsscriptshas bash scripts not converted to Haskell/Turtle into Cardano.hs yetsrk-nixpkgsis a collection of upstream Serokell packagesstaticincludes files being static, not generatedrelease.nixis used by Hydra CI
Check out nixpkgs repository to the root (~/nixpkgs) using branch release-16.09.
./Cardano.hs build
./Cardano.hs deploy
Note this will not remove machines if they no longer exist.
If you want to remove a machine simply remove them in the bottom part of the nixops.nix file.
Then run nixops deploy with -k:
./Cardano.hs deploy
nixops list
nixops info [-d deployment]
nixops ssh -d deployment machine-name
Replace machine-name with the machine you want to connect to (from info call).
./Cardano.hs destroy
To generate the disk image:
$ GENERATING_AMI=1 nix-build release.nix -A image -o image -I ~/
Note that this will take more than an hour to build. See NixOS/nixpkgs#20471 for more about the slowness.
To upload and use the new disk image as AMI:
$ ./scripts/create-amis.sh
This will update modules/amis.nix so make sure to commit it.