Coder Social home page Coder Social logo

hiro-winrm-actionhandler's Introduction

WinRM ActionHandler

Setup

Installation

Activate the SCL channel/repository

  • On RHEL, execute

subscription-manager repos --enable rhel-6-server-optional-rpms
subscription-manager repos --enable rhel-server-rhscl-6-rpms
  • On CentOS, execute

yum -y install centos-release-scl-rh

Add the hiro-contrib repository

Add the following to your /etc/yum.repos.d/hiro.repo file:

[hiro-contrib]
name=arago HIRO contributions
baseurl=https://USERNAME:[email protected]/hiro-contrib/centos/6/
gpgcheck=0
enabled=1

Replace USERNAME and PASSWORD with your repository credentials.

Tip
  • For Free Edition: The repository credentials or the same as for your arago ID.

  • For Enterprise Edition: You use your arago ID credentials. Usually the AI Projects team will provide you with a separate user for repository access.

Tip

To use the online RPM repository the target servers need to be able to connect to tcp/443 on "repository.arago.de".

Important

If your username/password contains special characters you must replace them with the proper URL encode character.

Install and start the ActionHandler

yum install hiro_integration-winrm-actionhandler

service hiro-winrm-actionhandler start
service hiro-winrm-actionhandler status

Configure Kerberos

Important

This part is not finished, yet.

Configure the HIRO Engine

Add the following section to your /opt/autopilot/conf/aae.yaml and restart the engine.

ActionHandlers:
  ActionHandler:
    - URL: tcp://127.0.0.1:7289
      SubscribeURL: ''
      CapabilityYAML: /opt/autopilot/conf/external_actionhandlers/capabilities/winrm-actionhandler.yaml
      RequestTimeout: 60

Configure the WinRM ActionHandler

To adjust the number of actions that can be executed concurrently (both in total and per MARSNode), edit /opt/autopilot/conf/external_actionhandlers/winrm-actionhandler.conf

[ActionHandler]
ZMQ_URL: tcp://*:7289
ParallelTasks: 10
ParallelTasksPerWorker: 5
WorkerMaxIdle: 300
Option Default Meaning

ParallelTasks

10

Number of overall commands the ActionHandler will execute in parallel. Additional commands will be enqueued.

ParallelTasksPerWorker

5

Number of commands the ActionHandler will execute in parallel on the same target machine.

To apply the changes, restart the ActionHandler

service hiro-winrm-actionhandler restart

Usage

The WinRM ActionHandler provides two 'Capabilities':

  • ExecuteCommand: Execute standard DOS commands

  • ExecutePowershell: Execute Powershell commands

Both capabilities support the execution of small scripts in their respective language (DOS batch or Powershell).

Important
The length of the whole script including all whitespace and line breaks must not exceed 4096 characters.

ExecuteCommand is named exactly like in the Unix ActionHandler for a reason: It does the same thing, executing a command.

Both ActionHandlers are limited by their Applicability. The Unix ActionHandler will only work with Unix machines, the WinRM handler only with Windows machines. Which one is used for execution depends on the MachineClass of the MARSNode the AutomationIssue resides on when the ActionHandler is called.

To learn more about Capabilities and Applicabilities, please refer to the documentation of the Generic ActionHandler.

Example

Usage is analogous to the Unix ActionHandlers:

execute command
execute powershell

hiro-winrm-actionhandler's People

Watchers

James Cloos 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.