Creating your own infrastructure container images
In addition to the Triton-provided images, you can create your own custom images (private to you) for provisioning infrastructure containers. This section describes how.
To learn how to create HVM images, read our documentation.
Creating a custom image in the portal
To create a custom image on the Triton Compute Service portal follow these instructions.
Provision an instance from one of the following images that you want to use as a base. We will call this the prototype instance.
- Container-native
alpine-3
,centos-7
,centos-6
,debian-8
,debian-7
,nginx
,ubuntu-14.04
orubuntu-15.04
(all versions) - SmartOS
base-32
,base-64
,base-multiarch
,base-32-lts
,base-64-lts
orbase-multiarch-lts
(all versions) - SmartOS
base
orbase64
(image version 13.3.0 or later) - SmartOS
minimal-32
,minimal-64
,minimal-multiarch
,minimal-32-lts
,minimal-64-lts
orminimal-multiarch-lts
(all versions)
Customize your prototype instance the way you want it.
On the portal under the Compute tab, visit the Instances list and select your prototype instance to view the instance details. Under the Images section, you can create a new image. Give your new image a name, version number, (an optional) description, and Create Image.
Image creation takes a few minutes.
To see all your images and provision new instances, visit the Custom Images list. Select Create Instance and proceed to follow the prompts as per usual, selecting the package and adding metadata. Launch your new instance.
You should see your newly created instance provisioning under Instances.
Creating a custom image with command line tools
To create a custom image that you can use to provision your own instances, you will need the following:
- An account on Triton Compute Service.
- The
triton
CLI tool installed on a local machine such as a desktop or laptop. Make sure that you are using at least version 7.1.0 oftriton
.
The general procedure for creating a custom image is:
Provision an instance from an image that you want to use as a base. This is the prototype instance.
Customize your instance the way you want.
Execute triton image create
with the UUID of the stopped prototype instance to create an image.
It will take several minutes to create an image. The process of creating an image is as follows:
- Your instance is stopped to checkpoint the data on the instance so that it can be rolled back to its current state after the process ends.
- The prototype instance is rebooted.
- A script runs on the prototype instance to clear root and host SSH keys, as well as common log files from the prototype instance.
- An image is created from the prototype instance's root volume.
- The prototype instance is rebooted to the state of the checkpoint in step 1.
You can check on the progress of image creation with the triton image get <UUID>
. While the image is being created, its status will be creating
. When the image is ready, its status will be active
. If the status is failed
, see Troubleshooting Image Creation.
When your image is active, you can use triton instance create
to create a new instance based on the image you just created.
To see your custom image and all available Triton infrastructure and VM images, execute triton images
.
Considerations and limitations
- Currently, you can only create custom images from prototype instances that use the following images as their basis:
- Container-native
alpine-3
,centos-7
,centos-6
,debian-8
,debian-7
,nginx
,ubuntu-14.04
orubuntu-15.04
(all versions) - SmartOS
base-32
,base-64
,base-multiarch
,base-32-lts
,base-64-lts
orbase-multiarch-lts
(all versions) - SmartOS
base
orbase64
(image version 13.3.0 or later) - SmartOS
minimal-32
,minimal-64
,minimal-multiarch
,minimal-32-lts
,minimal-64-lts
orminimal-multiarch-lts
(all versions)
- Container-native
- You cannot create an image based on a custom image.
- Custom images are not intended to contain pre-populated databases, application data, keys or passwords. These items are best handled via a configuration management tool.
- Custom images are not a backup solution. Custom images do not backup the
/data
volume (/mnt
on Ubuntu Certified images) in HVM instances. - The more changes to disk you make in setting up your prototype instance, the larger the image will be, even if you clean up files. Keep the disk churn in your prototype instance to a minimum. Smaller images typically provision instances faster.
- Images are private to the user account that created them. You can add an access control list to let additional users create instances from your image.