{"id":39547049,"url":"https://github.com/larseggert/devvm","last_synced_at":"2026-01-18T06:47:41.123Z","repository":{"id":320529107,"uuid":"1081362952","full_name":"larseggert/devvm","owner":"larseggert","description":"Ansible playbook for my cloud development VM","archived":false,"fork":false,"pushed_at":"2026-01-12T12:16:08.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T19:38:20.259Z","etag":null,"topics":["ansible"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/larseggert.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-22T17:17:04.000Z","updated_at":"2026-01-12T12:16:12.000Z","dependencies_parsed_at":"2025-10-24T10:31:56.397Z","dependency_job_id":null,"html_url":"https://github.com/larseggert/devvm","commit_stats":null,"previous_names":["larseggert/devvm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/larseggert/devvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larseggert%2Fdevvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larseggert%2Fdevvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larseggert%2Fdevvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larseggert%2Fdevvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larseggert","download_url":"https://codeload.github.com/larseggert/devvm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larseggert%2Fdevvm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["ansible"],"created_at":"2026-01-18T06:47:41.050Z","updated_at":"2026-01-18T06:47:41.112Z","avatar_url":"https://github.com/larseggert.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCP development VM\n\n## Make a GCP VM for development\n\nMake a new GCP project for your dev VM at \u003chttps://console.cloud.google.com/projectcreate\u003e and give it a name, e.g., `$DEVVM`. Note the generated project ID, e.g., `$PROJECT`.\n\nGo to \u003chttps://console.cloud.google.com/compute\u003e and create a new VM instance. I happen to use a `c2-standard-30` machine type; pick whatever works for you. Use a zone near where you'll mostly access the VM from for low latency access, I'll refer to it as `$ZONE` below.\n\nThe OS needs to be Ubuntu if you want to use the provided Ansible playbook, I used Ubuntu 25.10.\n\n## Install `gcloud` CLI\n\nInstall the Google Cloud SDK (`gcloud` CLI) on your local machine by following the instructions at: \u003chttps://cloud.google.com/sdk/docs/install\u003e. Authenticate with your Google account as described at: \u003chttps://cloud.google.com/docs/authentication/gcloud\u003e.\n\n## Register SSH public key in GCP project metadata\n\n`$USER` below is your desired username on the VM. `$PUBLIC_KEY` is the contents of the SSH public key file you would like to use to log into the VM.\n\nRun this command to register the SSH public key in the GCP project metadata:\n\n```bash\ngcloud compute project-info add-metadata --metadata=\"ssh-keys=$USER:$PUBLIC_KEY\"\n```\n\n## Configure SSH client for GCP IAP tunneling\n\nAdd something like this to your `~/.ssh/config` file, with all variables replaced as defined above, and `$PRIVATE_KEY` as the filename of the private key corresponding to the public key you registered above.\n\n```bash\nHost $DEVVM\n    User $USER\n    IdentityFile ~/.ssh/$PRIVATE_KEY\n    ProxyCommand gcloud compute start-iap-tunnel %h %p --listen-on-stdin --project=$PROJECT --zone=$ZONE\n    ForwardX11 yes # If you want X11 forwarding\n    ForwardAgent yes # If you want SSH agent forwarding\n```\n\nAdjust the host name, username, private key, project name and zone as necessary. You should then be able to log into the VM with:\n\n```bash\nssh $DEVVM\n```\n\n## Ansible configuration\n\nUse the Ansible playbook in `ubuntu.yml` to configure the VM:\n\n```bash\nansible-playbook -i $DEVVM, ubuntu.yml\n```\n\n## Notes\n\nThe playbook configures the VM to log you out after 30 minutes of inactivity, and it will shut down the VM after at most another 30 minutes of inactivity. This is to save costs when you forget to turn off the VM. You can restart the VM with:\n\n```bash\ngcloud compute instances start $DEVVM\n```\n\nRefrain from changing the VM configuration directly on the VM; instead, make changes to the Ansible playbook and re-run it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarseggert%2Fdevvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarseggert%2Fdevvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarseggert%2Fdevvm/lists"}