[Server] Customizing your VM Service AMI

How to build your own Custom AMI

On hosted installations of CircleCI, the AMI used for VM Service, which provides access to a dedicated Docker daemon via the machine executor (see Executor Types: Using Machine) and setup_remote_docker (see Running Docker Commands: Overview), is completely customizable.

By extending our default installed set of packages and dependencies to create your own custom VM Service AMI, you can install custom versions of Docker, as well as pre-bake any common frameworks, security tools, proxy settings, etc., into the AMI itself, simplifying the required setup and configuration steps that might otherwise have to live in the config.yml configuration files for any projects with jobs that require the machine executor or setup_remote_docker.


CircleCI Server 3.x/4.x

To build the image, you can utilize our open-source circleci-server-linux-image-builder

For AWS Installations, please view this link.

For GCP Installations, please view this link.


Server 4.x

Once the image is built, you can customize your values.yml to include the image build like so: 



Server 3.x

Once the image is built, you can add the AMI ID via the KOTS Admin Console. 


CircleCI Server 2.x

For 2.x, you can utilize CircleCI's open-source image-builder repository—the following set of steps should help you create your custom VM Service AMI.

  1. install Packer
  2. clone the picard-vm-image branch of image-builder
  3. fill in required groups in aws-vm.json
  4. add customizations (proxy settings, etc.) to the end of provision.sh
  5. run packer build aws-vm.json in the root of the image-builder directory
  6. add your new AMI to the "Custom VM AMI" field in the"VM Provider" section of the Replicated Management Console (see below)
  7. restart CircleCI
  8. fork and run realitycheck (see Using realitycheck) to verify that your new VM service AMI is functional (check the vm_jobs workflow)


Was this article helpful?
1 out of 1 found this helpful



Article is closed for comments.