Flexible and Efficient Thanks to Custom Images
In addition to the popular, widespread and universally applicable Linux distributions, there are several specialized distributions and "virtual appliances" for the most varied requirements. And even with prevalent distributions, there are times when it makes sense to use an adapted installation as a base for new servers rather than the standard image. Thanks to "custom images" at cloudscale.ch, you can now adapt your virtual servers to your requirements even before the initial start-up, which minimizes subsequent configuration time.
Advantages of custom images
Thanks to a wide range of ready-made images from popular Linux distributions and security appliances, your servers at cloudscale.ch are ready for use in no time. In addition, further operating systems can be installed manually via ISO/USB images. Now, you can combine the best of both worlds: using your own individual images makes it quick and easy for you to create new servers with complete flexibility in terms of pre-installed software and configurations.
Your own images will enable you to handle numerous use cases even more elegantly. You can now integrate tools that you would install on your servers anyway directly into your own image, e.g. packages for monitoring and configuration management, as well as utilities that make your everyday work easier. If you need your server for a specific purpose that already has a specialized distribution or appliance, you can simply import this as a custom image and you are good to go.
Image management via API
You can import your own images into your cloudscale.ch account with a simple API call. Shortly afterwards you will be able to create new servers on this base, referencing your own image e.g. with its specific UUID, which will remain valid for as long as the image exists in your account. Alternatively, you can enter the "slug" that you determined when you added the image, along with the prefix
custom:. This is particularly useful if, in future, you want to include more recent versions as seamlessly as possible: if there are several image versions with e.g. the slug "voip-pbx", the most recent image will automatically be used when starting a new server using
To import an image into your account, simply indicate the HTTP(S) address where the image is available in the API call. Our system will then load this image directly from this URL and make it available to you in the desired cloud locations. If you are creating/editing your image locally and do not have a web server available, you can use our Object Storage. Once you have uploaded the image (e.g. with
s3cmd --acl-public put ...) into a bucket of your choice, all you have to indicate in the API call is the resulting URL:
In the simplest case, your desired distribution makes an image file available that you can import one-to-one into cloudscale.ch. If multiple image files are available, a name containing "OpenStack" or "cloud" usually indicates the right version. Please be aware that the image file needs to be in "raw" format; if required, you can convert the image using e.g.
qemu-img (often in the
qemu-img convert -f qcow2 -O raw my-image.qcow2 my-image.raw
You will, however, gain the greatest benefit by adapting your image specifically to your requirements and pre-installing frequently used tools. One way of doing this is by means of a virtual server, e.g. based on QEMU/KVM, that you install locally and where you put together your sample installation. The file that serves as a virtual hard drive can then be imported as a custom image (after converting it to "raw", if necessary) for your future cloud servers. If you maintain numerous images or update them frequently, this process can be automated with specialized tools such as "Packer".
When creating your images, please ensure that they will also boot up in a slightly changed environment, as every cloud server you create based on your image will be assigned e.g. its own IP and MAC address. If it is not already included in your setup, we recommend
cloud-init for this purpose. This useful package is the de facto standard in the cloud setting and can configure numerous parameters automatically when a server first boots up. It also evaluates the "user data" you can specify when starting a server, which allows further automated setting up of your servers during the initial boot process.
For each cloud location, you can store those images that are already perfectly prepared for your future servers – you will only be charged for the space actually required on our SSD storage. Any one-time adjustments you make to your images are an investment that you will benefit from again with every additional server.
Preparation is everything!
Your cloudscale.ch team