Appcircle Server Cloud Marketplaces — Image Build¶
This document describes how Appcircle Server machine images are built for multiple cloud providers using HashiCorp Packer. The pipeline is maintained in the server-image-packer repository and produces consistent, ready-to-run images for AWS, Azure, and Google Cloud from a single golden image definition.
Purpose¶
- Build cloud VM images that already have Appcircle Server and its dependencies installed.
- Standardize the same base OS, Docker setup, and Appcircle installation across AWS, Azure, and GCP.
- Automate image creation so new versions (e.g. Appcircle Server updates) can be built and published without manual per-cloud steps.
- Support multi-cloud from one codebase: one Packer template, one set of provisioner scripts, multiple cloud outputs.
For what Packer is and why we use it, see ADR-0009: Use HashiCorp Packer for Appcircle Server Cloud Marketplace Images.
What the Pipeline Does¶
Base images¶
We start from Ubuntu 22.04 LTS on each cloud:
- AWS – Canonical’s
ubuntu-jammy-22.04-amd64-server-*AMI. - Azure – Canonical’s
0001-com-ubuntu-server-jammy(22_04-lts). - GCP –
ubuntu-2204-ltsfrom theubuntu-os-cloudproject.
Single provisioner¶
The same script runs on every build: setup-server.sh. It:
- Updates the system and installs dependencies (e.g.
curl,unzip). - Installs Docker.
- Downloads and installs the Appcircle self-hosted server package.
- Runs the Appcircle install flow, exports a sample project, and pulls container images.
- Configures swap and any other required setup.
Output¶
Packer produces one image per enabled builder, for example:
- AWS – AMI named like
appcircle-server-v3.29.8. - Azure – Managed image in the specified resource group.
- GCP – Custom image in the project (e.g.
appcircle-server-v3-29-8).
Version and naming¶
Appcircle Server version and image naming are controlled by locals in build.pkr.hcl (e.g. appcircleServerVersion, appcircleServerVVersion, appcircleServerVVersionWithDash). Updating those and re-running Packer produces new images with the new version in the name.
Installing Packer¶
Packer is not bundled in the repo; you need to install it on your machine.
- Official install guide: Install Packer | Packer | HashiCorp Developer
- Recommended version: Packer v1.15.0 or higher.
After installation, ensure packer is on your PATH and run:
packer version
How to Use the Project¶
1. Clone and enter the Packer directory¶
git clone <this-repo>
cd server-image-packer/packer
2. Install required Packer plugins¶
From the packer directory:
packer init .
This downloads the plugins defined in the packer block (amazon, azure, googlecompute).
3. Configure variables and authentication¶
Variables are defined in variables.pkr.hcl and can be set via environment variables or -var / -var-file.
AWS
- Set credentials (e.g.
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, or use IAM roles/SSM). - Optional:
PKR_VAR_aws_region(default:us-east-1).
Azure
ARM_CLIENT_ID,ARM_CLIENT_SECRET,ARM_SUBSCRIPTION_IDTF_VAR_azure_resource_group(or variableazure_resource_group)- Optional:
PKR_VAR_azure_region(default:eastus).
Google Cloud
- Authenticate with GCP (e.g.
gcloud auth application-default loginorGOOGLE_APPLICATION_CREDENTIALS). - Set project:
PKR_VAR_gcp_project_id(or default in variables, e.g.dev-appcircle). - Optional:
PKR_VAR_gcp_zone(default:us-central1-a).
4. Choose what to build¶
In build.pkr.hcl, the build block lists which sources are active. You can:
- Build everything (all uncommented sources):
packer build .
- Build only one cloud using
-only:
packer build -only=amazon-ebs.ubuntu-lts .
packer build -only=azure-arm.ubuntu-lts .
packer build -only=googlecompute.ubuntu-2204-lts .
Comment or uncomment the corresponding source "source.*" blocks in the build block to enable or disable clouds without changing the builder definitions.
5. Validate before building¶
packer validate .
Project Layout¶
server-image-packer/
├── README.md # Overview and usage
├── packer/
│ ├── build.pkr.hcl # Packer config: plugins, builders, build block, provisioners
│ ├── variables.pkr.hcl # Input variables (regions, project id, credentials via env)
│ └── setup-server.sh # Provisioner script: Docker + Appcircle Server install
Updating Appcircle Server Version¶
- Edit
packer/build.pkr.hcland update theappcircleServerVersion(and related locals if you use custom naming). - Run
packer init .if you haven’t already or after changing plugins. - Run
packer build .(or-only=...for a single cloud). - Use the new image IDs/names in your cloud deployment (e.g. Terraform, console, or CLI).
Publishing Images to Cloud Marketplaces¶
After Packer has produced new images, use these steps to publish them to the cloud marketplaces.
Replace version examples (e.g.
3.26.2) with the actual release version you are publishing.
Azure Marketplace (Partner Center)¶
- Go to
https://partner.microsoft.com/. - Click Partner Center (top-right) and log in.
- In the left navigation, open Marketplace offers.
- Select the Appcircle Server offer (e.g.
acserverv0). - Go to Plan overview → select the Plan BYOL plan.
- Open the Technical configuration tab.
- Under VM images, click Add VM image and fill in:
- Version number:
<VERSION>(e.g.3.26.2). - Add a gallery image:
- Image type:
x64 Gen1and/orx64 Gen2(matching what we built). - Gallery image:
Appcircle-Server. - Gallery image version:
<VERSION>(same as above).
- Image type:
- Click Save at the bottom of the page.
- Click Review and publish.
- At the Publisher signoff step, click Go live.
- Wait for the publish process to complete (status in Partner Center).
AWS Marketplace¶
- Log in to the AWS Marketplace Management Portal.
- Open the Appcircle Server product:
https://aws.amazon.com/marketplace/management/products/prod-csqadmmuihsnk/overview - Go to the Versions page:
https://aws.amazon.com/marketplace/management/products/prod-csqadmmuihsnk/overview/versions - Click Add version and fill in:
- Version title:
<VERSION>(e.g.3.26.2). - AMI ID: the AMI ID created by the Packer build for this release.
- Role ARN:
arn:aws:iam::813745330516:role/AmiIngest. - Save and follow the AWS Marketplace workflow to validate and publish the new version.