daml/infra
Gary Verhaegen 4095538acf
match terraform with reality (#5143)
Our current Terraform setup attempts to create three static files on our
GCS buckets. The issue is that these buckets are configured to
automatically delete files that are older than X days, and there is no
way to exclude specific files from that. Therefore, the created files
disappear after some time, and running `terraform plan` suddenly looks
like the infrastructure has changed.

Moreover, the added value of these three files seems questionable: two
of them provide `index.html` type of functionality for our two caches,
whereas the third is automatically created by `nix` when pushing to the
cache anyway (if it doesn't exist already).

This PR also reduces the cache eviction time for the nix cache to 60
days, as a full year seemed a bit long.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-24 12:07:16 +01:00
..
modules/gcp_cdn_bucket match terraform with reality (#5143) 2020-03-24 12:07:16 +01:00
.gitignore open-sourcing daml 2019-04-04 09:33:38 +01:00
apply infra: add a VSTS windows agents (#368) 2019-04-18 11:20:57 +00:00
bazel_cache.tf match terraform with reality (#5143) 2020-03-24 12:07:16 +01:00
data_bucket.tf update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
dumps_bucket.tf update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
hoogle_server.tf update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
main.tf pin Terraform plugin versions (#4519) 2020-02-14 13:52:27 +01:00
nix_cache.tf match terraform with reality (#5143) 2020-03-24 12:07:16 +01:00
periodic_killer.tf switch CI nodes to permanent (#4455) 2020-02-11 02:07:42 +01:00
README.md terraform files for hoogle server (#1660) 2019-06-22 00:15:52 +00:00
vsts_agent_linux_startup.sh update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00
vsts_agent_linux.tf increase linux nodes to 10 (#4634) 2020-02-20 17:02:41 +00:00
vsts_agent_windows.tf switch CI nodes to permanent (#4455) 2020-02-11 02:07:42 +01:00
writer.tf update copyright notices to 2020 (#3939) 2020-01-02 21:21:13 +01:00

DAML

This is the terraform code used by the DAML repository to deploy supporting infrastructure such as the Bazel caches, Nix caches and Azure Pipeline (VSTS) Agents.

Setup

To deploy the infrastructure changes, you will to get access to the da-dev-gcp-daml-language Google project from DA IT. Then run gcloud auth login to configure the local credentials.

Deployment

All the infrastructure is currently deployed using Terraform. For convenience we have a little wrapper script that you can run to apply the latest changes:

$ ./apply

Writer service-account key

To avoid holding the secret key into the store, creating the key has to be done through the UI.

This can be done here: https://console.cloud.google.com/iam-admin/serviceaccounts/details/104272946446260011088?project=da-dev-gcp-daml-language

Setting up credentials

In order to interact with these Terraform files, you will need security to give you access to the relevant GCP project (da-dev-gcp-daml-language), and login via gcloud by running:

gcloud auth application-default login --account your.name@gcloud-domain.com