In cloud computing, it is common to install an agent on a virtual machine (VM) in order to collect metrics and logs, and to monitor health of the VM and any applications being run at the VM.
Installing an agent on a VM can be performed through a command-line tool. There are several drawbacks to this approach. First of all, users may not even be aware of the need for the agent to be installed, meaning that monitoring of a problem often begins only after the problem begins to occur. Furthermore, it is not always clear to users which VMs do and do not have agents installed, and whether the VMs are updated to the appropriate version of the desired agent. Furthermore, command-line tools require a certain degree of technical sophistication that not all users possess.
Setting up a third-party automation tool to manage agent installation and updating may address the user's lack of awareness as to whether agents need to be installed or updated, but requires some technical sophistication to set up. Furthermore, the use of third-party tools creates an added layer of reliance, so that the VMs operate correctly only when the third-party tool itself is installed correctly and up-to-date.
The present disclosure provides a method and system for installing and updating agents on VMs without requiring the technical proficiency of command-line tools while also removing the reliance on third-party automation tools. This is accomplished using a policy for controlling a plurality of pre-installed packages included in a VM image. The VM image may be used to create the user's VMs, and may further control one or more policies for managing installation and update of agents on the user's VMs.
One aspect of the disclosure is directed to a method for installing an agent at one or more virtual machines (VMs) of a VM fleet, the method including: transmitting, by one or more processors, a message to a user interface, the message requesting a user input for setting a policy for installation of the agent at the VM fleet; receiving, by the one or more processors, the user input for setting the policy for installation of the agent at the VM fleet; setting, by the one or more processors, the policy for installation of the agent at the VM fleet based on the user input; and installing, by the one or more processors, the agent at the one or more VMs according to the policy.
In some examples, the message may include an indication of a plurality of the VMs included in the VM image, the user input may include a selection of VMs from the plurality of VMs indicated in the message, and the policy may be set for the selection of VMs based on the user input.
In some examples, the selection of VMs may specify at least one of a project, an operating system (OS), a distributed network region or a distributed network zone at which the policy is set.
In some examples, the method may further include: detecting, by the one or more processors, a user action; and transmitting, by the one or more processors, the message to the user interface in response to the user action.
In some examples, the user action may be: a user instruction to install the agent at a VM of the VM fleet; or a user instruction to create a new VM at the VM fleet.
In some examples, analyzing the VM fleet data may include determining a number of VMs at which the agent is not installed or is not up to date, transmitting the message to the user interface may be in response to the determined number of VMs meeting or exceeding a threshold value, and the message may include an indication of the determined number of VMs.
In some examples, transmitting the message to the user interface may be performed at regular intervals.
In some examples, installing the agent at the one or more VMs may include assigning, by the one or more processors, a label to the one or more VMs, the label indicating to install or update the agent.
In some examples, installing the agent at the one or more VMs may be performed asynchronously at regular intervals based on the assigned labels.
In some examples, the agent may be an operational agent configured to collect telemetry data from the one or more VMs of the VM fleet.
Another aspect of the disclosure is directed to a system for installing an agent at one or more virtual machines (VMs) of a VM fleet including one or more processors and memory in communication with the one or more processors. The memory may contain instructions configured to cause the one or more processors to: transmit a message to a user interface, the message requesting a user input for setting a policy for installation of the agent at the VM fleet; receive the user input for setting the policy for installation of the agent at the VM fleet; set the policy for installation of the agent at the VM fleet based on the user input; and install the agent at the one or more VMs according to the policy.
In some examples, the message may include an indication of a plurality of the VMs included in the VM image, the user input may include a selection of VMs from the plurality of VMs indicated in the message, and the instructions may be configured to cause the one or more processors to set the policy for the selection of VMs based on the user input.
In some examples, the selection of VMs specifies at least one of a project, an operating system (OS), a distributed network region or a distributed network zone at which the policy is set.
In some examples, the instructions may be configured to cause the one or more processors to: detect a user action; and transmit the message to the user interface in response to the user action.
In some examples, the user action may be: a user instruction to install the agent at a VM of the VM fleet; or a user instruction to create a new VM at the VM fleet.
In some examples, the instructions may be configured to cause the one or more processors to determine a number of VMs at which the agent is not installed or is not up to date, transmitting the message to the user interface may be in response to the determined number of VMs meeting or exceeding a threshold value, and the message may include an indication of the determined number of VMs.
In some examples, the instructions may be configured to cause the one or more processors to transmit the message to the user interface at regular intervals.
In some examples, the instructions may be configured to cause the one or more processors to install the agent at the one or more VMs using a label assigned to the one or more VMs, the assigned labels indicating to install or update the agent.
In some examples, the instructions may be configured to cause the one or more processors to install the agent at the one or more VMs asynchronously at regular intervals based on the assigned labels.
In some examples, the system may further include a plurality of VMs included in the VM fleet.
The present disclosure uses installation policies that give instructions to a pre-installed package of a VM image to manage installation and update of agents on the user's VMs. The policies for the pre-installed package may be controlled via a user interface (UI). The UI may initially output a message to a user, and then subsequently transmit a user input received in response to the outputted message. For example, the message may inform the user of the importance of installing an agent for collecting metrics and logs, and requesting the user's permission to install the agent on all existing VMs, or on all existing VMs that do not currently have the agent. In such an example, the user input may be an instruction to install the agent on the VMs. In another example, the message may request the user's permission to create a policy for automatically adding agents to newly created VMs moving forward, or for automatically updating previously added agents to a latest non-breaking version. In such an example, the user input may be an instruction to perform the automatic agent installation or updating.
In some examples, the pre-installed package may be programmed to respond to the user input to install the agent by immediately installing the agent. In other examples, the pre-installed package may be programmed to, in response to the user input, assign a label to those VMs at which the user wishes to install an agent. Once the label is assigned, a secondary program may be utilized to install the agents based on the labels. For instance, the secondary program may run at regular intervals, such as every ten minutes, to check for and install requested agents. The secondary program can install the agents at the same time, or in batches according to the regular intervals.
In some examples, the initial step of outputting the message may be performed at regular intervals of time, or in response to a user action such as creating a new VM. In other examples, the pre-installed package may further include fleet-based rules or benchmarks for determining when to execute the initial step of outputting the message. For example, the rules or benchmarks may predefine a threshold number and output the message to the UI when the number of installed VMs without the agent meets or exceeds the threshold number. For further example, rules or benchmarks may predefine a threshold amount of time, and output the message to the UI when an amount of time since release of an update to a previously installed agent meets or exceeds the threshold amount of time without the previously installed agent being updated.
By utilizing pre-installed packages in the VM image, the methods and systems of the present disclosure enable users to set up UI-based policies and rules for managing fleet-wide agent deployment. The UI-based policies and rules concurrently lower the technical proficiency required of the user to manage the fleet while also raising user awareness of the need to install agents before problems begin to occur. The system may also enable control of the policies via an application program interface API, command line tool and packages for infrastructure automation providers to enable automated management of the policies in addition to or as an alternative to the user interface control
The client device 110 may include a processor and memory with any one or combination of data and instructions, whereby data included in the memory may be analyzed or otherwise processed by the processor based on the instructions. The client device may send and receive data over the network 130. Additionally, the client device 110 includes a user interface 112. The user interface 112 may be configured to communicate received data to a user of the client device 110, and to receive user inputs from the user. For instance, the user interface may include a screen, speaker, keys, buttons, a touch sensitive area, a camera, a microphone, or other known peripherals, or any combination of the foregoing, for providing output to the user and receiving inputs from the user. While only one client device is shown, it should be understood that any number of client devices may communicate over the network 130.
The VMs 122 of the VM fleet 120 may be configured execute one or more tasks on behalf of a client, such as a user of the client device 110. The fleet 120 may further include a manager 124 configured to manage the VMs 122 included in the fleet 120 based on instructions. The manager 124 may include memory including data and instructions, such as data about the VMs 122 and one or more routines for controlling management of the VMs 122, and one or more processors for processing the data and executing the instructions included in the manager 124. The memory and processors may belong to a single hardware device or to multiple devices, such as in a distributed network architecture. Management of the VMs may include creating the VMs, assigning or reassigning tasks to the VMs, monitoring health of the VMs, and so on.
The system 100 is further illustrated in
The network storage 140 may include a VM image 142 from which the VMs 122 of the VM fleet 120 may be created. The VM image 142 may include parameters and policies dictating operation of the VM 122 created from the image. The VM image 142 may also include software, or a listing of software, to be installed on the VM 122 created from the image. For instance, the software may include one or more installation packages 144 for installing VM agents. VM agents may be configured to do any one or combination of monitoring metrics of the created VM, monitoring system metrics, monitoring metrics of applications including third-party applications, or other known agent functions or operations. For instance, the agents may be observability agents to monitor health of the infrastructure, applications, or both. For further instance, the agents may be security agents to monitor security of the infrastructure, applications, or both. Additionally, VM agents may include daemons or other VM services that may be installed to selected VMs. The installation package 144 may itself include an installation policy 146 for controlling installation of the agent, such as whether the agent should be installed upon creation of the VM from the VM image 142, or whether a user should be notified about the possibility of installing the agent. In effect, the installation package 144 may itself be an agent that is automatically installed on the VM during instantiation.
In operation, the VM manager 124 may be configured to manage installation of the agent based on the instructions of the installation package 144, including the installation policy 146. The VM manager 124 may be configured to both set the installation policy 146 at selected VMs 122 of the VM fleet 120, and check for compliance with the installation policy 146. Checking for compliance with the installation policy may itself include both instructions for checking whether the agent is properly installed at each selected VM for installation and for bringing any non-compliant VMs into compliance. In some instances, bringing a VM into compliance may involve re-creating the VM at the same or different location, reinstalling the agent on the previously created VM, setting a configuration at the VM to ensure installation of the agent, and so on.
In the example routine 200 of
The VM manager may detect the user action at block 210. In response to detection of the user action, operations may continue at block 220 with the VM manager transmitting a nudge to the user. The nudge may be a message to the user advising the user of the need to install the agent at one or more VMs of the fleet. The message may be provided to the user in the user interface of the client device.
In another example, the message may indicate costs of installing the agent at the selected VMs. The costs may be determined based on predetermined criteria, information provided from the VM manager, or both. The projected costs may be useful for informing a user whether it is desirable to proceed with the suggested installation of agents, or may inform the user's selection of at which VMs to select for installation of the agent.
Returning to
In the example of
Also shown in the user interface 400 of
Continuing at block 240 to
In the example of
As can be seen in
In one example, a different batch of VMs may be checked at each fixed time. In another example, all VMs may be checked at a given fixed time up until a threshold amount of VMs needing service are discovered, and then remaining VMs may be checked at a next fixed time. In either case, the VMs are updated asynchronously at regular intervals over time, and avoid delaying other VM-related processes such as creating new VM instances.
Returning to
At block, 330, the VM manager sends the nudge to the user. The nudge may be similar to the nudge described in connection with block 220 of
The examples of
The above examples generally describe installation of an agent at one or more VMs of a VM fleet. It should be recognized that “installation” of an agent is not limited to adding the agent to a VM that has no version of the agent. To the contrary, installing the agent may also include updating a version of an agent already existing at the VM, whereby the new or up-to-date version of the agent is installed there. In this manner, checking whether an agent is installed at the VMs may involve either one or both of checking for any version of the agent and checking whether the installed version is up to date. Additionally, messages to the user may specify whether the VMs in the VM fleet are missing the agent altogether, or just missing the most up to date version of the agent. In a similar vein, asynchronous installation of the agent at multiple VMs may involve either one or both of newly installing the agent at a VM or updating a version of the agent at the VM. The above examples generally describe the interchangeable application of the present disclosure between newly installing agents and updating agents at a VM, and are not intended to limit the applicability of when or how an updated version of an agent can be installed.
Additionally, it should be recognized that the underlying principles of the present disclosure may be extended to installation of any software package at a select one or more VMs of a VM fleet. The underlying advantages of the present disclosure, such as providing users with a user interface-based means of controlling fleetwide installation policies, and streamlining fleetwide installation activities without hampering higher priority activities, may be realized for any type of installation that occurs at selected VMs based on user permissions.
Furthermore, the above examples generally describe setting installation policies for pre-existing VMs. However, the same underlying principles and techniques may also be used to set installation policies for VM instances created in the future. For instance, the nudge from the VM manager may ask a user whether the user wants to set a new policy to default install the agent upon instantiation at VM instances created in the future. The user selection may then contain an instruction to update the installation policy so that all newly created VM instances to include the agent. In response The VM manager may then update the installation policy for the agent so that future VMs created from the VM image in the network storage are default installed with the agent. Similarly, the policy may be changed to allow by default the updating of agents with new versions that are released in the future.
Like with installation policies for existing VMs and existing versions of an agent, default installation policies for future VMs and future versions of an agent may be set according to certain criteria, such as a project to which the future VM is assigned, an OS zone, or region of the future VM, and so on.
The above described principles for setting agent installation policies can similarly be applied to uninstallation. For instance, if a user wishes to uninstall an agent at several VMs of the VM fleet, the VM manager may be capable of processing a user selection of VMs for removal of the agent, or for rolling back the agent to a previous version. In this manner, the uninstallation or rollback of the agent can be streamlined on a fleetwide basis using the same or similar techniques as described herein.
Altogether, the techniques and routines of the present disclosure provide several advantages to VM clients. The automated nudges educate users as to the importance of installing monitoring and security agents, and further condition the users to recognize events that may necessitate an update to installation policies at the VM fleet. Additionally, because the streamlined instructions are passed through the VM manager, the user interface for the VM manager may be leveraged to communicate with the user, instead of having to rely on more complicated and technical means of network communication such as secure shell (SSH) protocol and command-line tools. Altogether, the techniques allow for fleetwide policies to be implemented with only a few button clicks from an intuitive interface.
Although the technology herein has been described with reference to particular embodiments, it is to be understood that these embodiments are merely illustrative of the principles and applications of the present technology. It is therefore to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the present technology as defined by the appended claims.
Most of the foregoing alternative examples are not mutually exclusive, but may be implemented in various combinations to achieve unique advantages. As these and other variations and combinations of the features discussed above can be utilized without departing from the subject matter defined by the claims, the foregoing description of the embodiments should be taken by way of illustration rather than by way of limitation of the subject matter defined by the claims. As an example, the preceding operations do not have to be performed in the precise order described above. Rather, various steps can be handled in a different order, such as reversed, or simultaneously. Steps can also be omitted unless otherwise stated. In addition, the provision of the examples described herein, as well as clauses phrased as “such as,” “including” and the like, should not be interpreted as limiting the subject matter of the claims to the specific examples; rather, the examples are intended to illustrate only one of many possible embodiments. Further, the same reference numbers in different drawings can identify the same or similar elements.