Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

fkrull/atomic-workstation

 
 

Repository files navigation

Packer Templates for OSTree-based Fedora boxes

This repository contains Packer templates for Vagrant base boxes for some OSTree-based Fedora variants:

Current Boxes

Providers

  • Virtualbox (virtualbox)
  • Hyper-V (experimental) (hyperv)
  • QEMU/KVM (experimental) (qemu)

Building

Packer needs to be run for a specific box using one of the provided variables files. In theory it's possible to build for all virtualization providers at once, but they generally don't all run on any single system. Because of that Packer's -only flag needs to be used to limit the providers to build for.

$ packer build -only="*.virtualbox" -var-file="vars/fedora-iot.pkrvars.hcl" .

On Linux systems, it may be necessary to set TMPDIR to a path not on a tmpfs so some steps don't run out of space in /tmp. /var/tmp can be used instead.

Using the Makefile

The included Makefile provides a target to run Packer for a specific provider using a specific variables file, for example: make virtualbox/fedora-iot.

Notes on Hyper-V

Hyper-V requires a pre-configured switch with DHCP support; internet access is currently not required and is optional. The default switch does not work because the host's IP address is not detected correctly. You can either use an external switch connected to the primary network interface or an internal switch that has a DHCP server running on it. Packer will try to create or detect a switch automatically. An explicit switch can be passed using the hyperv_switch Packer variable.

Uploading

By default, the box files are not uploaded. The following variables control the upload process:

  • vagrant_cloud_upload - set to true to upload the box to Vagrant Cloud after building
  • vagrant_cloud_user - the account name to prepend to the box tag
  • vagrant_cloud_token - the Vagrant Cloud authentication token

These variables can be set in a *.auto.pkrvars.hcl file in the top-level directory or passed directly to Packer (-var=vagrant_cloud_upload=true). When using the Makefile, set the PACKER_ARGS variable: make [target] PACKER_ARGS="-var=vagrant_cloud_upload=true".

Proxy Settings

The templates respect the following network proxy environment variables and forward them on to the virtual machine environment during the box creation process:

  • http_proxy
  • https_proxy
  • ftp_proxy
  • rsync_proxy
  • no_proxy

About

Virtual machine templates for Fedora Silverblue

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 79.4%
  • Shell 15.2%
  • Smarty 5.0%
  • Makefile 0.4%