Google has released a new technical paper and an open-source reference implementation to help its cloud platform customers quickly and automatically build custom images for their Google Compute Engine and Docker applications.
The goal is to give enterprises a way to reduce the time it takes to get applications installed and running on Google’s cloud platform.
“When you run an application on a Compute Engine instance, you first have to deploy one or more virtual machines and configure them so your application works,” Google Solutions Architect Evan Brown said in blog post Wednesday. It is a process that typically involves installing the application and all its dependencies on the virtual machine and making application-specific configuration changes such as database connections or API keys, Brown said.
Enterprises currently can do this manually by connecting to each virtual machine when it boots up and configuring it to each application’s requirements. Or they could use configuration scripts that run automatically on startup and do the necessary customization.
Both methods have their problems, Brown said. Manual configuration is error-prone and painfully slow. Running automatic configuration scripts requires a lot of initial groundwork and may not always scale very well, he said.
A better approach is to build custom images for the different application requirements and use them to quickly install and deploy new cloud applications, he said.
Preinstalling software into a custom image can help reduce boot-up time and reduce an organization’s dependency on the availability of third-party repositories, Google said in its technical paper.
Enterprises can choose how much software and configuration settings to include in their custom images. At the lowest end, an image could contain just a base operating system image and some basic software and configuration tools. “For example, you can pre-install language runtimes like Java or Ruby, configure remote logging, or apply security patches,” the Google document said. Enterprises can then customize this base image for any application.
At the highest end, a custom image could include the base image as well as everything else that is required to run an application. That includes runtime and configuration information such as database connections and sensitive data that might be required to run the application.
Google’s technical paper outlines the different approaches that organizations can take to automate the process of building custom images for cloud applications. It relies on the use of open-source technologies like the Jenkins continuous integration server, the Packer tool for creating identical virtual machine images from a single source configuration and Kubernetes, Google’s Linux cluster management technology.
The technical paper said Google will walk enterprises through the process of building virtual images in a central project and then share those images with other projects within the organization. “Many of the best practices that apply to building software also apply to images,” Google’s technical paper said.
“You can version control to manage image configuration scripts; trigger builds when changes are made to those scripts; perform image builds automatically; and version and even test the resulting image artifacts when builds complete.”