Transcript iApp

iApp
Jing Lin
2012 2 March.
Version
Author
Date
1.0
Jing Lin
2012/3/2
1.1
Jing Lin
2012/3/9
WHAT IS IAPP
 An iApp is a user-customizable framework for deploying applications. It
consists of three components: Templates, Application Services, and
Analytics. An iApp Template is where the application is described and
the objects (required and optional) are defined through presentation
and implementation language. An iApp Application Service is the
deployment process of an iApp Template which bundles all of the
configuration options for a particular application together.You would
have an iApp Application Service for SharePoint, for example. iApp
Analytics include performance metrics on a per-application and location
basis.
BENEFITS OF USING IAPP
 User-customizable
 Easy editing of configurations and cleanup
 Reentrancy
 Configuration encapsulation
 Cradle-to-grave configuration management
 Strictness protects against accidental changes to the configuration
 Operational tasks and health status for App objects displayed on App-
specific component view (see right)
 Copy/Import/Export capability
 Community support for DevCentral hosted templates
CREATE APP SERVICE
APP SERVICE
 Objects will associate an app-service
 So if an object have app-service definition, means it is created by an iapp
 ltm profile http




/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_http_profile {
app-service
/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7
defaults-from /Common/http
redirect-rewrite none
}
APP SERVICE
 Default, we can’t edit those objects which created by iapp directly,
system will refuse the operation.
 --Uncheck strick updates under app service properties.
 Normally, we should use reconfigure function of app service to modify
app-service.
IAPP TEMPLATE
 Include 3 parts
 Implementation --tmsh script
 -All inputs and setting in the presentation will be performed to create
an iapp service
 Presentation –APL,tmsh script, tcl
 -Display a GUI to users, it is a user interface
 Help --HTML
 -Online help on left of GUI
 Stored in bigip_script.conf
HOW TO CREATE A TEMPLATE
 From GUI add new template, not recommend
 Tmsh create sys application template **
 Edit in your favorite tools, then copy paste
 Edit it in bigip_script.conf , not recommend
IAPP TEMPLATE STRUCTURE
 create template my_iapp {













 }
 ~
actions replace-all-with {
definition {
html-help {
<!-- insert html help text -->
}
implementation {
# insert tmsh script
}
presentation {
# insert apl script
}
}
}
APL
 http://devcentral.f5.com/wiki/iApp.APL.ashx
 http://devcentral.f5.com/wiki/iApp.APL_commands.ashx
APL
Value elements:
-string
-choice
-multichoice
-editchoice
-password
Layout elements:
Section
Row
table
Functional elements
Include
Define
Optional
Message
text
Validators
FQDN
IpOrFqdn
IpAddress
NonNegativeNumber
Number
PortNumber
APL- CREATE A SECTION
 A section is a BLOCK where you can put all relevant
