Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

furnish-ssh

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

furnish-ssh

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

furnish-ssh

Inject SSH remote commands into your provisioning pipeline. See furnish for information on what furnish is.

Installation

Add this line to your application's Gemfile:

gem 'furnish-ssh'

And then execute:

$ bundle

Or install it yourself as:

$ gem install furnish-ssh

Usage

SSH requires ip addresses, which implies machines and possibly something like furnish-ip to manage a pool of them. This example will use AutoIP and Vagrant from furnish-vagrant.

It doesn't have to be this complicated (and won't be in most cases), this is just a complete example.

require 'furnish'
require 'furnish/ip'
require 'furnish/provisioners/ip'
require 'furnish/provisioners/vagrant'
require 'furnish/provisioners/ssh'

Furnish.init
sched = Furnish::Scheduler.new
# Furnish::IP is a database of allocated addresses and more will be allocated
# by the AutoIP provisioner.
ip    = Furnish::IP.new('10.10.10.0/24')
# allocate gateway and network IPs so Vagrant can NAT properly
[0, 1].each { |x| ip.allocate("10.10.10.#{x}") }

# create our group - get an ip, hand it to vagrant which creates a machine,
# hand it to ssh which updates the box.
group = Furnish::ProvisionerGroup.new(
  'test',
  [
    Furnish::Provisioner::AutoIP.new(:ip => ip, :number_of_addresses => 1),
    Furnish::Provisioner::Vagrant.new(:box => "precise64", :number_of_machines => 1),
    Furnish::Provisioner::SSH.new(
      :username => "vagrant",
      :password => "vagrant",
      :startup_command => "sudo apt-get update; sudo apt-get dist-upgrade -y"
    )
  ]
)

sched << group
sched.run

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 25 Apr 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc