Skip to content

An automated CentOS Stream Desktop Packer project (currently, version 8) that builds boxes using the latest CentOS Stream release πŸ”₯πŸ”₯πŸ”₯

License

Notifications You must be signed in to change notification settings

ProfessorManhattan/packer-centos-desktop

Repository files navigation

CentOS Stream Desktop Template for Packer

Curated by Megabyte Labs



An automated CentOS Stream Desktop Packer project (currently, version 9) that builds boxes using the latest CentOS Stream release


Table of Contents

Overview

This project houses configurations that can be used to build performant CentOS Stream Desktop images. It uses a CentOS Stream image as a base, uses Packer to automate the build process, and then sets the image up using some Bento scripts which take care of optimizing the image for your system (i.e. setting up SSH with the Vagrant default public key, setting up GuestAdditions for VirtualBox, etc.). This project is intended to be used to create desktop images that you would launch from your main desktop using a GUI. If you are looking for headless images, you should either use Bento's server images. You might also have some luck browsing through our Packer projects.

This project:

  • Currently builds a minimal CentOS Stream Desktop 9 VM image by default
  • May contain multiple templates which will all end in template.json and be present in the root of the project
  • Automates the process of keeping our CentOS Stream Desktop 9 VM images up-to-date with the latest upstream source by (1) using the vagrant-cloud post-processor to automatically upload the box after it is built and (2) running the build with a cronjob
  • In some cases, LatestOS is used to automatically update the link to the base image / checksums to the latest release

Supported Virtualization Platforms

This project supports creating boxes for the following virtualization platforms:

Requirements

  • At least one of the above virtualization platforms installed (VirtualBox is a good starting point if you do not already have one of the platforms installed)
  • Packer
  • Vagrant

Quick Start

If you have VirtualBox and Vagrant installed, you can quickly spin up the finished product of this repository by running the following code in the root directory of this repository:

vagrant up

The default username and password are both vagrant.

Creating Your Own Box

You can quickly use this project to create your own minimal CentOS Stream Desktop 9 box by:

  1. Creating a box on VagrantUp titled CentOS-Desktop (Note: The VagrantUp box name should match the "box_basename" in the template.json file.)
  2. Changing the "vagrantup_user" variable in template.json to your VagrantUp username
  3. Acquiring a VagrantUp API token from the settings page
  4. Running the following code
bash start.sh # Ensures Bodega is installed
export VAGRANT_CLOUD_TOKEN=YourTokenHere
task packer:build

What is Bodega?

After running the code above, you will kick off a parallelized build for all the virtualization platforms that your computer currently has installed. If you want to install all of the virtualization platforms that your computer could potentially support then you can run task packer:install:platforms.

After building the VM images, the example above will upload your images to your VagrantUp box repository (that you have to create before running the script that is above). If you want to build the box for another provider then look at the template.json in the "builders" section for the types of boxes you can create (e.g. virtualbox-iso, vmware-iso, parallels-iso, qemu).

If you do not want your box to be automatically uploaded to VagrantUp after you build it with Packer then you will need to remove the "vagrant-cloud" section under "post-processors". The section is wrapped in a nested array. If you are removing the vagrant-cloud post-processor, then the section no longer has to be placed in a nested array.

Updating Your Box

If a new release of the CentOS Stream Desktop 9 system is available, you can update your VagrantUp box. You can do this by changing the "iso_checksum_url", "iso_url", and "iso_version" variables in the template.json file. After that, run packer build -only=virtualbox-iso template.json to build the image again.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page. If you would like to contribute, please take a look at the contributing guide.

Sponsorship

Dear Awesome Person,

I create open source projects out of love. Although I have a job, shelter, and as much fast food as I can handle, it would still be pretty cool to be appreciated by the community for something I have spent a lot of time and money on. Please consider sponsoring me! Who knows? Maybe I will be able to quit my job and publish open source full time.

Sincerely,

Brian Zalewski

Open Collective sponsors GitHub sponsors Patreon

Affiliates

Below you will find a list of services we leverage that offer special incentives for signing up for their services through our special links:

MailChimp DigitalOcean Referral Badge

License

Copyright Β© 2020-2021 Megabyte LLC. This project is MIT licensed.