Giter Site home page Giter Site logo

bytemine / fog-gridscale Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gridscale/fog-gridscale

0.0 1.0 0.0 142 KB

A library that can be used as a module for fog or as standalone gridscale provider

Home Page: https://gridscale.io

License: MIT License

Ruby 99.90% Shell 0.10%

fog-gridscale's Introduction

Fog::Gridscale

This is the plugin Gem to talk to gridscale clouds via fog.

Installation

Add this line to your application's Gemfile:

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:

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:

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:

server = gridscale.servers.create :name => 'foobar',
                               :cores  => 2,
                               :memory => 4,
                               

Get a server

gridscale.servers.get(server_uuid)

Update a server

gridscale.server_update(server_uuid, payload)

fog-gridscale's People

Contributors

aldemuro avatar fkr avatar marcharriss avatar sharkwouter avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.