Skip to content

Instantly share code, notes, and snippets.

@digideskio
Last active March 15, 2016 16:43
Show Gist options
  • Save digideskio/ee9dfdef3cd25949ef6f to your computer and use it in GitHub Desktop.
Save digideskio/ee9dfdef3cd25949ef6f to your computer and use it in GitHub Desktop.
Bootstrap fog softlayer, ready to use
#!/bin/bash
mkdir foglayer
cd foglayer
cat << EOF > Gemfile
source 'https://rubygems.org'
gem 'fog-softlayer'
EOF
bundle install --path vendor
# Fetching gem metadata from https://rubygems.org/..........
# Fetching gem metadata from https://rubygems.org/..
# Resolving dependencies...
# Installing builder (3.2.2)
# Installing excon (0.37.0)
# Installing formatador (0.2.5)
# (trimmed output for reading purposes)
# Using bundler (1.3.5)
# Your bundle is complete!
# It was installed into ./vendor
cat << EOF > softlayer.rb
require 'fog/softlayer'
@sl = Fog::Compute[:softlayer]
puts @sl.servers
EOF
bundle exec ruby softlayer.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment