Giter Club home page Giter Club logo

jumpcloud-ruby-gem's Introduction

jumpcloud-ruby-gem

The JumpCloud Ruby Gem is JumpCloud's first SDK, based on Ruby, and leveraging the JumpCloud system API. It allows you easily set up any server by adding it to any list of tags you like, settings the system name, and to help you terminate the server by being able to delete it from JumpCloud.

The JumpCloud Ruby Gem is made available under the Mozilla Public License v2.0 (https://www.mozilla.org/MPL/2.0/), and this is a curated public project. We will be accepting pull requests going forward, provided they're well-tested and fit with the goal of providing the easiest possible access to the JumpCloud system context API.

You can build the Gem yourself based on this repo, by doing:

gem build jumpcloud.gemspec

And then install it locally in your own gem repo:

gem install jumpcloud-0.3.0.gem

Or, you can install it from the rubygems.org repo, by simply running:

gem install jumpcloud

Setting the system name

Setting the system name in JumpCloud can be done as follows:

require 'jumpcloud'

JumpCloud.set_system_name("new_system_name")

Setting the tags for the system

Setting tags can be done either by tag name or by tag ID:

Setting by tag name

require 'jumpcloud'

JumpCloud.set_system_tags("Web Servers", "Databases")

Setting by tag ID

require 'jumpcloud'

JumpCloud.set_system_tags("52cda39217b0917a63000020", "52966eac53e890d008000f05")

Deleting the system

This will delete the system from JumpCloud, and should be used prior to terminating an instance managed by JumpCloud:

require 'jumpcloud'

JumpCloud.delete_system()

Setting multiple fields at one time

You can set multiple fields at a time, as well, and fields in excess of what can be set via other functions in the SDK. JumpCloud thanks Ryan Bachman ([email protected]) at Interactive Intelligence for his submission.

jc = JumpCloud.new()

jc.update_settings({
"displayName" => "Foo-Server",
"allowSshPasswordAuthentication" => true,
"allowPublicKeyAuthentication" => true,
"allowSshRootLogin" => false,
"tags" => ['dev']
})

Please see the JumpCloud System Context API documentation (https://github.com/TheJumpCloud/SystemContextAPI) on the Systems and Tags APIs for more detail.

jumpcloud-ruby-gem's People

Contributors

rbachman avatar tophermarie 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.