{"id":20816257,"url":"https://github.com/peknur/packer-upcloud-alpine-image","last_synced_at":"2026-01-04T23:31:30.961Z","repository":{"id":100680574,"uuid":"493212917","full_name":"peknur/packer-upcloud-alpine-image","owner":"peknur","description":"Builds Alpine Linux using QEMU and imports image as private template (custom image) to UpCloud.","archived":false,"fork":false,"pushed_at":"2022-05-30T08:45:19.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T02:12:19.592Z","etag":null,"topics":["alpine-linux","packer","packer-plugin","terraform","upcloud"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peknur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-05-17T11:02:06.000Z","updated_at":"2024-07-22T15:34:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd34f686-7ded-4d8e-b95b-92ada6230af0","html_url":"https://github.com/peknur/packer-upcloud-alpine-image","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peknur/packer-upcloud-alpine-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peknur%2Fpacker-upcloud-alpine-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peknur%2Fpacker-upcloud-alpine-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peknur%2Fpacker-upcloud-alpine-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peknur%2Fpacker-upcloud-alpine-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peknur","download_url":"https://codeload.github.com/peknur/packer-upcloud-alpine-image/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peknur%2Fpacker-upcloud-alpine-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277379996,"owners_count":25808437,"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-09-28T02:00:08.834Z","response_time":79,"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":["alpine-linux","packer","packer-plugin","terraform","upcloud"],"created_at":"2024-11-17T21:29:19.514Z","updated_at":"2025-09-28T14:32:02.054Z","avatar_url":"https://github.com/peknur.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packer Alpine Image\n\nBuilds Alpine Linux using QEMU and imports image as private template (custom image) to UpCloud.\n\n_Note that image has not been tested for production!_\n\n## Usage\nCheck variable defauls from `alpine.pkr.hcl` and build using defaults:\n```bash\n$ make build\n```\nUse `packer` cli to overwrite default values. For example make template available in `fi-hel1` and `fi-hel2` zones:\n```bash\n$ packer build -var 'upcloud_zones=[\"fi-hel1\", \"fi-hel2\"]' alpine.pkr.hcl\n```\nUsing defaults requires that `UPCLOUD_API_PASSWORD` and `UPCLOUD_API_USER` are provided using environment variables.  \nWhen deploying the server metadata service needs to enabled from UpCloud's control panel for image to work properly.  \n\n_Note that in a absence of KVM acceleration you need to increase wait times (`boot_wait` and inside `boot_command`) heavily._\n## Deployment example\n\nDeploy image using Terraform and setup instance using `user_data`. This example assumes that template was created with name `alpine-3-15-amd64` and that it's available in `pl-waw1` zone.\n\n`alpine.tf`\n```terraform\nterraform {\n  required_providers {\n    upcloud = {\n      source  = \"UpCloudLtd/upcloud\"\n      version = \"~\u003e2.0\"\n    }\n  }\n}\n\nprovider \"upcloud\" {}\n\ndata \"upcloud_storage\" \"alpine_image\" {\n  type = \"template\"\n  name = \"alpine-3-15-amd64\"\n}\n\nresource \"upcloud_server\" \"alpine\" {\n  hostname = data.upcloud_storage.alpine_image.name\n  zone     = \"pl-waw1\"\n  metadata = true\n  plan     = \"1xCPU-1GB\"\n\n  network_interface {\n    type = \"public\"\n  }\n\n  template {\n    storage = data.upcloud_storage.alpine_image.id\n    size    = 20\n  }\n\n  user_data = templatefile(\"alpine_user_data.sh\", {}) \n}\n```\n\n`alpine_user_data.sh`\n```sh\n#!/bin/ash\n\napk -U upgrade\napk add nginx\n\n# ... do more setup tasks at last stages in boot process. Network is available at this point.\n```\n## Debugging\nUse `PACKER_LOG=1` environment variable to get more detailed logs. Check Packer's [debugging](https://www.packer.io/docs/debugging) documentation for more info.   \nYou can also set QEMU `headless` property to `false` to see what is happening during OS build process.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeknur%2Fpacker-upcloud-alpine-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeknur%2Fpacker-upcloud-alpine-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeknur%2Fpacker-upcloud-alpine-image/lists"}