Last active
March 15, 2016 16:43
-
-
Save digideskio/ee9dfdef3cd25949ef6f to your computer and use it in GitHub Desktop.
Bootstrap fog softlayer, ready to use
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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