Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gridscale/fog-gridscale
A library that can be used as a module for fog or as standalone gridscale provider
https://github.com/gridscale/fog-gridscale
gridscale ruby ruby-gem
Last synced: 5 days ago
JSON representation
A library that can be used as a module for fog or as standalone gridscale provider
- Host: GitHub
- URL: https://github.com/gridscale/fog-gridscale
- Owner: gridscale
- License: mit
- Created: 2019-04-04T07:04:47.000Z (over 5 years ago)
- Default Branch: develop
- Last Pushed: 2020-03-03T12:11:13.000Z (over 4 years ago)
- Last Synced: 2024-04-25T13:02:01.592Z (7 months ago)
- Topics: gridscale, ruby, ruby-gem
- Language: Ruby
- Homepage: https://gridscale.io
- Size: 141 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Fog::Gridscale
This is the plugin Gem to talk to [gridscale](https://gridscale.io/) clouds via fog.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'fog-gridscale'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install fog-gridscale
## Usage
### Initial Setup
# Getting started: the compute service
You'll need a gridscale account, user uuid and an API token to use this provider.
Get one from https://my.gridscale.io/APIs/
Write down the Access Token.
## Connecting, retrieving and managing server objects
.
First, create a connection to the host:
```ruby
require 'fog/gridscale'
require 'pp'
gridscale = Fog::Compute.new({
:provider => 'gridscale',
:api_token => 'your token',
:user_uuid => 'your user uuid',})
```## Listing servers
Listing servers and attributes:
```ruby
gridscale.servers.each do |server|
puts server.object_uuid
puts server.name
puts server.cores
puts server.memory
end
```## Server creation
Creating a new server:
```ruby
server = gridscale.servers.create :name => 'foobar',
:cores => 2,
:memory => 4,
```## Get a server
```ruby
gridscale.servers.get(server_uuid)
```## Update a server
```ruby
gridscale.server_update(server_uuid, payload)```