Application deployment based on image fingerprint
Instantiation of a deployment image is accelerated by associating images with fingerprints, including fingerprints of constituent images (e.g., container and application images) of the deployment image. A database is maintained that associates hosts with the fingerprints of images instantiated thereon. When deploying the deployment image, a host associated with at least a portion of the fingerprint of the deployment image is identified and only the portion of the deployment image that is not already present on the host are transmitted to the host. An application image may be loaded into an already-executing container. The container may be restarted and invoke an entrypoint that references an orchestrator agent that retrieves and loads the application image into the container and invokes the entrypoint of the application image.
1 . An apparatus comprising:
a computing device including one or more processing devices and one or more memory devices operably coupled to the one or more processing devices, the one or more memory devices storing executable code that, when executed by the one or more processing devices, causes the one or more processing devices to:
receive a request over a network to instantiate a deployment image, the deployment image having a fingerprint associated therewith;
identify a host in a fingerprint database having an association between a first portion of the fingerprint and the host, the association between the first portion of the fingerprint and the host indicating that a first portion of the deployment image is located on the host, the host being remote from the apparatus, the first portion of the fingerprint corresponding to a the first portion of the deployment image; and
in response to identifying the host in the fingerprint database having the association between the first portion of the fingerprint and the host, invoke instantiation of the deployment image on the host over the network by transmitting only a second portion of the deployment image other than the first portion of the deployment image to the host over the network for instantiation of the deployment image on the host.
2 . The apparatus of claim 1 , wherein the executable code, when executed by the one or more processing devices, further causes the one or more processing devices to instantiate the deployment image on the host by:
determining that the host has all of the fingerprint associated therewith; and
in response to determining that the host has all of the fingerprint associated therewith, invoking instantiation of the deployment image on the host from a copy of the deployment image local to the host.
3 . The apparatus of claim 1 , wherein the executable code, when executed by the one or more processing devices, further causes the one or more processing devices to instantiate the deployment image on the host by:
determining that the host does not have a second portion of the fingerprint associated therewith; and
in response to determining that the host does not have the second portion of the fingerprint associated therewith, transmitting a-the second portion of the deployment image to the host, the second portion being associated with the second portion of the fingerprint.
4 . The apparatus of claim 3 , wherein the first portion of the deployment image is a container image and the second portion of the deployment image is an application image.
5 . The apparatus of claim 3 , wherein the first portion of the deployment image is one or more first layers of a container image and the second portion of the deployment image is one or more second layers of the container image.
6 . The apparatus of claim 1 , wherein the executable code, when executed by the one or more processing devices, further causes the one or more processing devices to identify the host having the at least the first portion of the fingerprint associated therewith by:
selecting the host from among one or more hosts having hardware resources sufficient to instantiate the deployment image.
7 . The apparatus of claim 1 , wherein the executable code, when executed by the one or more processing devices, further causes the one or more processing devices to identify the host having the at least the first portion of the fingerprint associated therewith by:
selecting the host from among one or more hosts having attributes required for instantiation of the deployment image.
8 . A method comprising:
receiving, by a computer system, over a network, a request to instantiate a deployment image, the deployment image having a fingerprint associated therewith;
identifying, by the computer system, a host in a fingerprint database having an association between a first portion of the fingerprint and the host, the association between the first portion of the fingerprint and the host indicating that a first portion of the deployment image is located on the host, the host being remote from the computer system, the first portion of the fingerprint corresponding to the first portion of the deployment image; and
in response to identifying the host in the fingerprint database having the association between the first portion of the fingerprint and the host, invoke instantiation of the deployment image on the host over the network by transmitting a second portion of the deployment image other than the first portion of the deployment image to the host over the network for instantiation of the deployment image on the host.
9 . The method of claim 8 , wherein instantiating the deployment image on the host comprises:
determining that the host has all of the fingerprint associated therewith; and
in response to determining that the host has all of the fingerprint associated therewith, invoking instantiation of the deployment image on the host from a copy of the deployment image local to the host.
10 . The method of claim 8 , wherein instantiating the deployment image on the host comprises:
determining that the host does not have a second portion of the fingerprint associated therewith; and
in response to determining that the host does not have the second portion of the fingerprint associated therewith, transmitting the second portion of the deployment image to the host, the second portion being associated with the second portion of the fingerprint.
11 . The method of claim 10 , wherein the first portion of the deployment image is a container image and the second portion of the deployment image is an application image.
12 . The method of claim 10 , wherein the first portion of the deployment image is one or more first layers of a container image and the second portion of the deployment image is one or more second layers of the container image.
13 . The method of claim 8 , wherein identifying the host having the at least the first portion of the fingerprint associated therewith comprises selecting the host from among one or more hosts having hardware resources sufficient to instantiate the deployment image.
14 . The method of claim 8 , wherein identifying the host having the at least the first portion of the fingerprint associated therewith comprises selecting the host from among one or more hosts having attributes required for instantiation of the deployment image.