Git Product home page Git Product logo

agent-maintenance-plugin's Introduction

Important Notice

This public repository is read-only because it has been moved. The repository is now maintained on jenkinsci/agent-maintenance-plugin.

Agent Maintenance Plugin for Jenkins

Jenkins Plugin GitHub release Jenkins Plugin Installs REUSE status

This plugin allows to take agents offline for one or more dedicated time windows on specific dates (e.g. due to a hardware/network maintenance) while allowing to configure any of the other availability strategies (e.g Keep online as much as possible or Bring this agent online according to a schedule) for the times when no maintenance window is active.

Maintenance activities are usually scheduled on weekends or outside normal business hours during the night. When you have many permanent agents this plugin helps to ensure that your builds are not unexpectedly killed because of a planned network interruption, an OS update or a reboot of the machine.

Configuration

On the Jenkins main configuration page you can enable that for newly created (permanent) agents, the agent maintenance availability is automatically injected. (this does not apply to cloud agents where it doesn't make sense as the agent is deleted right after it was used for a build usually. Not all Cloud implementations inherit from the corresponding classes so that they are detected).

Using the button Inject will inject it to all existing agents when not already configured. The currently configured availability will be set as the regular availability. This is useful directly after installing the plugin.

The same way the button Remove will remove the agent maintenance availability and restore the configured default availability as the agents availability.

When creating a new agent select Take agent offline during maintenance, otherwise use other availability.

Configuration

To enable for an existing agent open the agent overview page, select Maintenance Windows and then click on the Enable button. It is possible to also enable it via the configure page but then you need to reconfigure the existing Availability settings.

Defining maintenance windows

Individually for a single agent

Maintenance windows can be defined by opening the corresponding link on the agents overview page. Using the "Add" button you can directly define a new maintenance window. Via the "Edit" button one can edit existing maintenance windows (and also add and delete). To directly delete a maintenance windows click the "x" next to it or mark the checkboxes and use the "Delete selected" button to delete several maintenance windows.

For many agents simultaneously

Going to "Manage Jenkins->Agent Maintenance" will present you a list of all currently defined maintenance windows of all agents. Using the button "Add" allows to use a label expression to select a list of agents for which to apply the maintenance window. Use the "x" to directly delete a single maintenance window or use the checkboxes to mark multiple windows and delete with the "Delete selected" button.

Best practices

When defining a maintenance window one has to consider the time it takes for any running build to finish. So if the actual maintenance starts at 8 AM and your builds usually run for 30 minutes you might set the start time to 7:15 AM and define a "Max waiting time in minutes for builds to finish" of 45 minutes.

At 7:15 the agent will stop accepting new tasks, running build should have enough time to finish. If a build is still running when the max waiting time is reached an abort request is sent to the build.

Contributing

Refer to our contribution guidelines.

License

Copyright 2022 SAP SE or an SAP affiliate company and agent-maintenance-plugin contributors. Licensed under the Apache License, Version 2.0. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.

agent-maintenance-plugin's People

Contributors

ajinkyapatil8190 avatar mawinter69 avatar ospo-bot[bot] avatar sebastianwolf-sap avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

agent-maintenance-plugin's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.