Upload
kaden-gomez
View
32
Download
1
Tags:
Embed Size (px)
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
Citation preview
Automate Administrationwith KURL
Shayne Koestler
3
Introduction
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
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
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
7
KURL on Community
8
KURL Components
Ruby (.rb) file kurl.jar Request Server
API Calls
Execute RubyPrint Ruby
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)
10
Uses for KURL
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
12
Hello World
Ruby file
Command prompt
13
About Ruby
Object oriented Dynamic typing Clean syntax Powerful features Designed for developer happiness JRuby
Runs on Java platform
14
Ruby http://www.ruby-lang.org/
15
JRuby http://jruby.org/
16
Development with KURL
Goals Adaptable and maintainable Simplicity More efficient development Track development
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
18
Template Service Item
19
Template Service Item
20
Template Service Item
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
22
KURL Templates
23
KURL Templates
DSL on top of a DSL The domain is your service items
KURL Code
Templates
Remedy API
24
Using KURL Templates
25
Using KURL Templates
26
Ruby Variables
Store commonly used values as variables Refer to variables throughout KURL code Examples
Company name Web server URL
27
Ruby Variables
28
Ruby Variables
Added variables to our templates file
29
More Ruby
Looping over KURL codeGenerate data for portal development
Conditionals to generate dynamic contentConditionally include templates
30
Version Control Sample
31
Questions?
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