Coder Social home page Coder Social logo

smart_proxy_remote_execution_ssh's Introduction

Build Status Gem Version Code Climate GPL License

Smart-proxy Ssh plugin

This a plugin for foreman smart-proxy allowing using ssh for the remote execution

Installation

Add this line to your smart proxy bundler.d/ssh.rb gemfile:

gem 'smart_proxy_dynflow', :git => 'https://github.com/theforeman/smart_proxy_dynflow.git'
gem 'smart_proxy_dynflow_core', :git => 'https://github.com/theforeman/smart_proxy_dynflow.git'
gem 'foreman_remote_execution_core', :git => 'https://github.com/theforeman/foreman_remote_execution.git'
gem 'smart_proxy_remote_execution_ssh', :git => 'https://github.com/theforeman/smart_proxy_remote_execution_ssh.git'

Enable the plugins in your smart proxy:

cat > config/settings.d/dynflow.yml <<EOF
---
:enabled: true
EOF

cat > config/settings.d/remote_execution_ssh.yml <<EOF
---
:enabled: true
EOF

Install the dependencies

$ bundle

Usage

To configure this plugin you can use template from settings.d/remote_execution_ssh.yml.example. You must place remote_execution_ssh.yml config file (based on this template) to your smart-proxy config/settings.d/ directory.

Also, you need to have the dynflow plugin enabled to be able to trigger the tasks.

The simplest thing one can do is just to trigger a command:

curl http://my-proxy.example.com:9292/dynflow/tasks \
      -X POST -H 'Content-Type: application/json'\
      -d '{"action_name":  "ForemanRemoteExecutionCore::Actions::RunScript",
           "action_input": {"task_id" : "1234'$RANDOM'",
                            "script": "/usr/bin/ls",
                            "hostname": "localhost",
                            "effective_user": "root"}}'

smart_proxy_remote_execution_ssh's People

Contributors

adamruzicka avatar archanaserver avatar ares avatar dlobatog avatar ehelms avatar ekohl avatar ezr-ondrej avatar inecas avatar mmoll avatar mvollmer avatar ohadlevy avatar patilsuraj767 avatar pkoprda avatar stbenjam avatar tuningyourcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.