{"id":24290530,"url":"https://github.com/cda0/vm-exercise","last_synced_at":"2026-04-16T21:06:51.363Z","repository":{"id":146996459,"uuid":"314343214","full_name":"CDA0/vm-exercise","owner":"CDA0","description":null,"archived":false,"fork":false,"pushed_at":"2020-11-20T15:34:28.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-06T02:32:31.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/CDA0.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":"2020-11-19T18:59:10.000Z","updated_at":"2020-11-20T15:34:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"f54937e7-e211-409a-b206-e1febceb0efb","html_url":"https://github.com/CDA0/vm-exercise","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CDA0/vm-exercise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDA0%2Fvm-exercise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDA0%2Fvm-exercise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDA0%2Fvm-exercise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDA0%2Fvm-exercise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CDA0","download_url":"https://codeload.github.com/CDA0/vm-exercise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDA0%2Fvm-exercise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31904116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-01-16T11:53:09.431Z","updated_at":"2026-04-16T21:06:51.343Z","avatar_url":"https://github.com/CDA0.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Pipeline Exercise\n\n## Bootstrapping\n\nTo start with a few things need to be in place.\n\nWe can assume that:\n  * A subscription has been created in Azure and the ID sent to us.\n  * Our user has contributor access to that subscription.\n  * Our user has god rights in ADO and has a PAT token on the environment at `AZURE_DEVOPS_EXT_PAT`\n\nWe can then run the `bootstrap.sh` script that will create:\n  * A Service Principal with Contributor access to the subscription\n  * A Storage Account to hold terraform remote state\n  * A Keyvault and Key which will be used to encrypt and decrypt secrets\n\nFor the purpose of this exercise it is assumed that no firewall is required on\nany services built.\n\nThe script will then load the variables into a variable group (which would be\nkeyvault backed typically) and ensure that they are kept secret.\n\nNo effort has been made to make the script idempotent.\n\n## ACR\n\nIn terraform we create an ACR instance to store images built on the agent.\n\nThe firewall remains open, obviously this is not good.\n\n## AKS\n\nIn terraform we create an AKS cluster to run the weather application.\n\nHelm is used to add an nginx for ingress before adding an application on top.\n\n## Weather Application\n\nAn app I wrote a while ago as a tech test for another role. Hitting the\nendpoint will return weather data. No effort has been made to make this\nremotely interesting or geographically aware.\n\nIt uses a very basic helm template to generate a deploy yaml which is then\napplied to the AKS cluster.\n\n\n## Further work\n\n* Terraform needs validated\n* Security is awful\n* Bootstrap is not idempotent\n* Terraform could be tested\n* Healthchecks on services\n* App image is not versioned\n* All commits are on master :(\n* Couple of secrets stored in the repo...very bad.\n* This is not an exhaustive list but just other things that could be better in\n  the context of a tech test.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcda0%2Fvm-exercise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcda0%2Fvm-exercise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcda0%2Fvm-exercise/lists"}