Local protect image for critical applications
A critical executable image is used to instantiate an instance on a computing device. The executable image is further saved on the storage device. In response to a failure of the instance, the instance may be restored from the locally stored executable image. The executable image may be of a container and corresponding application image. The computing device may receive a specification, e.g., container specification, to instantiate the instance, the specification including an annotation instructing the computing device to locally store the executable image after instantiation.
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 an instruction from an orchestrator to instantiate an instance from an executable image;
in response to the instruction, instantiate the instance from the executable image by, passing the instruction to a container runtime interface (CRI) to instantiate the instance from the executable image, the CRI being an agent of the orchestrator;
in response to passing of the instruction, perform, by the CRI:
retrieve the executable image from an image store;
instantiate the instance from the executable image;
evaluate whether the instruction includes an annotation indicating that the executable image is to be locally stored on a persistent storage device coupled to the one or more processing devices after instantiating the instance from the executable image; and
in response to the annotation indicating that the executable image is to be locally stored on the persistent storage device after instantiating the instance from the executable image, store the executable image on the persistent storage device after instantiating the instance from the executable image; and
in response to a detected failure, re-instantiate the instance from the executable image on the persistent storage device.
2 . The apparatus of claim 1 , wherein the detected failure is failure of the instance.
3 . The apparatus of claim 1 , wherein the detected failure is failure of the computing device.
4 . The apparatus of claim 1 , wherein the instance is a container executing an application instance.
5 . The apparatus of claim 4 , wherein the instruction is a container specification.
6 . The apparatus of claim 1 , wherein the computing device is part of a cloud computing platform.
7 . A method comprising:
receiving, by a computer system including one or more processing devices and a persistent storage device coupled to the one or more processing devices, from an orchestrator, an instruction to instantiate an instance from an executable image, the instruction including an annotation indicating that the executable image is to be locally stored on the persistent storage device after instantiating the instance from the executable image;
instantiating, by the computer system, the instance from the executable image by passing the instruction to a container runtime interface (CRI) to instantiate the instance from the executable image, the CRI being an agent of the orchestrator;
in response to passing of the instruction, performing, by the CRI:
retrieving the executable image from an image store;
instantiating the instance from the executable image;
evaluating whether the instruction includes the annotation indicating that the executable image is to be locally stored on the persistent storage device after instantiating the instance from the executable image; and
in response to the annotation indicating that the executable image is to be locally stored on the persistent storage device after instantiating the instance from the executable image, store the executable image on the persistent storage device after instantiating the instance from the executable image; and
in response to a detected failure, re-instantiating, by the computer system, the instance from the executable image on the persistent storage device.
8 . The method of claim 7 , wherein the detected failure is failure of the instance.
9 . The method of claim 7 , wherein the detected failure is failure of the computer system.
10 . The method of claim 7 , wherein the instance is a container executing an application instance.
11 . The method of claim 10 , wherein the instruction is a container specification.
12 . The method of claim 7 , wherein the computer system is part of a cloud computing platform.