automate administration with kurl shayne koestler

32

Upload: kaden-gomez

Post on 30-Dec-2015

32 views

Category:

Documents


1 download

DESCRIPTION

Automate Administration with KURL Shayne Koestler. Introduction. KURL. Kinetic Uniform Request Language KURL is a domain-specific language (DSL) written in Ruby DSL? A language designed to solve a specific set of problems =MIN(A2:A7) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Automate Administration with KURL Shayne Koestler
Page 2: Automate Administration with KURL Shayne Koestler

Automate Administrationwith KURL

Shayne Koestler

Page 3: Automate Administration with KURL Shayne Koestler

3

Introduction

Page 4: Automate Administration with KURL Shayne Koestler

4

KURL

Kinetic Uniform Request Language KURL is a domain-specific language (DSL) written in Ruby DSL?

A language designed to solve a specific set of problems =MIN(A2:A7)

KURL creates catalogs and service items in Kinetic Request Hides complexity of forms and relationships

Page 5: Automate Administration with KURL Shayne Koestler

5

KURL History

Previous Names Shayne-alyzer, Template Generator, Accelerator, etc.

Ruby source to JAR file Klink to ars models to Remedy Pure Java API More and more comprehensive

Page 6: Automate Administration with KURL Shayne Koestler

6

KURL Components

KURL Code Ruby code containing functions made available in KURL

service_item, page, event, etc. KURL Jar

Commands executed in command prompt with the kurl.jarbuild_catalog, retrieve_service_item, etc

Page 7: Automate Administration with KURL Shayne Koestler

7

KURL on Community

Page 8: Automate Administration with KURL Shayne Koestler

8

KURL Components

Ruby (.rb) file kurl.jar Request Server

API Calls

Execute RubyPrint Ruby

Page 9: Automate Administration with KURL Shayne Koestler

9

Uses for KURL

Import/Export format Human readable Suitable for version control

Automate service item development Generate KURL code from other sources (csv, database, etc.) Generate KURL code from a service item Catalog provisioning (service providers)

Page 10: Automate Administration with KURL Shayne Koestler

10

Uses for KURL

Page 11: Automate Administration with KURL Shayne Koestler

11

Uses for KURL

Alternative method of service item development Text editing rather than point-and-click Reduced duplication Leverage Ruby features to aid development Version control https://github.com/kineticdata/demo-acme

Page 12: Automate Administration with KURL Shayne Koestler

12

Hello World

Ruby file

Command prompt

Page 13: Automate Administration with KURL Shayne Koestler

13

About Ruby

Object oriented Dynamic typing Clean syntax Powerful features Designed for developer happiness JRuby

Runs on Java platform

Page 14: Automate Administration with KURL Shayne Koestler

14

Ruby http://www.ruby-lang.org/

Page 15: Automate Administration with KURL Shayne Koestler

15

JRuby http://jruby.org/

Page 16: Automate Administration with KURL Shayne Koestler

16

Development with KURL

Goals Adaptable and maintainable Simplicity More efficient development Track development

Page 17: Automate Administration with KURL Shayne Koestler

17

Development with KURL

Generate a template service item Look and feel Common elements

Export template to KURL code Break into reusable functions Store reused values as ruby variables

Page 18: Automate Administration with KURL Shayne Koestler

18

Template Service Item

Page 19: Automate Administration with KURL Shayne Koestler

19

Template Service Item

Page 20: Automate Administration with KURL Shayne Koestler

20

Template Service Item

Page 21: Automate Administration with KURL Shayne Koestler

21

KURL Templates

A piece of KURL code wrapped in a function Reducing duplication of common behavior Further abstraction of KURL functions

Created 3 reusable code templates Standard header – configuration items of service item Standard content page – standard content at top of request Standard footer – confirmation page

Page 22: Automate Administration with KURL Shayne Koestler

22

KURL Templates

Page 23: Automate Administration with KURL Shayne Koestler

23

KURL Templates

DSL on top of a DSL The domain is your service items

KURL Code

Templates

Remedy API

Page 24: Automate Administration with KURL Shayne Koestler

24

Using KURL Templates

Page 25: Automate Administration with KURL Shayne Koestler

25

Using KURL Templates

Page 26: Automate Administration with KURL Shayne Koestler

26

Ruby Variables

Store commonly used values as variables Refer to variables throughout KURL code Examples

Company name Web server URL

Page 27: Automate Administration with KURL Shayne Koestler

27

Ruby Variables

Page 28: Automate Administration with KURL Shayne Koestler

28

Ruby Variables

Added variables to our templates file

Page 29: Automate Administration with KURL Shayne Koestler

29

More Ruby

Looping over KURL codeGenerate data for portal development

Conditionals to generate dynamic contentConditionally include templates

Page 30: Automate Administration with KURL Shayne Koestler

30

Version Control Sample

Page 31: Automate Administration with KURL Shayne Koestler

31

Questions?

Page 32: Automate Administration with KURL Shayne Koestler

32

Resources

KURL on Kinetic Community http://community.kineticdata.com/10_Kinetic_Request/KURL

Get Started – downloads and setupKURL Functions – documents the Ruby code functions in KURLJAR Commands – documents the commands of the KURL jar file

Demo Catalog https://github.com/kineticdata/demo-acme