Sha256: 0e6efda2f92defca0d8f518fde9e8ed8618142e94dbe784d02d43f23af2f4978

Contents?: true

Size: 1.47 KB

Versions: 21

Compression:

Stored size: 1.47 KB

Contents

# Getting Started

This is a quick how-to on getting started with fog-softlayer covering all aspects from zero to hero using this library.

## Installation

You can just use as a gem on your system install as a global gem:

```bash
gem install fog-softlayer
```

or you can add to your Gemfile

```ruby
gem 'fog-softlayer
```

This is the only necessary step, after configuring your credentials in fog file (see how next on usage section) you can test your setup by executing the contents according to this [gist](https://gist.github.com/fernandes/58908649f25b218cc4a7)

## Usage

The first step to get into fog-softlayer is to configure your __~/.fog__ file. This is useful so that you do not have to retype credentials on every fog-softlayer use.

If you do not configure .fog, you will have to manually enter:

```ruby
@sl = Fog::Compute.new(provider: "softlayer", softlayer_username: "SLUSERNAME", softlayer_api_key: '860e03c168c3aef304341b492ba9984ac1080bb5')
```

This is not recommended since credentials or api-keys could be leaked.

Write a configure file like this under __~/.fog__

```yaml  
default:
  softlayer_username: example-username
  softlayer_api_key: 1a1a1a1a1a1a1a1a1a11a1a1a1a1a1a1a1a1a1 
  softlayer_default_domain: example.com
  softlayer_cluster: cluster # needed for storage access
```

After this file is configured you just need to use:

```ruby
@sl = Fog::Compute[:softlayer]
```

Remember, you can always specify the username and api key to connect using another credential.

Version data entries

21 entries across 19 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/examples/getting_started.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/examples/getting_started.md
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/examples/getting_started.md
fog-softlayer-1.1.4 examples/getting_started.md
fog-softlayer-1.1.3 examples/getting_started.md
fog-softlayer-1.1.2 examples/getting_started.md
fog-softlayer-1.1.1 examples/getting_started.md
fog-softlayer-1.1.0 examples/getting_started.md
fog-softlayer-1.0.3 examples/getting_started.md
fog-softlayer-1.0.2 examples/getting_started.md
fog-softlayer-1.0.1 examples/getting_started.md
fog-softlayer-1.0.0 examples/getting_started.md
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/examples/getting_started.md
fog-softlayer-0.4.7 examples/getting_started.md
fog-softlayer-0.4.6 examples/getting_started.md
fog-softlayer-0.4.5 examples/getting_started.md
fog-softlayer-0.4.4 examples/getting_started.md
fog-softlayer-0.4.3 examples/getting_started.md
fog-softlayer-0.4.2 examples/getting_started.md
fog-softlayer-0.4.2.pre examples/getting_started.md