Search
Colin Walker - Bettering Applications by Network Wizardry
You are here: DevCentral > Weblogs

posted on Wednesday, March 10, 2010 3:52 PM

The new LTM VE has opened up the possibilities for writing, testing and deploying iRules in a big way.  It’s easier than ever to get a test environment set up in which you can break things develop to your heart’s content.  This is fantastic news for us iRulers that want to be doing the newest, coolest stuff without having to worry about breaking a production system. 

That’s all well and good, but what the heck do you do to get all of your current stuff onto your test system?  There are several options, ranging from copy and paste (shudder) to actual config copies and the like, which all work fine.  Assuming all you’re looking for though is to transfer over your iRules, like me, the easiest way I’ve found is to use the iRule editor’s export and import features.  It makes it literally a few clicks and super easy to get back up and running in the new environment.03012010_CWTT_origEditor

First, log into your existing LTM system with your iRule editor (you are using the editor, right? Of course you are…just making sure).  You’ll see a screen something like this (right) with a list of a bagillionty iRules on the left and their cool, color coded awesomeness on the right.  You can go through and select iRules and start moving them manually, but there’s really no need.

All you need to do is go up to the File –> Archive –> Export option and let it do its magic.  All it’s doing is saving text files to your local system to archive off all of your iRuley goodness.  Once that’s done, you can then spin up your new LTM VE and get logged in via the iRule editor over there.  Connect via the iRule editor, and go to File –> Archive –> Import, shown below.

03012010_CWTT_godzillaBlank

 

 

 

 

 

Once you choose the import option you’ll start seeing your iRules popping up in the left-hand column, just like you’re used to.  This will take a minute depending on how many iRules you have archived (okay, so I may have more than a few iRules in my collection…) but it’s generally pretty snappy.  One important thing to note at his point, however, is that all of your iRules are bolded with an asterisk next to them. This means they are not saved in their current state on the LTM.  If you exit at this point, you’ll still be iRuleless, and no one wants that. Luckily Joe thought of that when building the iRule editor, so all you need to do is select File –> Save All, and you’ll be most of the way home.

I say most of the way because there will undoubtedly be some errors that you’ll need to clean up. These will be config based errors, like pools that used to exist on your old system and don’t now, etc.  You can either go create the pools in the config or comment out those lines. I tend to try and keep my iRules as config agnostic as possible while testing things, so there aren’t a ton of these but some of them always crop up.03012010_CWTT_godzillaSaveErrors  The editor makes these easy to spot and fix though. The name of the iRule that’s having a problem will stay bolded and any errors in that particular code will be called out (assuming you have that feature turned on) so you can pretty quickly spot them and fix them. 

This entire process took me about 15 minutes, including cleaning up the code in certain iRules to at least save properly on the new system, and I have a bunch of iRules, so that’s a pretty generous estimate.  It really is quick, easy and painless to get your code onto an LTM VE and get hacking coding. An added side benefit, but a cool one, is that you now have your iRules backed up locally. Not only does this mean you’re double plus sure that they won’t be lost, but it means the next time you want to deploy them somewhere, all you have to do is import from the editor.  So if you haven’t yet, go download your BIG-IP LTM VE and get started. I can’t recommend it enough.  Also make sure to check out some of the really handy DC content that shows you how to tweak it for more interfaces or Joe’s supremely helpful guide on how to use a single VM to run an entire client/LTM/server setup.  Wicked cool stuff. 

 

Happy iRuling.

 

#Colin



Feedback

No comments posted yet.

Let Me Know What You Think


Please use the form below if you have any comments, questions, or suggestions.

Title:
 
Name:
 
Email: (so we can show your gravatar)
Website:
Comment: Allowed tags: blockquote, a, strong, em, p, u, strike, super, sub, code
 
Please add 4 and 2 and type the answer here:

Blog Stats

Posts:221
Comments:77
Stories:0
Trackbacks:0
  

Games, Gaming, etc.

  

IT News and Info

  

Misc.

  

Add to Technorati Favorites

82,243 Members in 102 Countries and Growing!

Join DevCentral Today!

About DevCentral

DevCentral has been a successful, thriving community for many years. We have always strived to bring you the best technical documentation, discussion forums, blogs, media and much more that we can.

So dive in, get familiar with DevCentral. We hope you like it, we hope it makes your job easier, and lets you get that much more power out of the community. To learn more, make sure to check out the Getting Started section. And if you have any problems, or think something could be easier to use, drop us a line to let us know.

Got It !

We've received your comment and transmitted it directly to DevCentral HQ.

Thanks for taking time to let us know what's on your mind. At DevCentral | Community Matters!

Get In Touch With Us

Have questions, suggestions or just want to get something off your chest?

Use our handy form below to Direct Connect with DevCentral Mission Control.

Send Us Feedback       or