Skip to main content

Build VM images with Packer

Packer is an open source tool for creating identical Virtual Machine (VM) images for multiple platforms from a single source configuration. This page explains how to use Packer and FluentCI to create a VM image.

Before you begin

The instructions on this page assume that you are familiar with Packer. In addition:

Using the Packer Plugin

You can use FluentCI to build VM images using the packer plugin, no need to install Packer on your machine, FluentCI will handle everything for you.

The following command can be used to build VM image with Packer:

fluenci run --wasm packer fmt
fluenci run --wasm packer validate
fluenci run --wasm packer build

CI/CD pipeline integrations

The following examples show how to integrate FluentCI with popular CI providers to build VM images with Packer:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: fmt
run: fluentci run --wasm packer fmt
- name: validate
run: fluentci run --wasm packer validate
- name: build
run: fluentci run --wasm packer build