{"id":21090658,"url":"https://github.com/dgengtek/packer-templates","last_synced_at":"2025-05-16T13:31:32.043Z","repository":{"id":129275036,"uuid":"430770956","full_name":"dgengtek/packer-templates","owner":"dgengtek","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-22T19:02:36.000Z","size":271,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T01:32:07.808Z","etag":null,"topics":["bare-metal","bios","cloud-init","kubernetes","packer","packer-template","saltstack","systemd-boot","uefi"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/dgengtek.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":"2021-11-22T15:53:12.000Z","updated_at":"2024-10-07T20:17:14.000Z","dependencies_parsed_at":"2024-06-23T02:04:05.266Z","dependency_job_id":"c21bf3f8-0775-473d-8d27-209117fbd2a9","html_url":"https://github.com/dgengtek/packer-templates","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgengtek%2Fpacker-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgengtek%2Fpacker-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgengtek%2Fpacker-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgengtek%2Fpacker-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgengtek","download_url":"https://codeload.github.com/dgengtek/packer-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254538400,"owners_count":22087862,"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","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":["bare-metal","bios","cloud-init","kubernetes","packer","packer-template","saltstack","systemd-boot","uefi"],"created_at":"2024-11-19T21:39:04.292Z","updated_at":"2025-05-16T13:31:31.634Z","avatar_url":"https://github.com/dgengtek.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Packer images built with qemu\n\nThis repository contains configurations for building archlinux and debian from installation media provided from the distributions.\n\n## Requirements\n\n* docker\n  * if building without a docker container see the [dockerfile](Dockerfile)\n* [X86_virtualization](https://en.wikipedia.org/wiki/X86_virtualization)\n* [kvm](https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine) bound on /dev/kvm\n\n\nBuild the docker image for the required dependencies to build the images via packer\n\n    $ bash main.sh docker\n\n\n## Building images\nThe images can be pulled from the [named docker volume](#get-built-images)\n\nThe [terminal](./terminal/main.json) image is only supported for debian and\nallows live booting over pxe. This requires serving exported files by\npacker(the kernel, initrd and squashfs) over http and setting the kernel parameters\n`boot=live fetch=\u003chttp url to squashfs\u003e`\n\n\n### Building debian images\n\nExport the required environment variable\n\n    $ export PKR_VAR_distribution=debian-12.5.0-amd64\n\n\nBuild the debian base image.\n\n    $ packer build -var-file base/debian/vars/common.json -var-file base/debian/vars/${PKR_VAR_distribution}.json base/debian/\n    #\n    # or build inside docker\n    $ bash main.sh debian base\n\n\nBuild cloud image based on the new base image\n\n    $ packer build cloud\n    #\n    # or build inside docker\n    $ bash main.sh debian cloud\n\n\nBuild an image for kitchen based on the new base image\n\n    $ packer build kitchen\n    #\n    # or build inside docker\n    $ bash main.sh debian kitchen\n\n\nBuild salt image based on the cloud image\n\n    $ packer build -var parent_image_type=cloud salt\n    #\n    # or build inside docker\n    $ bash main.sh debian salt cloud\n\n\n### Building archlinux images\n\nExport the required environment variable\n\n    $ export PKR_VAR_distribution=archlinux-x86-64\n\n\nBuild the archlinux base image\n\n    $ packer build -var-file base/archlinux/vars/common.json -var-file base/archlinux/vars/${PKR_VAR_distribution}.json base/archlinux/\n    # or\n    $ bash main.sh archlinux base\n\n\nRepeat the same steps as with debian\n\nBuild cloud image based on the new base image\n\n    $ packer build cloud\n    # or\n    $ bash main.sh archlinux cloud\n\n\n## Building uefi images\n\nWhen using the wrapper without setting any environment variables it will use the OVMF from the docker image\n\n    $ bash main.sh --uefi debian base\n\nExport the required efi environment variables if you want to build without packer or want to provide your own OVMF which will be mounted into the docker container\n\n    $ export PKR_VAR_efi_firmware_code=\u003cpath to OVMF_CODE\u003e PKR_VAR_efi_firmware_vars=\u003cpath to OVMF_VARS\u003e\n    $ packer build ...\n\n\n## Get built images\n\n\nList available images\n\n    $ bash main.sh list\n\n\nPull image from volume\n\n    $ bash main.sh cat '\u003cabsolute filename\u003e' | tar -xf - -C \u003coutput path\u003e\n\n\n## Further options\n\nSee [common variables](./files/common.pkr.hcl) which can be set and given as arguments to either the `packer -var ... ` command or to  `bash main.sh \u003carchlinux|debian\u003e \u003cbuild_type\u003e -var ...`\n\n## Notes\n\n* make sure to disable or remove the packer user for ssh login with sudo permissions 'provision:provision'(user:password)\n* the user provision expires after 35 days - you will need to rebuild a dependant base image if used for building other images by packer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgengtek%2Fpacker-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgengtek%2Fpacker-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgengtek%2Fpacker-templates/lists"}