Coder Social home page Coder Social logo

cloudify-healer-plugin's Introduction

Cloudify Healer Plugin

The purpose of the healer plugin is to enable agentless autohealing capability to Cloudify deployments. The functionality is intended to be conceptually similar to 'liveness probes' found elsewhere. The healer runs a process on the manager, and will only function for target hosts that have routable IPs from the manager.

Plugin types

The plugin defines a new node type and relationship type. The node type holds the configuration of the healer, and the relationship actually runs it.

cloudify.nodes.Healer

The Healer type configures the healer based on 4 different modes. The modes are selected by setting the type property to one of:

  • ping - Performs ICMP pings on a host
  • http - Performs an HTTP get on a URL
  • port - Performs an connection open on a TCP port
  • custom - TBD
Common Properties
  • cfy_creds - Cloudify manager login credentials of the form username,password,tenant_name. This is needed by the healer to run the heal workflow on the target node. These are best stored using the secret store.
  • debug - The plugin starts a background process that logs to '/tmp/healer_<deployment_id>_pid.log'. This logging occurs at info level unless the debug property is true.
  • config/count The number of failed attempts that will trigger a heal.
  • config/frequency The pause between retries in seconds
Ping

The ping healer performs an ICMP ping on the target host. Take care that the target host permits inbound ICMP traffic from the manager. It only requires the common properties to operate.

HTTP

The HTTP healer performs an HTTP GET on the target host. If a non-2xx response status code is received, it is regarded as a failure. Lower level connection problems also will count as failures. Besides the common properties, the HTTP healer needs:

  • port - The target port (int)
  • path - The URL path (string)
  • secure - Whether HTTPS will be used (boolean)
Port

The port healer tries to open a connection to the supplied port on the target host. If it can't, it is considered a failure. Besides the common properties, the port healer needs:

  • port - The target port (int)

Relationship: cloudify.relationships.healer_connected_to

This relationship source should be the cloudify.nodes.Healer node template, and the target should be a compute node. The ip address of the compute node is used to supply the target IP address to the various healers. It has no inputs.

Examples

There are three example blueprints, one that demonstrates pinging a host with debug on, one that demonstrates performing an HTTPGET on an Apache web server, and one that attempts to connect to a socket. To see healing work, simply kill the target server and wait. You can tail the /tmp/heal_<deployment_id>_<pid> file to see the failure detection. Note that once a heal happens, a new log file is opened with the new healer pid. If you turn debug on, the actual individual test repetitions are logged.

cloudify-healer-plugin's People

Contributors

cloudewayne avatar dfilppi avatar

Watchers

 avatar  avatar  avatar

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.