Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra/hoogle: use nix #9362

Merged
merged 7 commits into from
Apr 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
step 2: change one group
In this case, we know the Hoogle service works with just two machines,
so we don't need to scale up the green group. Similarly, the blue group
is already set to just one machine so we don't need to scale it down
before proceeding.

This step does require a `terraform apply`.
  • Loading branch information
garyverhaegen-da committed Apr 8, 2021
commit d3ce1668dca5cf24b002f334a9d34b38c7bf2af4
19 changes: 11 additions & 8 deletions infra/hoogle_server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ locals {
ubuntu_version = "2004",
size = 1,
install = <<EOF
curl -sSL https://get.haskellstack.org/ | sh
runuser -u hoogle bash <<HOOGLE_SETUP
git clone https://github.com/ndmitchell/hoogle.git
cd hoogle
git checkout 73fa6b5c156e0015e135a564e2821719611abe03
stack init --resolver=lts-14.7
stack build
stack install
mkdir /nix
chown hoogle:hoogle /nix
runuser -l hoogle <<'HOOGLE_SETUP'
curl -sSfL https://nixos.org/nix/install | sh
. /home/hoogle/.nix-profile/etc/profile.d/nix.sh
# Feel free to bump the commit, this was the latest
# # at the time of creation.
NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/c50e680b03adecae01fdd1ea4e44c82e641de0cf.tar.gz
HOOGLE_PATH=$(nix-build --no-out-link -E '(import <nixpkgs> {}).haskellPackages.hoogle')
mkdir -p /home/hoogle/.local/bin
ln -s $HOOGLE_PATH/bin/hoogle /home/hoogle/.local/bin/hoogle
EOF
},
{
Expand Down