Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical OneOps

You're reading from   Practical OneOps Implement DevOps with ease

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786461995
Length 266 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Nilesh Nimkar Nilesh Nimkar
Author Profile Icon Nilesh Nimkar
Nilesh Nimkar
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started with OneOps 2. Understanding the OneOps Architecture FREE CHAPTER 3. OneOps Application Life Cycle 4. OneOps Enterprise Deployment 5. Practical Deployment Scenario 6. Managing Your OneOps 7. Working with Functional Components 8. Building Components for OneOps 9. Adding and Managing OneOps Components 10. Adding Your Own Cloud to OneOps 11. Integrating with OneOps Using API

Connecting to the REST API using Ruby

The beauty of RESTful services and using JSON or XML to communicate over the web is that you can use any modern language (and many not-so-modern languages) to quickly and efficiently talk to OneOps. Since, so far, all our coding has been in Ruby, or to be specific in Chef, we will be using Ruby as an example language for this chapter. However, since the resources are idempotent, the language itself rarely matters. Before we can start using Ruby though, let's make sure that the appropriate dependencies are satisfied. Since we will be building our own custom REST client, we will be using a Ruby gem named rest-client. You can install it using the command:

gem install rest-client

Also, make sure that gem json is installed. You can install it by running the following command:

gem install json

For rest-client, you should have MRI Ruby 2.0 or higher installed. If you are trying this from a OneOps instance, then Ruby 2.0 or higher should already...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image