diff --git a/infra/README.md b/infra/README.md index f9c4e34467ee..1c67c63d4858 100644 --- a/infra/README.md +++ b/infra/README.md @@ -26,6 +26,9 @@ Changing the template of an instance manager tends to kill all the machines in the current group. Therefore, we're experimenting with keeping two groups per logical group. (This is currently done only for the Hoogle servers.) +> You can follow along with an example of such a deployment in the +> commit-by-commit view of [#9362](https://github.com/digital-asset/daml/pull/9362/commits). + The default state should be to split machines between the two groups evenly, and have the exact same configuration in each group. When a change needs to be made, one can set the size of one of the groups to 0, make the appropriate diff --git a/infra/hoogle_server.tf b/infra/hoogle_server.tf index 579d8310c8f4..14d077725266 100644 --- a/infra/hoogle_server.tf +++ b/infra/hoogle_server.tf @@ -18,17 +18,35 @@ resource "google_compute_firewall" "hoogle" { } } +resource "google_compute_firewall" "hoogle-ssh" { + count = 0 + name = "hoogle-ssh" + network = google_compute_network.hoogle.name + log_config { + metadata = "INCLUDE_ALL_METADATA" + } + allow { + protocol = "tcp" + ports = ["22"] + } + source_ranges = [ + "35.194.81.56/32", # North Virginia + "35.189.40.124/32", # Sydney + "35.198.147.95/32", # Frankfurt + ] +} + locals { h_clusters = [ { suffix = "-blue", ubuntu_version = "2004", - size = 1, + size = 3, }, { suffix = "-green", ubuntu_version = "2004", - size = 2, + size = 0, } ] } @@ -86,14 +104,17 @@ useradd hoogle mkdir /home/hoogle chown hoogle:hoogle /home/hoogle cd /home/hoogle -curl -sSL https://get.haskellstack.org/ | sh -runuser -u hoogle bash < {}).haskellPackages.hoogle') +mkdir -p /home/hoogle/.local/bin +ln -s $HOOGLE_PATH/bin/hoogle /home/hoogle/.local/bin/hoogle export PATH=/home/hoogle/.local/bin:$PATH mkdir daml curl https://docs.daml.com/hoogle_db/base.txt --output daml/base.txt