input\choice\text\message…. in it. This help you organize the style of
the page.
Section title-text
text
Message
STRING
String <keyname> [default] [display] [required] [validator]
String ipaddr required validator “ipaddress”
String port default “80” display “small” validator “portnumber”
CHOICE
 choice yesorno default "no" {"yes","no"}
 choice tcpprofile {"profile1","profile2"}
 choice lbmethod {"Round Robin"=> "round-robin", "Least
Connections" => "least-connections"}
This will create a single selection menu.
 The string after => means the value that when you select the item
before the =>.
 If no =>, it means the value equal the items which displayed on page
MESSAGE
 Provide extra text message on the page, We can use it to show some
explanation or other warning info or anything what you want to say.
 Message keyname [words you want]
EDITCHOICE
 Editchoice <keyname> [default “value2”] {“value1”,”value2”}
 editchoice myeditchoice default "value1" {"value1","Display as value2"
=> "value2key"}
MULTICHOICE
 Multichoice <keyname> [display small/large…] [default values]
<available values>
 multichoice ports default {"80", "443"} {"22", "23", "80", "443"}
PASSWORD
 Password [display “small/large…”] [required]
 If set requried, then a valid value must be entered
 Password pwd required
SECTION
 Create a layout, usually is to group elements together.
 Section example1 {
 ….
}
 Section example2 {
 ….
}
 Setcion can not be
 nested
TABLE
 Elements in table will be treated as columns, and form a row. There will
be “add” button and delete button, which you can repeat rows or
delete rows. Table can not be nested.
ROW
 Similar to table, but only one line and can not repeat the row.
INCLUDE
 Used to involve an exist iapp APL script, so we can define some common
script in a fie, then include it and use the definitions in any iapps
 include "/Common/f5.apl_common"
 section example11 {

yesno use_ssl
 }
 text {
example11 "SSL Parameters"
 example11.use_ssl "Offload SSL? "
 }

DEFINE
 Define some common objects that can be used by any iapps, in
conjunction with “include” command
OPTIONAL
Show or hide element depend on another element value. Don’t use it inside“table”
Show text per browser language
IMPLEMENTATION
 Who really create those objects that we input in presentation?
 Tmsh script in implementation part in charge of this.
 What is tmsh script?
 Script that can run in tm shell
 So iapp is let you answer question in GUI then system run tmsh script
automatically to finish a task.
TMSH SCRIPT BASIS
 proc script::init {} {
 }
 proc script::run {} {
 }
 proc script::help {} {
 }
 proc script::tabc {} {
 }
HTTPS://DEVCENTRAL.F5.COM/WIKI/TMSH
.COMMANDS.ASHX
HELP
 This part is for online-help.
 It is html-based.
 Contains the text that appears in the help frame when you select a
template during the application-services creation process.You can
modify text in this section to help those who use the templates to
create application services. This field supports the following HTML tags:
b, blockquote, br, code, dd, dl, dt, em, h1, h2, h3, h4, h5, h6, i, li, ol,
p, pre, small, strike, strong, sub, sup, u, and ul.
TIPS
 /var/tmp/scriptd.out
 When you create app service by iapp template, the tmsh script running
result will be in the file.
 Process scriptd is parsing engine of iapp on GUI.
 If the process stop running, you will get below error when creating iapp
service.
 Error parsing template:01020005:3: The requested operation is not
implemented yet.
 Tmsh on CLI does not affected if scriptd is not running
WHERE IS IAPP STORED
 /config/*/bigip_script.conf
 Include
 Custom tmsh script
 Custom iapp template
 Application service
UNDERSTAND TMSH SCRIPT
 Tmsh create cli script yourscritpname
 Tmsh modify cli script yourscriptname
 Tmsh run cli script yourscriptname
 Editor is like vi
 root@ltm6900-1(Active)(/Common)(tmos)# run cli script my_script
VS IN BIGIP.CONF

ltm virtual /Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_http {

app-service /Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7

destination /Common/7.7.7.7:http

ip-protocol tcp

mask 255.255.255.255

persist {
/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_cookie_persistence_profile {

default yes

}


}

pool /Common/t-common

profiles {

/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_caching_profile { }

/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_http_profile { }

/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_lan-optimized_tcp_profile { }

/Common/vs_iapp_http_7.7.7.7.app/vs_iapp_http_7.7.7.7_oneconnect { }

}

vlans-disabled

}
 With default setting, we can not edit those objects like vs , pool,
profile… only can reconfigure it in IApp.
 Uncheck strict updates can get rid of the restriction.
 http://devcentral.f5.com/wiki/iApp.HomePage.ashx#iControl_for_iApps
_2
 Tmsh script
 http://devcentral.f5.com/wiki/tmsh.HomePage.ashx
 APL-application presentation language
http://devcentral.f5.com/wiki/iApp.APL.ashx
Tips and techniques
http://devcentral.f5.com/wiki/iApp.iApp-Template-Development-Tips-andTechniques.ashx
 BZID373402
 C1072662
Thanks