Search
Jason Rahm - Jason's Blog
You are here: DevCentral > Weblogs

posted on Wednesday, November 04, 2009 1:30 PM

There have been several questions over the past month in the iControl forum as to whether or not pyControl works on linux.  In the pyControl labs information, there are instructions for install on Microsoft Windows based systems, but not for linux, so maybe this is the source of confusion.  This is not so much that pyControl isn't linux compatible as it is that the installation instructions on the many flavors of linux vary.  In reality, the only step that should be different between the distributions is the first step: installing python.  Now, on my flavor of choice, Ubuntu, python 2.6 is the default version, which doesn't work so well with the ZSI soap library utilized by pyControl.  So I installed python 2.5 alongside 2.6.  This works fine as long as you keep in mind that running python from the command line will actually run the python2.6 binary.  So when you install the python packages necessary for pyControl to work, just remember to either update the symlink (/usr/bin/python on my Ubuntu 9.10 system) or call the python2.5 binary.  Here's the steps I took to get pyControl prepared on my system.

  1. Install python2.5 - sudo apt-get install python2.5
  2. Download the necessary packages (I threw them in /var/tmp/)
    1. Easy Setup - http://peak.telecommunity.com/dist/ez_setup.py
    2. ZSI - http://sourceforge.net/projects/pywebsvcs/files/ZSI/ZSI-2.1_a1/ZSI-2.1_a1-py2.5.egg/download
    3. pyControl - http://devcentral.f5.com/LinkClick.aspx?link=http%3a%2f%2fdevcentral.f5.com%2flabs%2fpyControl%2fpyControl-1.3.0_beta-py2.5.egg&tabid=73&mid=433
  3. Install the packages
    1. sudo python2.5 /var/tmp/ez_setup.py
    2. sudo easy_install-2.5 /var/tmp/ZSI-2.1_a1-py2.5.egg
    3. sudo easy_install-2.5 /var/tmp/pyControl-1.3.0_beta-py2.5.egg

 

Now that the environment is prepared, we can test it out to make sure all is well in the pyControl world.

vadmin@vadmin:~$ sudo python2.5

Python 2.5.4 (r254:67916, Apr 4 2009, 17:55:16)

[GCC 4.3.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import pycontrol.pyControl as pc

>>> b = pc.BIGIP(

... hostname = '10.10.10.10',

... username = 'admin',

... password = 'admin',

... wsdl_files = ['GlobalLB.WideIP']

... )

Loading WSDL: GlobalLB.WideIP.wsdl

>>> w = b.GlobalLB_WideIP

>>> w.get_list()['return']

['test.wip.com']

>>>

 

The install document on the pyControl page has been updated to reflect the Ubuntu linux distribution.  Happy coding!

 



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 2 and 5 and type the answer here:

Blog Stats

Posts:86
Comments:108
Stories:0
Trackbacks:0
  

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