Forum Discussion
Deploying iApp template from tmsh
Starting out with iAPPs
11.4.1 LAB-VE
Copied f5.http to vco.f5.http
vco.f5.http to be used during application service GUI creation
using GUI and vco.f5.http, I created a new instance
vip ip 1.1.1.1
pool ip 2.2.2.2 14000 0
pool ip 2.2.2.3 14000 0
fqdn tomcat1.local.com
I used the 'basic' settings dropdown.
Clicked finish... and the application service macro built the instance successfully.
Next, I off-loaded the 'one-line' command to text editor;
tmsh list sys application service tomcat1.app/tomcat1 one-line
sys application service tomcat1.app/tomcat1 { device-group none inherited-devicegroup true inherited-traffic-group true tables { basic__snatpool_members { } net__snatpool_members { } optimizations__hosts { } pool__hosts { column-names { name } rows { { row { tomcat.local.com } } } } pool__members { column-names { addr port connection_limit } rows { { row { 2.2.2.2 1400 0 } } { row { 2.2.2.3 1400 0 } } } } server_pools__servers { } } template vco.f5.http traffic-group traffic-group-1 variables { client__http_compression { value "/do_not_use" } monitor__monitor { value /Common/cap1_mon_msp_traffic_control } net__client_mode { value wan } net__server_mode { value lan } pool__addr { value 1.1.1.1 } pool__pool_to_use { value "/create_new" } pool__port { value 80 } ssl__mode { value no_ssl } ssl_encryption_questions__advanced { value no } ssl_encryption_questions__help { value hide } } }
Then, from an article I read and my understanding, I could change specific variable to deploy a new service, using tmsh console access.
https://devcentral.f5.com/questions/deploy-an-application-service-from-an-iapp-template-via-tmsh
template vco.f5.http
vip ip 1.1.1.2
pool ip 2.2.2.4 80 0
pool ip 2.2.2.5 80 0
fqdn tomcat2.local.com
When I edit, copy, and paste into the console... I get an error "Syntax Error: incomplete command"
[root@new-host-2:Active:Standalone] config tmsh create /sys application service tomcat2 tables add { basic__snatpool_members { } net__snatpool_members { } optimizations__hosts { } pool__hosts { column-names { name } rows { { row { tomcat2.local.com } } } } pool__members { column-names { addr port connection_limit } rows { { row { 2.2.2.4 80 0 } } { row { 2.2.2.5 80 0 } } } } server_pools__servers { } } template vco.f5.http variables add{ client__http_compression { value "/do_not_use" } monitor__monitor { value /Common/cap1_mon_msp_traffic_control } net__client_mode { value wan } net__server_mode { value lan } pool__addr { value 1.1.1.2 } pool__pool_to_use { value "/create_new" } pool__port { value 80 } ssl__mode { value no_ssl } ssl_encryption_questions__advanced { value no } ssl_encryption_questions__help { value hide } }
Syntax Error: incomplete command
[root@new-host-2:Active:Standalone] config
The only real difference I see between my attempt and the devcentral article, is the order of pool member attributes
rows { { row { 2.2.2.4 80 0 } } { row { 2.2.2.5 80 0 } } } } <-- mine
rows { { row { 80 0 10.1.1.1 } } { row { 80 0 10.1.1.2 } } } } <-- Aaron's
Can someone explain why I am getting the error "Syntax Error: incomplete command"
7 Replies
- Kevin_Davies_40
Nacreous
vco.f5.http variables add{ client_
put a space after the add perhaps?
- Don_Munyak
Nimbostratus
Adding the space did not fix the issue
-Thanks
- MYLK
Nimbostratus
Need to escape the quotes around "/do_not_use" and "/create_new"
should be \"/do_not_use\"and \"/create_new\"
the command works as is if you first drop into tmsh and then run it but bash barks at the quotes
- Don_Munyak
Nimbostratus
Thanks MK .. but I now have new hurdles.
I took your advice and was able to make the iapp work from a simple basic settings drop down. Now trying to work from the advanced dropdown (again from with f5.http), I get the following when executing from tmsh.
[root@new-host-2:Active:Standalone] config tmsh create /sys application service tomcat11 lists add { irules__irules { value { /Common/ir_sitedown /Common/ir_snat2vip } } net__client_vlan { } } tables add { basic__snatpool_members { } net__snatpool_members { } optimizations__hosts { } pool__hosts { column-names { name } rows { { row { tomcat11.local.com } } } } pool__members { column-names { addr port connection_limit } rows { { row { 2.2.2.4 14000 0 } } { row { 2.2.2.5 14000 0 } } } } server_pools__servers { } } template vco.f5.http traffic-group traffic-group-1 variables add { client__http_compression { value \"/do_not_use\" } client__standard_caching_without_wa { value \"/do_not_use\" } client__tcp_lan_opt { value /Common/pro_tcp_wan_optimized } monitor__monitor { value /Common/mon_msp_traffic_control } net__client_mode { value lan } net__route_to_bigip { value yes } net__same_subnet { value no } net__server_mode { value lan } pool__addr { value 1.1.1.11 } pool__http { value /Common/http } pool__lb_method { value predictive-member } pool__mask { } pool__persist { value /Common/pro_per_cookie_cloud_80_443 } pool__pool_to_use { value \"/create_new\" } pool__port { value 80 } pool__use_pga { value no } server__ntlm { value \"/do_not_use\" } server__oneconnect { value /Common/msp_oneconnect_255 } server__tcp_lan_opt { value /Common/pro_tcp_lan_optimized } server__tcp_req_queueing { value no } server__use_slow_ramp { value no } ssl__mode { value no_ssl } ssl_encryption_questions__advanced { value yes } ssl_encryption_questions__help { value hide } stats__request_logging { value \"/do_not_use\" } } script did not successfully complete: ("predictive-member" invalid IP address while executing "tmsh::create [string range $args 7 end] " ("create" arm line 1) invoked from within "switch -exact -- [string range $args 0 5] { create { tmsh::create [string range $args 7 end] } modify { tmsh::modify [string r..." (procedure "iapp::conf" line 14) invoked from within "iapp::conf create ltm virtual ${app}_vs destination [iapp::destination $::pool__addr $::pool__port] mask $mask $vs_params ip-protocol tcp mirror ..." invoked from within "subst $substa_out" invoked from within "if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] set substa_out [subst $substa_out] } else { ..." ("uplevel" body line 3) invoked from within "uplevel { append ::substa_debug "\n$substa_in" if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] ..." (procedure "iapp::substa" line 9) invoked from within "iapp::substa vs_arr($do_client_ssl,$do_redirect)" (procedure "v11_4_main" line 363) invoked from within "v11_4_main" invoked from within "subst $substa_out" invoked from within "if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] set substa_out [subst $substa_out] } else { ..." ("uplevel" body line 3) invoked from within "uplevel { append ::substa_debug "\n$substa_in" if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] ..." (procedure "iapp::substa" line 9) invoked from within "iapp::substa main($do_v11_3,$upgrade,$downgrade)" line:868) - Fred_Slater_856Historic F5 Account
The mix of escaped quotes and braces can be messy. I was able to correct the error above by (1) quoting values that contain escaped quotes, i.e. \"/do_not_use\" becomes "\"/do_not_use\"" and (2) avoiding empty brace sets, i.e. pool_mask { } becomes pool_mask { value "" }.
- Don_Munyak
Nimbostratus
Thank You .. I will take another stab at it...
- lfrc8554_210851
Nimbostratus
Hi, were you able to find the right recipe to deploy iApps via TMSH?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com