Manage virtual machines with VM Service
VM service controls how machine
executor and Remote Docker jobs are run.
This section describes the available configuration options for VM service. Refer to the default values.yaml
file for details on how to pre-scale virtual machines.
VM provider
The following configuration options are for the VM provider: either AWS or GCP.
AWS
Configure VM Service to work with AWS EC2 in your values.yml
. During installation you will have set up a security group and authentication. See the Installation Phase 3 - Execution Environments page for more information.
The information in this section describes post-installation configuration options for VM service.
Windows image
If you require Windows executors, you can supply an AMI ID in your values.yaml
file. To create a Windows image, use the CircleCI server Windows image builder.
vm_service:
providers:
ec2:
...
windowsAMI: "<my-windows-ami>"
Alternative Linux VM image
If you wish to provide a custom AMI for Linux machine executors, you can supply an AMI ID in your values.yaml
file. To create a Linux image, use the CircleCI server Linux image builder.
vm_service:
providers:
ec2:
...
linuxAMI: "<my-linux-ami>"
Default AWS AMI lists
The default AMIs for server v4.2 are based on Ubuntu 22.04.
x86 AMI list
Region | AMI |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Arm AMI list
Region | AMI |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GCP
Configure VM Service to work with GCP in your values.yml
file. During installation you will have set up a security group and authentication. See the Installation Phase 3 - Execution Environments page for more information.
The information in this section describes post-installation configuration options for VM service.
Windows image
If you require Windows executors, you can supply an AMI ID in your values.yaml
file. To create a Windows image, use the CircleCI server Windows image builder.
vm_service:
providers:
gcp:
...
windowsImage: "<my-windows-image>"
Alternative Linux VM image
If you wish to provide a custom AMI for Linux machine executors, you can supply an AMI ID in your values.yaml
file. To create a Linux image, use the CircleCI server Linux image builder.
vm_service:
providers:
gcp:
...
linuxImage: "<my-linux-image>"
Instance preallocation
If Docker Layer Caching (DLC) is used, VM Service instances need to be spun up on demand. For this to happen, either ensure any preallocated instances are in use, or set both remote Docker and machine preallocated instance fields to 0 . |
When using preallocated instances be aware that a cron job is scheduled to cycle through these instances once per day to ensure they do not end up in an unworkable state. |
To configure server to keep instances preallocated, use the keys shown in the following values.yaml
examples:
vm_scaler:
# -- Number of replicas to deploy for the vm-scaler deployment.
replicas: 1
# -- Configuration options for, and numbers of, prescaled instances for remote Docker jobs.
prescaled:
- type: l1.medium
image: docker-default
docker-engine: true # remote Docker environment
cron: ""
count: 2
vm_scaler:
# -- Number of replicas to deploy for the vm-scaler deployment.
replicas: 1
# -- Configuration options for, and numbers of, prescaled instances for remote Docker jobs.
prescaled:
- type: l1.medium
image: default
docker-engine: false # machine execution environment
cron: ""
count: 2
Apply changes
Apply the changes made to your values.yaml
file:
namespace=<your-namespace>
helm upgrade circleci-server oci://cciserver.azurecr.io/circleci-server -n $namespace --version 4.2.7 -f <path-to-values.yaml>