Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

iRules/iRules LX distribution question

All,

Working with developing a nice iRules/iRulesLX package to federate some object storage systems. I've been developing it under a BigIP VE on my local machine, and exported it to a .tgz for import onto the F5 appliance. However, it encountered errors on import because the TMOS version I developed under was 13.X and the appliance (can't be upgraded) was on a revision of 12.X.

So the question is this; is there a guide on packaging iRules/iRules LX that spells out how to distribute these software packages? Aside from using the BigIP VE version that the appliance is using, what are the other options?

Thanks for taking the time to respond.

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Although it is not clearly documented, you cannot export a workspace archive (a tgz file created by clicking the "Export..." button) created on a higher version to a lower version: e.g., v13 archive to v12. When you attempt, plugin creation would fail with the following error even "Import" (which is just gunzip + untar of the file) was successful.

Data Input Error: Can't create plugin "/Common/TestPlugin", the workspace version is greater
than the BigIP version. Workspace: "/Common/Test" Version: "13.1.1.2" BigIP version: "12.1.3.7" 

If you really want to migrate your "workspace" from higher to lower, here's an unofficial way (hack) for migration. At least it worked for me. In short, do file by file copying.

  1. Create the workspace on the target box (e.g., v12) with the same name.
  2. Create the iRule and extension (Node). You do not need to actually write any code.
  3. Gunzip + untar the archive file (e.g., from v13) on the target box (anywhere. say /tmp).
  4. Copy the iRule file(s) under /tmp/var/ilx/workspaces/<partition>/<workspace>/rules to the /var/ilx/workspaces/<partition>/<workspace>/rules. This should overwrite the file created in Step 2.
  5. Do the same for extension(s) (index.js): /var/ilx/workspaces/<partition>/<workspace>/extensions/<extension>.

Please note that BIG-IP V13.1 and later use Node.js version 6.9.1 by default, while the older versions use 0.12.18. ECMA6 features available on 6.9.1 do not run on 0.12.18, so code carefully.

I hope this would help.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

This is a really interesting question.

The approach I recommend and promote taking your code off the F5 and build an independent development environment.

Currently myself and others where I work have been working on a TypeScript iRule LX development framework with unit testing, code coverage and a delivery pipeline (auto compile to JS and deployment to F5)

The current issue we are facing is delivery to a F5 device, currently this is being done manually with copying files like Satoshi has already suggested, but working to find a better way (via iControl REST would be best) sadly this is still a work in progress so cannot help beyond what Satoshi has already provided but if you find a good way to do this would love to see your method.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

An iControl REST way to create a working iRules LX (starting from creating a workspace to attaching the rule to a virtual) is shown in: Creating iRules LX via iControl REST. There could be a better way to achieve this goal, but this is the best I can think of so far.

0