{"id":18005992,"url":"https://github.com/brianhicks/elm-infra","last_synced_at":"2026-02-25T15:31:16.417Z","repository":{"id":138122901,"uuid":"97524829","full_name":"BrianHicks/elm-infra","owner":"BrianHicks","description":"Upcoming Elm infrastructure","archived":false,"fork":false,"pushed_at":"2018-04-08T19:27:45.000Z","size":199,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T19:07:55.281Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrianHicks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-17T21:41:57.000Z","updated_at":"2018-04-08T19:27:46.000Z","dependencies_parsed_at":"2023-03-15T22:45:33.187Z","dependency_job_id":null,"html_url":"https://github.com/BrianHicks/elm-infra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BrianHicks/elm-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrianHicks","download_url":"https://codeload.github.com/BrianHicks/elm-infra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrianHicks%2Felm-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281691694,"owners_count":26545078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T00:22:49.574Z","updated_at":"2025-10-29T20:32:18.652Z","avatar_url":"https://github.com/BrianHicks.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-infra\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --\u003e\n**Table of Contents**\n\n- [elm-infra](#elm-infra)\n    - [So, What's This All About?](#so-whats-this-all-about)\n        - [*Terraform and Ansible* for bringing up VMs](#terraform-and-ansible-for-bringing-up-vms)\n        - [*Docker* for packaging and dependency isolation](#docker-for-packaging-and-dependency-isolation)\n        - [*Nomad, Consul, and Traefik* for scheduling, running, and routing traffic to containers](#nomad-consul-and-traefik-for-scheduling-running-and-routing-traffic-to-containers)\n    - [Disambiguating \"server\"](#disambiguating-server)\n    - [Using this Repo](#using-this-repo)\n        - [Bringing up new hosts](#bringing-up-new-hosts)\n        - [Deploying services](#deploying-services)\n    - [License](#license)\n\n\u003c!-- markdown-toc end --\u003e\n\nNew infrastructure for elm-lang.org\n\n## So, What's This All About?\n\nGoals for the new infrastructure:\n\n1. to be able to deploy a new version of a deployed thing really easily once running\n2. the system should survive if one of the VMs goes away (e.g. due to Spectre mitigation)\n3. set up for future expansion (e.g. package pre-publish service)\n\nThat lead me to these technology choices:\n\n### *Terraform and Ansible* for bringing up VMs\n\nHelps with goals 1 and 2.\n\n**Why?** No more SSHing into VMs to make changes or restart services by hand.\n\n**Another Benefit:** All information about servers and their configuration are backed up and can be restored easily.\n\n### *Docker* for packaging and dependency isolation\n\nHelps with goal 1.\n\n**Why?** Deploys are simpler and more reliable because Docker isolates runtime dependencies.\nRollbacks become about as easy as deploys.\n\n**Another Benefit:** It's slightly more secure than we would be otherwise.\n\n**Long-term Benefit:** upgrading now gives us much more flexibility in the future.\nAlmost all new DevOps/infrastructure tools use Docker and/or can run Docker containers.\n\n### *Nomad, Consul, and Traefik* for scheduling, running, and routing traffic to containers\n\nHelps with goals 1, 2, and 3.\n\n**Why?** If a VM goes away, the things it was running will automatically move somewhere else to minimize downtime.\n\n**Another Benefit:** All information about running services is backed up and can be restored easily.\nWe can also see what changes the system will make in advance.\n\n**Long-term Benefit:** New services can be added without making any changes to the underlying infrastructure.\nExisting services can be scaled up trivially to respond to an increase in traffic.\n\n## Disambiguating \"server\"\n\nThe word \"server\" is really overloaded in this style of infrastructure.\nThere are three levels:\n\n- **Virtual Machines (VMs)** at the cloud/host level.\n  These are the things you pay DigitalOcean for.\n\n- **Containers** inside the VMs.\n  These are scheduled dynamically and contain the software that makes up the workload.\n\n- **Services** inside the containers.\n  These are things like the package site, which listen on a port and respond with data.\n\nso for the technologies above:\n\n- **Terraform and Ansible** deal with **Virtual Machines**\n\n- **Docker** deals with **Containers**\n\n- **Nomad, Consul, and Traefik** deal with **Services**\n\nall this comes together to form a cluster.\n\n## Using this Repo\n\nThings you'll need (list will hopefully get shorter with time, not longer):\n\n- [pipenv](https://docs.pipenv.org) (for Ansible and its dependencies)\n- [Docker](https://www.docker.com/community-edition) (for building containers)\n- [nomad](https://www.nomadproject.io/) (for deploying services)\n\nTo get started, `pipenv install \u0026\u0026 pipenv shell`.\nNext time you start the project, run `pipenv shell` in the directory, and that's it.\n\n### Bringing up new hosts\n\nOnce you have the servers up (`cd iac; terraform apply`), run the `bootstrap-python.yaml` playbook:\n\n```\nansible-playbook playbooks/main.yaml\n```\n\nAnd then wait for a while while they build.\nGo get a coffee or something.\n\n### Deploying services\n\nTODO\n\n## License\n\nLicensed under the please don't use this yet it's not ready license.\nProbably BSD-3 eventually.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Felm-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianhicks%2Felm-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianhicks%2Felm-infra/lists"}