Custom VM Images
Add your own custom VM images from your cloud providers to WarpBuild
WarpBuild allows you to use your own custom VM images in your custom runner configurations while running them on your own cloud. This is useful if you are using a custom VM image that you have built due to a specific need.
💡 Note: The "images" referred to in this section are VM images. This is distinct from the custom container images support.
VM Image requirements
AMIs
- Linux and Windows based AMIs are currently supported.
Linux
- The Linux distro the image is based on should be using
systemd
. WarpBuild relies on it to run its agent. curl
andwget
should be present in the image.
Windows
aria2
is used for downloading the necessary artifacts since the default windows method is slow. The image needs to havearia2
present and it should be accessible through the systemPATH
. Below is sample script which can be used to install aria2.
- If working with AWS instances, the EC2 instance must be sysprepped before making a windows image out of it. Please look at the 'Additional Notes' > 'Windows' > 'Sysprep' section for details on sysprepping.
Additional Notes
Windows on AWS
The runners are run under the runneradmin user, the same user as github's windows runners. If this user is not present, it will be added. If you have user scoped environment variables, you might need to change them to system level or add them to the runneradmin user's environment instead.
Sysprep (GUI)
For generalizing using the GUI,
- RDP into the instance and open 'Amazon EC2Launch settings'. Press 'Shutdown with sysprep' > Press 'Yes' on the dialog box.
- The above step will disconnect you in some time. This is expected. Go to the instance in the ec2 dashboard and wait for the instance to reach 'Stopped' state (might take a min).
- Rest of the steps are mostly same. Use the console to create the image. Fill in the details. Unselect the 'reboot' option since we already have the machine in a shutdown state.
Wait for the AMI to be ready. The image should be a generalized one now.
Sysprep (Automation)
Refer to the following packer docs for sysprep automation. These commands can be invoked without the use of packer as well from a powershell instance.
Common issues
- Unable to RDP into the instance
We don't expose RDP port (3389) by default when you create a stack. You must add a security policy enabling the inbound TCP connections to 3389 from a.b.c.d/e (replace this with your CIDR block)
- Password incorrect when trying to login via Administrator
Administrator account for windows has a rotating password for each ec2 instance. AWS automatically creates and assigns this password. It is recommended that you create your own user and give it admin permissions. You can use the below commands to create the user and assign it admin.
Add the image
- Setup a WarpBuild Stack
- Add a VM image using the
Add Image
button on the custom images page. All the images in the region the stack is in will be listed. Select the image you want to use. - Create a custom runner using the image.
- Use the custom runner label in your workflows to run the jobs on this container image.
Pricing
There is no additional cost for using custom VM images.
Last updated on